AmirSAmirhossein Shakernezhad
Back to the work

GREED

A multiplayer arena about knowing when to leave.

GREED borrows the readability of a snake arena and builds its own identity on top: a persistent risk decision, a conserving match economy, a population-aware ring and deliberately capped physical power. I designed and built it end to end — gameplay rules, a deterministic simulation, a binary realtime protocol, the platform services behind it and the interface in front of it.

Role
Creator — game design, full-stack & realtime engineering, UI
Collaboration
Solo project
Year
2026
Status
In development
Disciplines
Game systems · Software · Infrastructure · Security
Stack
TypeScriptReactPixiJSViteZustandFastifyWebSocket (binary)Rust · napi-rsPostgreSQLRedisDockerTurborepo

Enter with something worth protecting, become visibly more valuable, and decide whether to escape now or risk one more fight.

The player promise, from the GREED design document

Premise

Money is score, status, body mass and risk at the same time. Every gain makes you a bigger target, and the only way to keep what you carry is to stop, lock your heading and survive four seconds of Cash Out in the open. Death converts everything you carried into a contested explosion of value — never silently handed to the killer.

Growth is visible but its physical benefit diminishes and caps, so being rich makes you dangerous rather than invincible. Cosmetics never change hit geometry.

The browser sends intent. The server decides.

HTTPSbinary WSinternal WSBrowserReact · PixiJSFastify APIauth · queue · profileRealtime gatewaybinary WS · admissionAuthoritative roomsingle writer · 30 HzEnginedeterministic · TS ⇄ RustPlatform serviceseconomy · stats · ranksHash-chained journaldual receiptsPostgreSQLauthorityRediscoordination · cacheintentsnapshots · deltas (15 Hz)
The client can't submit position, money, pickups, kills or outcomes. A single-writer room runs a fixed 30 Hz simulation and replicates snapshots and deltas at 15 Hz over a versioned binary protocol.

Systems

  1. 1Movement & body model

    Deterministic fixed-point maths shared by client and server. Boost burns body mass only — it can't create, burn or drop money.

  2. 2Ranked & Practice

    Practice runs the same movement, ring and extraction rules with match-scoped money. Ranked settles into a persistent Vault through reserved entries and double-entry settlement.

  3. 3Progression without power

    Account level from play and challenges, XP, skill badges, titles, and cosmetic skins, trails and crests — with no stat upgrades.

  4. 4Economy integrity

    Money moves as immutable, conserved lots. Terminal events are written to a hash-chained dual journal, and a Cash Out is only acknowledged once both receipts exist.

  5. 5Anti-abuse by construction

    Sequenced, epoch-scoped intents; client-authored outcomes rejected; single-use admission tickets; rate and backpressure limits at the gateway.

  6. 6Admin & operations

    Operator permissions in the admin overview, health and metrics endpoints on every service, and checksummed forward-only migrations.

Two engines, one truth

The simulation exists twice: a renderer-free TypeScript engine and a Rust port exposed to Node through napi-rs. Both are parity-tested against the same vectors, so the fast path can never quietly disagree with the reference.

Where it stands

The engineering foundation is a complete playable vertical slice. It isn't yet a horizontally fault-tolerant production deployment — region-aware allocation, journal replay and managed infrastructure are the next milestone, and the repository documents those limits explicitly.

Frames