References
client/js
| summary | ||
| public |
F bindHandler(id: string, handlerMethod: function) Binds handlerMethod to onclick event for element id. |
|
| public |
F displayWinner(data: *) Displays the winner panel after a game has concluded. |
|
| public |
F hideElement(el: string) Hides a visible element |
|
| public |
Transitions from in-game displays to the main menu. |
|
| public |
F showElement(el: string) Displays a hidden element |
|
| public |
F updateAtomList(atomID: string) Updates the list of atoms that the player holds. |
|
| public |
F updateCompoundButtons(selectedSlot: number) |
|
| public |
F updateLobby(data: *) Run on new player join to sync lobby information |
|
| public |
F updateScores(teamSlot: *, increment: *) Updates the team scoreboard on screen. |
|
| public |
F distanceBetween(obj1: *, obj2: *): * |
|
| public |
F generateID(): * Returns a random number between between 10000000 and 99999999, inclusive. |
|
| public |
F getCurrTile(obj: *): string Gets the tile directly underneath any object. |
|
| public |
F getGlobalLocation(obj: *): {"globalY": *, "globalX": *} Gets the coordinates of the tile directly underneath the object. |
|
| public |
F isInBounds(obj: GameObject): * Returns true if the object parameter is within the map boundaries. |
|
| public |
F createPlayer(data: *): Player Creates a Player instance once the stage is fully set up and ready. |
|
| public |
F destroyPIXI() Destroy everything in PIXI. |
|
| public |
|
|
| public |
F isFocused(): * If the document is Focused return true otherwise false |
|
| public |
F loadTextures() |
|
| public |
F mouseDownHandler(e: *) Called on mouse down from app.js |
|
| public |
F mouseUpHandler(e: *) Called on mouse up from app.js |
|
| public |
F movePlayer(direction: string) Moves the player by changing its velocity. |
|
| public |
Sets the value of inGame |
|
| public |
F showGameUI() Call this function to hide loading div and show UI |
|
| public |
Starts the game after lobby closes. |
|
| public |
F beginConnection() Attempts to connect to the server. |
|
| public |
F disconnect() Run on disconnect to reset all server-based variables and connections |
|
| public |
V cookieInputs: * |
|
| public |
|
|
| public |
V selectedBlueprints: * |
|
| public |
|
|
| public |
V GLOBAL: {"DEBUG": boolean, "VERBOSE_SOCKET": *, "KEY_ESC": number, "KEY_ENTER": number, "KEY_W": number, "KEY_A": number, "KEY_S": number, "KEY_D": number, "KEY_1": number, "KEY_2": number, "KEY_3": number, "KEY_4": number, "KEY_SPACE": number, "BP_SELECT": string, "BP_MAX": number, "BP_TOOLTIP_BLACKLIST": *, "INPUT_COUNT": number, "PLACEHOLDER_NAME": string, "MAX_CHATS": number, "SERVER_IP": string, "LOCAL_HOST": string, "TEST_IP": string, "NO_ROOM_IDENTIFIER": string, "NO_TEAM_IDENTIFIER": string, "ROOM_DELETE_DELAY": number, "COOKIES": *, "COOKIE_DAYS": number, "MAX_SPEED": number, "PLAYER_RADIUS": number, "VELOCITY_STEP": number, "LERP_VALUE": number, "DEADZONE": number, "MAX_HEALTH": number, "PLAYER_ROTATION": number, "PLAYER_EXPEDITED_ROTATION": number, "ATOM_RADIUS": number, "MIN_POWERUPS": number, "MAX_POWERUPS": number, "ATTRACTION_RADIUS": number, "ATTRACTION_COEFFICIENT": number, "ATOM_SPAWN_SPEED": number, "ATOM_SPAWN_DELAY": number, "ATOM_COLLECT_THRESHOLD": number, "MAP_SIZE": number, "SPAWN_POINTS": *, "MAX_SPAWNER_HEALTH": number, "MAX_STRONGHOLD_HEALTH": number, "MAX_NUCLEUS_HEALTH": number, "STRONGHOLD_RADIUS": number, "STRONGHOLD_DEFENSE": number, "DRAW_RADIUS": number, "GRID_SPACING": number, "GRID_LINE_STROKE": number, "FRAME_RATE": number, "TEAM_COLORS": *, "IGNITE_SPRITE": string, "ATOM_IDS": *, "ATOM_SPRITES": *, "SPRITESHEET_DIR": string, "COMPOUND_DIR": string, "EXPERIENCE_VALUES": *, "EXPERIENCE_LEVELS": *, "MAINMENU_MUSICLIST": *, "LOBBY_MUSICLIST": *, "INGAME_MUSICLIST": *, "KILL_SCORE": number, "ASSIST_SCORE": number, "WINNING_SCORE": number, "CAPTURE_SCORE": number, "MAX_DEATH_ATOMS": number} |
|
| public |
|
|
| public |
V objects: {"players": *, "atoms": *, "compounds": *, "tiles": *} |
|
| public |
V teamColors: {} |
|
client/js/lib
| summary | ||
| public |
|
|
| public |
|
|
| public |
F eraseCookie(name: string) Removes the given cookie. |
|
| public |
Sets the value of a cookie. |
|
| public |
Sets the value of a cookie. |
|
| public |
F keyboard(keyCode: *): * |
|
client/js/obj
| summary | ||
| public |
One Tile component of the map. |
|
| public |
GameObject class that all objects in the game space should inherit. |
|
| public |
C MapTile One Tile component of the map. |
|
| public |
C Player |
|
| public |
F createRenderAtom(data: *): * Renders a new atom. |
|
| public |
F createRenderCompound(data: *): * Recreates an already spawned compound on the clientside based on server data. |
|
| public |
F createTiles() |
|
| public |
F requestCreateCompound(blueprint: *, xIn: number, yIn: number, streamID: number): * Creates a Compound by sending a request to the server. |
|
| public |
V BLUEPRINTS: {"binaryHydrogen": *, "basicMethane": *, "basicBenzene": *, "basicWater": *, "binaryNitrogen": *, "carbon": *, "binaryHelium": *, "ionicSodiumChloride": *, "acidicHydrogenChloride": *, "nuclearLithiumHydrogen": *, "glucose": *, "protonPack": *, "ozone": *, "cyanide": *, "nitricAcid": *} This constant stores all data that is used to define Blueprints, which define the recipe and behaviors of Compounds. |
|
| public |
V TOOLTIPS: {"flammable": string, "stream": string, "inert": string, "block": string, "speed": string, "defense": string, "toxic": string, "acid": string, "base": string} |
|
| public |
V MAP_LAYOUT: undefined[] |
|
| public |
V TILES: {"empty": *, "flame": *, "topLeft": *, "topRight": *, "bottomLeft": *, "bottomRight": *, "edgeTop": *, "edgeBottom": *, "edgeLeft": *, "edgeRight": *, "hydrogenVent": *, "oxygenVent": *, "nitrogenVent": *, "carbonVent": *, "stronghold": *, "nucleus0": *, "nucleus1": *, "nucleus2": *, "nucleus3": *} This constant contains all data on how to draw and manage tiles. |
|
| public |
V TILE_NAMES: {"E": string, "O": string, "N": string, "C": string, "H": string, "F": string, "S": string, "q": string, "w": string, "e": string, "a": string, "d": string, "z": string, "x": string, "c": string, "n0": string, "n1": string, "n2": string, "n3": string} |
|
server
| summary | ||
| public |
F deleteObject(type: string, id: *, room: string, socket: *) Deletes one of the three types of gameObjects synced to the server |
|
| public |
F getField(path: *): * Returns the value given a path to that value. |
|
| public |
F incrementField(amount: *, path: *) Shorthand to add or concatenate an amount to a field. |
|
| public |
F setField(value: *, path: *) Sets a new value for a protected server field. |
|
server/utils
| summary | ||
| public |
|
|
| public |
F incrementAtom(player: *, room: *, atomType: *, quantity: *) |
|
| public |
|
|
| public |
Spawns an atom at the vent at the given row and column. |
|
| public |
F collisionDetect(socket: *, room: string, thisPlayer: *, tempObjects: *) Runs once a frame, checks for collisions between objects and handles them accordingly. |
|
| public |
F createCompound(data: *, room: string, thisPlayer: *, socket: *): * Checks if a compound can be created, deducts craft material, and returns the new compound. |
|
| public |
F tickCompound(compound: number, room: string, socket: *) Checks compound behavior based on compound type. |
|
| public |
F addExperience(event: string, socket: *, room: string, player: string) Adds experience to a given player. |
|
| public |
Runs once a frame, per ROOM. |
|
| public |
F roomMatchmaker(socket: *, room: string, team: string): * Matchmaking system for public matches. |
|
| public |
Changes the health of the player by the amount given. |
|
| public |
F damageTile(tileID: *, damageAmount: *, player: *, room: *, socket: *): boolean |
|
| public |
F splash() TODO |
|
| public |
F initGlobal() Global initialiation. |
|
| public |
F initPlayer(socket: *, room: string, team: string): * Run on every player join. |
|
| public |
Run when the first person joins a new room that has not been initialized yet. |
|
| public |
F getTeamColors(room: string): * Returns the team colors object (see client socket.js for more information on the format) |
|
| public |
F getTeamNumber(room: string, teamName: string): * Returns the index of the given team within the team array of the given room. |
|
| public |
Returns the serverside ID of the tile at this location. |
|
| public |
|
|
