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 and every file, so each page can link to one source of
truth.
Types →
The field types a gamehoster-schema.json can declare, and how each is synced, compared
and smoothed.
Functions →
Every function the generated front-end library exposes on the global Gamehoster
object.
Files →
Every file in a game definition and the keys it holds, searchable, each linked to where it's explained.
Protocol →
The binary socket protocol the generated client and server speak: framing, snapshots and input, under the hood.
Internals →
The actual source of the engine and the front-end library, module by module, every function annotated, so you can read exactly how it runs.
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-backend.js · -update-frontend.js
gamehoster-instance/ the instance's schema and updates
gamehoster-instance-schema.json the instance's own state (incl. phase) + tuning
gamehoster-instance-update-backend.js · -update-frontend.js
gamehoster-commands/<name>/ command schema + handler
gamehoster-entities/<type>/ entity schema + backend/frontend 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.