Game

The top-level files describe the whole of Quake 0 rather than any one player, instance or entity. Quake 0 has a single top-level file, its config; everything else lives in the folders below. When the game is synced, two bundles — gamehoster.server.js and gamehoster.client.js — are compiled from these files in memory and pushed to the game server; they are never written to your local disk.

<gamehoster-config-contentRoot>/
  game.gamehoster.org/
    quake0/
      gamehoster-game.json
      gamehoster-player/
      gamehoster-instance/
      gamehoster-commands/
      gamehoster-entities/
      gamehoster-bots/
The Quake 0 game folder: its config and the component folders.

Contents

NameTypeDescription
gamehoster-game.jsonfileThe whole game config.
gamehoster-player/directoryThe fighter: join and state schemas and the lifecycle scripts.
gamehoster-instance/directoryThe level and physics constants, and the authoritative update.
gamehoster-commands/directoryThe move, jump and drop commands.
gamehoster-entities/directoryThe bullet and the hit effect.
gamehoster-bots/directoryThe grunt bot that fills empty slots.

gamehoster-game.json

The whole config: the title, that players are dropped straight in with no browse or create so the join script places each into an instance, a 30-per-second simulation, 30 sends a second, a capacity of five fighters per instance, and the bot-padding settings that keep empty instances lively — a base rate, a four-bot cap (botsMax), and a taper to zero (botsZeroAt) once five fighters are present. (Bot padding is game config now: the botsMax/botsZeroAt caps moved here from the instance schema.)

{
  "gamehoster-game-title": "Quake 0",
  "gamehoster-game-browse": "none",
  "gamehoster-game-create": "none",
  "gamehoster-game-tickRate": 30,
  "gamehoster-game-sendRate": 30,
  "gamehoster-game-capacity": 5,
  "gamehoster-game-botRate": 6,
  "gamehoster-game-botsMax": 4,
  "gamehoster-game-botsZeroAt": 5
}
quake0/gamehoster-game.json