كهربا

Kahraba

8 PM in Beirut. The state power (كهربا الدولة) browns out and cuts, the way it always does, and the jinn of an old sandstone building come to the windows: the Ghoul between the water tanks, the Si'lewa behind Umm Georges' laundry, the Qarina in the arches, an Ifrit born in generator smoke. Your phone light is all you have until Abu Ali's moteur coughs into life. Made with Rive for the Rive Halloween Challenge.

Get the source and play it Download the video

Play it: install the Rive CLI, clone the repo, run rive . in it. The pointer is your phone light; hold it on a pair of eyes. The video is 52 s with sound.

The story

8 PM, and the state power (كهربا الدولة) is on. For now. The lights stutter the way every Beiruti knows they will, then the building goes dark. Six jinn live here, and in the cut you can see their eyes in the windows. Rest your light on a pair of eyes and the jinn behind them shows itself, reacts, and flees. Find all six and Abu Ali's neighbourhood generator (el moteur, 5 amps) coughs into life, and the six of them sit on the parapet together. Even the jinn pay the subscription. Keep the light on too long and the battery dies, and the whole building opens its eyes.

Stills

In the power cut, the phone light finds the ghoul between the water tanks on the roof as it rears up
The light finds the Ghoul on the roof.
The lit apartment building before the cut, neighbours in the windows, a Lebanese flag on the roof
8 PM, state power on.
Close-up in the dark: the phone light catches the Qarina in the triple arch as she lifts her own phone; her name card reads 3 of 6
Caught: the Qarina lifts her own phone back at you.
The battery died: red and yellow eyes open in every window
The battery died.
The generator is on and six jinn sit on the parapet under the end card reading Happy Halloween from Beirut
Even the jinn pay the subscription.

How it is made

Written in RML, Luau and WGSL with the Rive CLI, and rendered headless with it: every frame of the piece in the video is a rive --screenshot (the breakdown, terminal and credits cards are composed in Python).

Rive CLI + RMLThe file is markup: text, HUD, cards, the inverter switch, the state machine and every keyed animation, verified with rive . --verify.
ScriptingA Luau layout script runs the story clock, the torch, the six jinn (each caught one gathers itself, stretches, shudders and runs, while the camera moves in for a close-up), eyes that move between windows and shut when the light comes near, sparks, smoke and the generator's rumble.
GPU CanvasThe script draws the street twice a frame (albedo and emission) and one WGSL pass lights it: moonlight, window spill, the phone torch, a painted sky, bloom and fog. It also plays the story: the brownout before the cut (the voltage sags to a dirty orange), heat haze over the moteur's chimney with a stuttering sodium light, and the vignette closing in when the battery dies.
Data bindingA view model carries power, phase, jinn found, battery, captions in English and Lebanese Arabic, and the street-light level that dims the neon signs.
State machineFour layers: the lever, the story, one card per jinn found, and the battery warning.
Tuned by handNamed ease curves for every keyed move, the lever's 240 ms overshoot and 3-frame plate knock, the card's elastic settle, the story's timing, the torch path, each jinn's pose and palette, all adjusted by eye against screenshots.