01 / overview
2026 · ACTIVEBubbleBet
Real-time multiplayer browser arena game built around player growth, PvP interaction, risk and cash-out decisions.
- category
- GAMES
- status
- ACTIVE
- year
- 2026
- role
- Product design + full-stack / game systems engineering
- core technologies
- PostgreSQL · Hetzner VPS · Cloudflare
- tags
- REALTIME · MULTIPLAYER · NETCODE · POSTGRES
- links
- Live demo ↗
02 / product
The multiplayer arena itself. Movement, mass, surrounding entities, the live leaderboard, the minimap and the player's current cash-out value are all views of server-owned state: the browser renders the arena, it does not decide it. Mass is shown in BUB beside a cash-out value because growth here is an economic quantity, not a score.
03 / objective
Build a browser-based, real-time multiplayer arena where players grow through interaction, fight each other, and decide when to stop - while the economic state stays authoritative and consistent throughout.
- R-01Runs in the browser, real-time
- R-02Target of approximately 100 players per arena
- R-03Players grow through arena interaction
- R-04PvP interaction, including splitting
- R-05Each player chooses between continuing to grow and cashing out
- R-06Economic state remains authoritative and consistent
04 / system architecture
06 tiers · top → bottom- L1Browser client
- Game HUD + overlays
- Presents server state
- L2Real-time network layerpending Transport (WebSocket / Socket.IO / custom) and message format.
- L3Authoritative game server
- Server-owned game state
- Player lifecycle
- L460 Hz game simulation
- Movement + collisions
- Splitting + eating
- Commit-reveal RNG
- L5Game economy / ledger
- Buy-in + starting mass
- Taxation
- Food generation
- Deaths, respawns, cash-outs
- L6PostgreSQL
- Durable account + game records
- Hetzner VPS
- Cloudflare
- Redis - ephemeral / realtime scaling layer [planned]
05 / engineering constraints
10 records · 08 specified- C-01Arena size100-player target per arena.
- C-02Simulation rate60 Hz simulation target.
- C-03Server authorityGame state is server-authoritative.
- C-04Untrusted clientFinancial / economic state cannot be trusted to the client.
- C-05Lifecycle consistencyJoin, active play, elimination, respawn and cash-out must behave consistently across the game lifecycle.
- C-06Verifiable randomnessRandom game outcomes must be independently verifiable.
- C-07Responsive under authorityThe game must remain responsive while maintaining authoritative server-side accounting.
- C-08Arena economyPlayers enter with a 500 BUB buy-in and a playable starting mass of 300 BUB. Taxation and mathematically / RNG-controlled food generation govern value in the arena instead of treating food as free inflation, and player activity, deaths and respawns feed back into the available economy.
- C-09 openReconnect / disconnectpending Exact disconnect and reconnect rules.
- C-10 openScaling beyond one arenapending Strategy beyond a single arena / server.
06 / hard problems
04 problem → response pairs- problemA real-time Agar-like game needs movement and interactions to feel immediate, while the server must remain authoritative over state that can ultimately affect player value. Every client-side shortcut that makes the game feel faster is a place where the browser could disagree with the ledger.responseKeep authoritative simulation and economic state server-side, and design the networking / client layer around presenting that state responsively rather than letting the browser determine outcomes.
- problemJoining, loading, active play, elimination, re-entry and cash-out each change what a player can do and what they hold. Treated as separate UI screens, the transitions could disagree with server state - visible as issues such as flicker on join - and in a game where state carries value, a disagreeing transition is an accounting risk, not just a UI bug.responseUnify them into one coherent lifecycle: join / start transitions tracked with attempt IDs, join flicker removed, a Start Demo gate before play, and eliminated and cash-out states handled inside the same lifecycle.
- problemGameplay continuously changes mass and value through spawning, eating, splitting, food generation, deaths, respawns and cash-outs. In an ordinary arena game mass is visual state; here it is money, so a small accounting error compounds into a real economic error.responseSeparate simulation / economy policy from presentation, keep the ledger authoritative server-side, and make food / value creation follow explicit economic rules rather than arbitrary client state.
- problemWhere randomness affects economically meaningful behaviour, players would otherwise have to trust a hidden server-side RNG result.responseUse commit-reveal for that randomness, so a result can be checked against a commitment made before the outcome was known.
07 / technical decisions
04 entries · chosen / why / cost- D-01
- chosen
- Make the game server authoritative
- why
- Client-controlled positions, collisions or economic events would make cheating and state divergence unacceptable in a game where gameplay can affect value.
- cost
- More networking complexity, reconciliation work and server load.
- D-02
- chosen
- Commit-reveal for economically relevant randomness
- why
- Players should be able to verify that a random outcome was not selected after the system knew which result would be favourable.
- cost
- Additional protocol and state complexity compared with ordinary server-side RNG.
- D-03
- chosen
- PostgreSQL for durable application / economic state
- why
- The durable side of the game needs transactional, queryable state rather than relying on ephemeral simulation memory.
- cost
- Durable persistence should not sit in the hot simulation path, so the game needs a deliberate boundary between realtime state and persisted state.
- D-04planned
- planned
- Introduce Redis as the realtime / ephemeral scaling layer when needed
- why
- High-frequency or short-lived state should not force PostgreSQL to become the realtime coordination mechanism.
- cost
- Adds another stateful service, with synchronisation and failure-mode complexity.
08 / implementation
BubbleBet separates realtime simulation from durable economic state.
The authoritative server advances the arena at a target 60 Hz. Player movement, collisions, splitting, eating and lifecycle events are resolved against server-owned state rather than being accepted as client truth.
Economic behaviour is handled through a separate policy layer. Players enter with a defined buy-in and starting mass, while taxation, food generation, deaths, respawns and cash-outs feed into the wider arena economy.
Durable account and game records are persisted in PostgreSQL. The architecture is designed with Redis as a future ephemeral / realtime scaling layer rather than using the relational database as the simulation engine.
09 / outcome + retrospective
BubbleBet has progressed through the core multiplayer arena, game lifecycle, economy and interface work, and is approaching release rather than existing only as a prototype.
Development has included staged simulation testing, lifecycle / state fixes, HUD and overlay work, and continued work on the networking and economic architecture.
Economic state changes the standard game-engine trade-offs. In an ordinary Agar-like game, a temporary desync or lifecycle bug is irritating; in BubbleBet the same class of bug can become an accounting problem.
That forced simulation, lifecycle transitions and economic bookkeeping to be treated as one system, rather than building “gameplay” and “payments” independently.
Explore the current BubbleBet build in your browser.
Open live build ↗ bub.bet