Engine V0 — built for Robinhood Chain
The game engine where every match settles on-chain
Write one deterministic TypeScript module. FORGE runs it authoritatively, matches wallets against it, escrows the stakes on Robinhood Chain and pays the pot to whatever your rules decide. Rendering is yours — fairness, netcode and money are the engine's.
- Deterministic simulation
- 30 Hz
- Wallets per match
- 2–8
- Escrow checks green
- 32/32
- Hard cap on rake
- ≤10%
$npm i forgeQuickstart01 — The contract
One module. Everything else is engine.
A game is a pure object: rules in, winner table out. No sockets, no wallets, no rendering assumptions. The engine supplies matchmaking, invite lobbies, scripted opponents, per-player state redaction and the entire money layer.
Fixed steps, seeded randomness and ordered inputs make rooms deterministic — so the identical module runs on the hosted relay and in a browser tab. The playground on this site is that exact property, live.
SAME SEED + SAME INPUTS = SAME RESULT, EVERYWHERE
1export const myGame: GameModule<State, Input> = {2 id: "my-game", minPlayers: 2, maxPlayers: 4,3 tickRate: 20, // fixed sim steps — determinism4 setup(ctx) { /* seeded ctx.random */ },5 onInput(s, player, input, ctx) {6 // validate + apply — cheating is impossible here7 },8 tick(s, ctx) { /* advance ctx.dt */ },9 result(s) { /* winners + splitBps → paid on-chain */ },10};
02 — Shipped modules
Three genres. One API.
src/templates/tap-duel.ts
Tap Duel
The arena flashes after a hidden seeded delay — first tap takes the round, early taps hand it away. The hello-world of FORGE, and the module the playground runs in your browser.
2 playersFirst to 5
Play it now03 — Money protocol
Stakes in, proof out.
- 01
Match opens
The relay referee binds 2–8 wallets and one stake to a bytes32 id on ForgeEscrow.
- 02
Stakes lock
Each player sends exactly one deposit() transaction. All in → Funded → the room goes live.
- 03
Module decides
Your result() returns a winner table — splits summing 10,000 bps. The engine never invents outcomes.
- 04
Pot settles
settle() pays pot − rake by the table, dust-exact. Draws refund. Dead relay? Players reclaim() trustlessly.
Ready when you are
Ship your first module today.
Copy the closest template, keep your renderer, and let the engine handle the room, the lobby and the money.