PANDAMONIUM: THE GAME. You are the event loop.
The rules
They are the HTML event loop’s rules, unmodified. The game’s frames are slowed down between 48 and 138 times, depending on the wave, so that a person can be the loop. That is the only change.
- Take one giant panda. A task: a click, a timer, a message. Only one is ever in the enclosure. §7.2
- Then drain every red panda. Microtasks: promise reactions, await continuations, queueMicrotask. All of them, including the ones they queue while you are draining. An
awaitchain shows you one red panda at a time. §7.1 - Then bamboo, if a frame is due. The render step. It waits for the red pandas, and the next giant panda waits for it. §7.3
- Possums block their lane. A leak: it looks dead and is still referenced. Remove the reference and it becomes garbage. §7.5
- Trash pandas are not yours. The garbage collector. It eats the curb when it feels like it and pays you for it. Fill all 12 places on the curb and the world stops while it catches up. §7.4
Losing
You have 3 tabs. One crashes when you serve out of order, when the task queue passes 8 and input starts getting dropped, or when 3 frames in a row fall due while the bamboo is still waiting.
Scoring
In JD. Giant panda 3, red panda 1, bamboo 2, released possum 5, each bag a trash panda eats 1. Every 15 clean serves in a row add one to the multiplier, up to ×4. A mistake resets it.
Controls
- One player
- A S D, J K L or ← ↓ → for the three lanes. Space removes the reference.
- Couch co-op
- One keyboard, one event loop. P1 A S D, release W. P2 J K L, release I. Both can serve any lane. Cooperate.
- Gamepad
- X, A, B for the lanes, Y to release, Start to pause. A second pad is P2.
- Everything else
- Esc or P pauses. M toggles sound, which starts off. The buttons under the screen work with a thumb.
The field guide runs the same rules against your browser’s real event loop.