Usage

A game on Gamehoster has two halves, both built from one game definition folder. The server turns that folder into a live authoritative WebSocket API, the backend, and generates a client library you build your frontend against.

game.gamehoster.org/
  pong/
    gamehoster-game.json
    gamehoster-game-startup.js
    gamehoster-player/
      gamehoster-player-join-schema.json
      gamehoster-player-join.js
      gamehoster-player-schema.json
      gamehoster-player-leave.js
      gamehoster-player-update-backend.js
      gamehoster-player-update-frontend.js
    gamehoster-instance/
      gamehoster-instance-schema.json
      gamehoster-instance-update-backend.js
      gamehoster-instance-update-frontend.js
    gamehoster-commands/
    gamehoster-entities/
The contents of a game directory, broken down file by file on Games

The files of a game

A game is a folder, one directory per game under your game-server domain. The config and startup script sit at the top level, the player schemas and their scripts gather into a gamehoster-player/ folder, the instance schema and its update files into a gamehoster-instance/ folder, alongside the commands and entities folders.

One definition, two sides

The hard part of realtime multiplayer is keeping an authoritative server and a predictive client agreeing with each other. Because Gamehoster generates both from the same folder, they can't drift: write the game once, and the networking (rooms, presence, state sync, prediction and reconciliation) is handled for you.