Gamehoster
Realtime multiplayer, hosted. Declare a game as a local folder named for its domain; your own server runs the rooms, presence and live updates over WebSockets.
About
The same drop-a-folder idea as Localhoster, but the payload is live state instead of files. A folder named for a domain becomes a realtime host on your own server, and each game inside it is served at its own path. Players connect over a WebSocket and everything in a room stays in step. One server hosts many domains, each with many games.
Key Hunt, Asteroids and Buttermilk Forever all run on it.
Features
Rooms and broadcast
A room is a shared space. Anything one client sends is relayed to everyone else in it, instantly.
Presence
The server tracks who is connected and lets go when they leave, so the room always reflects who is there.
In memory and fast
Live state lives in memory with a short lifetime, tuned for low latency rather than long-term storage.
Casual by default
No sign-up to play: arrive, pick a name, and control your own character. Drop the connection and you resume where you were.
One definition
A game is defined once, as a folder of JSON and JavaScript, and built into both an authoritative server and a generated client.
Ticks and entities
Each game instance runs on a tick, with its players and entities kept in the server's state.
Tools
The server publishes web logs, server statistics and the state of your games as plain pages over HTTPS.
Screenshots
Gamehoster
A folder for each domain, holding several games, each served at its own path. Visit gamehoster.org ↗
Examples
Complete games built on Gamehoster, worked through: Pointing, Pong, Chess, Snake and Asteroids. See the examples ↗
Usage
How a game is defined: the game folder, the instance and its tick, players and entities, all built into a server and a client from one definition. Read the guide ↗
Tools
Pages the server publishes for you: web logs for each site, server statistics, and your games and their state. See the tools ↗
Reference
Every config key by file, the field types, the front-end library functions, the files and the socket protocol. Open the reference ↗
Key Hunt
One of the games running on Gamehoster, with every player in the arena kept in step over a WebSocket. About Key Hunt
Contents
The sections of gamehoster.org, and the pages in each.
Technologies
- JavaScript - Game frontends
- Node.js - Multiplayer backend server
Articles
- Gamehoster - How a game is defined, how it slots into the engine, the front end and the binary protocol
- Asteroids - A multiplayer Asteroids arena whose rooms run on Gamehoster
- Key Hunt - A multiplayer key hunt on a tile map, running on Gamehoster
More games
- Rocks Off! - A tile-based puzzle game with eight worlds and a level editor
- Key Hunt - The biggest key hunt in the world, an online multiplayer game
- Asteroids - A multiplayer Asteroids arena in the browser
- Buttermilk Forever - A pixel-art arena brawler for your phone
- Tetrisk - Two pieces in two wells at once, playable in the browser
- Sprites.org - Browser editors for game graphics, sound and data
- Emulators - A guide to emulation and the best emulators for every platform