How I built it:
• Rive CLI: a coding agent wrote the entire scene in RML (art, view model, state machine, listeners).
The CLI compiled it, ran the Luau unit tests, took headless screenshots, and played the game
automatically (simulated mouse, clicks and SPACE, reading the soul count back through --data-dump)
until all 49 checks passed. Then rive push sent it to the Editor and --publish=web put it live.
• GPU Canvas: two WGSL shaders. fogShader.wgsl draws drifting fbm fog, darkness with a soft
candle-lit hole that follows the lantern, moonlight, seven drifting will-o'-wisps, and the fog
clearing in the finale. flameShader.wgsl is the procedural candle flame that leans as you swing. Both
get uniforms from Luau every frame.
• Scripting: Luau drives both GPU passes, the game rules and the pendulum spring, with 11 unit tests.
• Data Binding: an 18+ property view model drives the lantern position and swing, each soul's reveal,
the eyes in the dark and the moon's halo.
• State Machines: 8 layers (ambient, one per soul, candle, finale) and click listeners that free
souls with no code.
• Human touch: in the Rive Editor I repainted the jack-o'-lantern's glow by hand (possessed pink eyes
and mouth, magenta nose). It's in the video.