Usage

A game on Gamehoster has two halves, both built from one game definition folder. You stand up a server once, then run a local sync tool that pushes your game folders up to it. The server turns each folder into a live authoritative WebSocket API, the backend, and generates a client library you build your frontend against. You author the definition under a domain folder as a game, and upgrade it live as your game grows.

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.js
      gamehoster-player-predict.js
    gamehoster-instance/
      gamehoster-instance-schema.json
      gamehoster-instance-update.js
    gamehoster-commands/
    gamehoster-entities/
The contents of a game directory, broken down file by file on Games

The hard part of realtime multiplayer is keeping an authoritative server and every client agreeing with each other. Because Gamehoster generates the server and its client from the same folder, they can't drift: write the game once, and the networking (rooms, presence, per-viewer state deltas, and the interpolation that keeps motion smooth between packets) is handled for you.

Contents

Examples

Complete games you can read end to end, each just a folder you could drop onto your own server. Browse them all in Examples.