How Homegames works

What Homegames is, and how the whole system fits together — from a tap on a phone to the code running your game. For making games, see the docs; for running it on your own machine, see self-hosting.

What is Homegames?

Homegames is a platform for making, sharing, and playing simple multiplayer games in the browser. There's nothing to install for players: games run in any browser, on any device, and phones work as first-class controllers and screens. Games are small JavaScript programs — usually a single file — and everything on the platform, including every published game, is open source under GPLv3.

There are two ways to use it:

Playing games

Clicking Play on a game page starts one of two kinds of session:

Either way, the game code is identical — the same class runs in a browser tab or on a hosted server, and it can't tell the difference.

Games are scene trees, not canvases

A Homegames game never draws pixels, touches a canvas, or opens a socket. It maintains a tree of nodes — shapes, text, and assets (images/sounds) — positioned on a 100×100 coordinate grid. The game mutates that tree (move this square, change that label) and signals "something changed." That's its entire interface with the world.

Everything else is the platform's job: rendering the tree to an actual screen, delivering taps and key presses back to the game (tagged with the acting player's id), and keeping every connected player in sync. Because the game is just a description of what exists, one game instance can serve many players at once — and nodes can be scoped to specific players, which is how a shared card game keeps each hand secret.

Squish: the wire format

The scene tree travels between game and screen as a compact binary format called squish (the library is squishjs). Think protobufs, but purpose-built for game scenes: each node serializes to a few dozen bytes — positions, colors, text, asset references — and the client deserializes ("unsquishes") and renders them. Input travels the other way as small JSON messages.

Squish is versioned, and every game pins the version it was written against (that's the squishVersion: '142' in game metadata). The platform keeps old versions around, so games written years ago keep working as the platform moves forward.

The browser side is a small rendering engine (homegames-client) that connects over WebSocket, unsquishes frames onto a canvas, and forwards input. It's the same engine everywhere: the website's player, hosted multiplayer sessions, self-hosted dashboards, and offline downloads.

Where games run

In your browser (local sessions)

For single-player play, the client engine runs the whole loop in-tab: it instantiates the game class, runs the squish serializer locally, and renders the frames — a complete client and server in one browser tab. No account, no latency, no server cost.

On a session server (hosted sessions)

Multiplayer sessions run on the platform's session infrastructure. Each session is an isolated process (a locked-down container where available) running just that game, on its own port, with resource limits. A small management API — Homenames — creates sessions, tracks players, and tears sessions down when everyone leaves. Players' browsers connect directly to the session over WebSocket.

The game is server-authoritative: all logic runs in one place, and clients are thin. That's why there's no netcode to write and no way for a modified client to cheat beyond sending inputs.

The pieces

End to end, the platform is a handful of cooperating services:

PieceWhat it does
homegames.io (this site) The catalog, game pages, in-browser player, and the Developer Studio — a browser IDE with templates, version history, asset tools, live preview, and publishing.
The API (api.homegames.io) The backend for everything: accounts, the game catalog, asset storage, comments, and the Studio. Game source lives in a Git server behind the API, so every save is a real commit with history you can restore.
Session servers Run hosted multiplayer sessions (see above).
The worker A background job runner. It validates publish submissions, issues TLS certificates for self-hosted servers, and powers the Studio's "Ask AI to edit" feature — a local LLM that rewrites your game from a plain-English prompt and commits the result as a new version.
homegames.link The front door for self-hosted servers: it notices which Homegames server is on your network and redirects your browser to it. Details below.

Publishing & safety

Anyone with a verified account can publish. Because published games are code that the platform will run — in hosted sessions and in players' browsers — every submission goes through automated validation before it can go live:

  1. Static analysis. The game's source is scanned at the syntax-tree level. Games may only use the squish library and their own files — no Node built-ins, no network, no filesystem, no eval, no dynamic require. Anything else is rejected outright.
  2. Sandbox run. The game is actually executed for a few seconds inside a container with no network access, to confirm it loads, renders, and doesn't crash.
  3. License check. Every published game must be GPLv3, and its source is publicly browsable from its game page.
  4. Listing. A passing game is publicly listed in the catalog. Featured games are hand-picked by a human. Uploaded images are also automatically screened.

Homegames on your network

The self-hosted experience is the original heart of Homegames: one machine in your house runs the server, and everyone on the wifi plays together by visiting homegames.link — no app, no setup on anyone else's device. Two small pieces of platform machinery make that URL magic work:

The result: any device on your network gets a secure connection to a server in your own house, with zero configuration. The full setup guide is at self-hosting.

Open source map

Everything is on GitHub under github.com/homegamesio. The main repos:

RepoWhat it is
squishThe game object model + binary serialization (squishjs on npm)
homegames-coreThe game session server: dashboard, session management, built-in games
homegames-clientThe browser rendering/input engine
homegames-webThe small web server that serves the client to players
homegamesThe self-host launcher: cert provisioning + core + web in one process
homegames-commonShared library: sessions, config, squish version management
homegames-apiThe platform backend
homegames.linkThe LAN discovery/redirect service
workerBackground jobs: cert issuance, AI game editing
homegamesioThis website

Something wrong or confusing on this page? Email joseph@homegames.io or open an issue on GitHub.