LANTERN: A Haunted Graveyard Game Built with Rive and LuauLANTERN: A Haunted Graveyard Game Built with Rive and Luau
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
LANTERN is a small haunted game. Your cursor is the hand holding a jack-o'-lantern in a graveyard drowned in fog. Its flickering candle is the only light, and five lost souls hide in the dark: Wisp, Bashful, Old Tom in his top hat, tiny Pip and the Duchess. They only appear inside your light. Click one to set it free: it twirls up and joins the moon, and the counter fills. Free all five and the fog lifts, the moon blooms and the pumpkin grins. Press SPACE to blow out the candle, and something in the dark opens its eyes.
Why: I wanted Halloween to feel like being alone at night with one small light, where moving the cursor is the whole story. The lantern swings on a spring when you move, the flame leans into the swing, and the souls fade in at the rim of the light, so the motion is the interaction.
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.
It also adapts to any screen size: the fog fills the window and the scene scales to fit.
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started