Reference

The lookup tables the usage guide points at. A game definition is a folder of JSON and JavaScript: declarative .json files that describe the game, and .js files that carry the logic. This section lists the configuration keys, the field types, the library functions, the contexts and ids each body runs with, and every file, so each page can link to one source of truth. Search them all, or browse by section below.

The shape of a definition

Every game lives under your game-server domain, one directory per game. That directory is a single version. A breaking change ships as a new directory alongside it, without disturbing the one people are already playing.

game.gameserver.org/                 your game-server domain
  pong/                              one directory per game (a version boundary)
    gamehoster-game.json             title, browse, create, tickRate, capacity
    gamehoster-game-startup.js       runs once when the game first starts
    gamehoster-player/               the player's schemas and scripts
      gamehoster-player-join-schema.json   the fixed data supplied on connect
      gamehoster-player-schema.json          the player's per-instance state
      gamehoster-player-join.js              route into an instance and set the player up
      gamehoster-player-leave.js              clean up on leave
      gamehoster-player-update.js    the authoritative per-tick update
    gamehoster-instance/             the instance's schema and updates
      gamehoster-instance-schema.json        the instance's own state (incl. phase) + tuning
      gamehoster-instance-update.js  the authoritative per-tick update
    gamehoster-commands/<name>/       command schema + handler
    gamehoster-entities/<type>/       entity schema + update
  pong-v2/                           a clean break is a sibling directory

The Files page breaks this down file by file, linking each to where it's explained in the usage guide.