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 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.
Games →
The game definition the server runs: the folder that describes a game (its config, instances, players and entities) and becomes an authoritative WebSocket API.
Frontend →
Building the front end with the generated client library: browsing and joining, subscribing to its state and to render frames, and sending input and commands back.