◀ All systems documents

Punball · systems design

Pencil, doors, and borrowed time

A drawn dungeon with an active world clock. This page describes the live cabinet, including the limits of its current rules integration.

Cabinet 02Audit 16 September 2026Engine React + SVG + TypeScript simulation

§ 1

A continuous descent

Choose Fighter, Archer, or Wizard and explore one generated dungeon about 1,000 cells deep. Rooms, branching shapes, secret entrances, and a final boss form one continuous map. Rooms remain hidden until entered. The viewport draws only nearby content.

Arrow keys or WASD step. Bump an adjacent monster to attack. Tap a monster for a legal ranged shot, or use the ranged button to choose a nearby target. Touch supports swipes, taps, and a direction pad. Wait spends an action in place.

§ 2

The live classes

Fighter begins with 30 HP and strong melee. It has no ranged attack and gains one HP on a kill. Archer begins with 20 HP and 14 arrows; its shot costs one arrow and reaches six cells. Wizard begins with 15 HP and ten mana; a zap costs two mana and reaches five cells. One mana returns every three actions.

Legal player attacks deal calculated damage directly. They do not make a displayed d20 attack roll. Melee uses class attack, level, bonuses, and the Fighter’s weapon tier. Ranged damage uses the ranged base, weapon tier, half the level increase, and bonuses. Each level adds three maximum and current HP.

§ 3

Time and pursuit

All actors bank energy. An action normally costs 100. Player speed is 10 in the live scheduler; monster species have different rates. Rough terrain increases the player’s action cost. Monsters within twenty cells can act, including in corridors.

After 650 ms of inactivity, a soft clock advances the world at 850 ms intervals. Hiding the browser tab pauses this clock. Waiting on screen is therefore not a pause button. Monsters use line of sight, hearing, alert memory, and pathfinding.

Doors occupy edges between cells. Opening or forcing one spends an action. Regular monsters cannot cross closed doors; ghosts can ignore them. The current player UI opens doors but does not expose a close-door action.

§ 4

Loot, traps, and trade-offs

Weapon, armor, and secondary tracks are class-specific tiers. Better drops equip automatically. A duplicate or worse drop converts to 25 gold. A two-handed Fighter weapon removes the shield bonus. Quivers and focuses increase ranged-resource capacity.

Potions heal up to eight HP. Elixirs add four maximum HP and one bonus attack. Resource drops restore six arrows or mana up to the current cap. Scrolls provide a limited magic attack. An altar fully heals once, but makes a noise that alerts nearby enemies.

Trap visibility uses passive Sight and the class sight range. Stepping on an unsprung trap triggers it. Monsters can also spring traps. The live rules do not provide a separate player disarm action. Quest givers assign targets, and some encounters offer temporary allies.

§ 5

Actual scoring

Opening a door gives 12 points; forcing a locked door gives 30. First entering a room gives 40. A secret gives 260. A normal kill gives nine times the monster’s maximum HP. Clearing a room adds 90 + 4 × room index. The final boss adds 6,000. Quests carry their own listed score rewards.

Gems give 140, potions 10, elixirs 220, scroll pickups 60, and newly equipped gear 55. Coins add gold rather than score. The run’s final result adds 40 times its furthest room index. Depth is measured by rooms, not separate floor maps.

§ 6

What this audit changed

The code audit on 16 September 2026 replaced claims that did not match the live component. The separate rules module has d20 ability and gear tables plus balance helpers. The live cabinet imports its class Sight data and trap definitions, but uses its own HP, damage, resource, and gear-tier rules.

Tests for the separate rules tables do not prove that every table is wired into the browser game. Old class-depth benchmarks are not presented here as current live-game balance results. The authoritative behaviour is the GraphPaperDungeon component together with its simulation and cartography modules.