C · Building a Game
Where to go next
In ~40 minutes you built a multiplayer game whose rules are enforced by a deterministic state machine reading two blockchains. Here's the full picture, and the doors it opens.
▼ details below
Everything you built
Ideas to keep building
- Easy: tune
game.tsconstants; add a 4th element; bigger map; card rarity tiers. - Medium: move cooldowns (use
blockHeight); capture-streak scoring; MQTT push instead of polling (the node already runs a broker on :8883/:9883). - Hard: shielded cards on Midnight (hidden power until the first battle); trading via ERC-721 transfers (the STM already follows owner changes); tournaments settled on a real network.
Other templates to raid
| Template | What it demonstrates |
|---|---|
chess-v2 | lobbies, turn timers, ELO, an AI opponent — the full game-server pattern |
zswap-da | Midnight + Celestia: atomic swaps with a data-availability layer |
night-bitcoin-v2 | Midnight + Bitcoin: ERC-7683 intents, unshielded tokens |
minimal | the smallest possible Effectstream app — great for starting fresh |
Shipping beyond localhost
The same code you wrote today syncs real networks — the dev/prod split lives in
main.dev.ts vs main.mainnet.ts, and nothing about your state machine
changes. The full recipe (systemd, Postgres, nginx, .env, start blocks) is the
production deployment page.
Links
- Docs: effectstream.github.io/docs
- Source & templates: github.com/effectstream/effectstream
- All workshop code: game.html and the
game-code/folder of this site — every file downloadable from its step page.
Thanks for building. Now go displace somebody's card.