Numbers

Category: Systems Architecture & Economy Logic
Context: Found within the MapTool codebase, Numbers is an experimental game built around mathematical equalization, punishing economy loops, and Kairos-buffered randomness. The primary objective is to maintain a “baseline” (0) against chaotic, procedurally generated numerical inputs over a strict 20-second run.

This prototype is intentionally sparse. The actual in-game pieces are mostly a ticket shell, primitive shapes, TMPro numerals, and polarity flicker. The tension comes from timing and accounting pressure rather than ornamental art.
Ticket base sprite used by the Numbers target prefab.

Ticket Base
The actual sprite assigned to Ticket.prefab, used as the falling shell for each number target.

Circle primitive sprite used by the Numbers eye and orb prefabs.

Circle Primitive
Used by the eye and orb prefabs for simple, readable feedback elements around the playfield.

Hexagon primitive sprite used by Numbers divider and obstacle prefabs.

Hexagon Primitive
Used by divider, edge, normal, and obstacle prefabs to keep the board language abstract and mechanical.

Kairos Game Loop

graph TD
    A[Start 20 second run] --> B[Initialize Eris config]
    B --> C[KairosBufferManager fetches 5000 bytes]
    C --> D[Buffered entropy source drives spawns]
    D --> E[BaselineManager spawns numbered targets]
    E --> F{Player clicks target}
    F --> G[clickedPoints moves away from or toward zero]
    G --> H{Timer expired?}
    H -- No --> D
    H -- Yes --> I{clickedPoints == 0}
    I -- Yes --> J[Perfect baseline: plus 3 entropy]
    I -- No --> K{abs bank <= baselineMargin 2}
    K -- Yes --> L[Near baseline: plus 1 entropy]
    K -- No --> M{bank >= minWithdrawal 10}
    M -- Yes --> N[Apply 5 percent house cut]
    N --> O{post cut > taxThreshold 50}
    O -- Yes --> P[Apply 15 percent tax]
    O -- No --> Q[Keep post-cut score]
    M -- No --> R{bank > 0}
    R -- Yes --> S[Below withdrawal: house keeps all]
    R -- No --> T[Debt run recorded]

Kairos Buffer

To ensure the unpredictable nature of the numbers the player must equalize, the game hooks into the Occybyte.Eris API.

However, calling an external API every time an object spawns would cause massive lag. To solve this, KairosBufferManager acts as an asynchronous queue. At the start of the game, it fetches a payload in a single call, fills a 5000-byte buffer, and swaps the runtime over to a buffered entropy source. This provides Kairos randomness without stalling the spawn loop.

Kairos Randomness Flow

This was a deliberate design choice: the native Unity randomness tended to cluster heavily after several runs, creating predictable clumps that ruined the balancing act. By shifting to Kairos randomness via the API package, seeds could be preserved as a hexseed for exact reproducibility. It effectively only required an API key baked into the game to pull from the server. While packing the API key client-side is obviously weak security, for a functional prototype and balancing test it gave exactly the reproducibility the experiment needed.

The Equalization Economy & Taxes

The core loop, evaluated inside GameManager.cs upon timer completion (EndGame()), actively punishes the player for deviating from the mathematical baseline (0). The player amasses a sliding clickedPoints integer by interacting with targets.

  1. Perfect Baseline: If clickedPoints == 0 at the end of the timer, the player earns +3 Entropy Points.
  2. Near Baseline: If the run lands within the baselineMargin (+/-2), it still awards +1 Entropy Point.
  3. The House Cut: If the player misses zero but reaches the minWithdrawal threshold (10), the game first skims a flat 5% off the top via houseEdgeRate.
  4. Government Tax Bracket: If the post-house-cut total exceeds taxThreshold (50), the system applies an additional 15% tax through taxRate.
  5. Debt & Loss: If the score falls below zero, the run is flagged wasDebt = true and accrues nothing. If it stays positive but below withdrawal, the house confiscates the entire pot.

This design aggressively discourages “number go up” idle mechanics. Success requires frantic, precise mathematical counter-balancing to avoid the punishing, multi-layered tax brackets.

Why The Visuals Stay Minimal

Base.cs drives the readable part of the presentation at runtime:

That restraint is intentional. The game is supposed to feel like a hostile accounting toy with abstract geometry, not a decorative collectible loop.