game-vfx
A skill for Claude Code (and any coding agent) that makes real-time game VFX for three.js from AI video: Seedance films each element of a spell alone on black, a script turns every clip into a 64-frame flipbook, and the spell is code that layers those flipbooks with sparks, ribbons, lightning, rune circles, decals, ice, rocks, light and camera shake. Six finished spells, twelve flipbooks and the runtime come with it.
Use it
Give your agent the skill, then ask for effects in your game ("a frost nova when the boss slams the ground"):
git clone https://git.patch.gg/rehan/game-vfx.git && mkdir -p ~/.claude/skills && ln -s "$PWD/game-vfx/skills/game-vfx" ~/.claude/skills/game-vfx
Other agents: point them at skills/game-vfx/SKILL.md. It needs three.js, Python 3 with numpy and Pillow, ffmpeg,
and a fal.ai key (FAL_KEY) for new Seedance clips; the six spells and twelve flipbooks work without one.
How it works
- Plan the spell as a timeline: charge, release, travel, impact, what it leaves behind.
- A pattern video (optional): a screenshot of your game plus the spell in words, through Seedance image-to-video. It shows the spell in your own scene, with its timing. A reference, never shipped.
- Element clips: each picture element (a fireball, smoke, a burst, a vortex seen from above) filmed alone on pure black by Seedance text-to-video, with prompt rules that make clips usable.
- Flipbooks:
make_flipbook.pykeeps the seconds that are alive, crops, lifts black to alpha and packs 8 x 8 frames. - Code: the spell schedules its layers on the runtime (
runtime/), and you compare it with the pattern.
Cost: about $1.90 per element clip and $2.40 per pattern on Seedance 2.5 (fal, 720p).
What's in it
| Path | What |
|---|---|
skills/game-vfx/SKILL.md | the workflow, the prompt rules and the craft that made the spells good |
skills/game-vfx/runtime/ | the effect runtime: flipbook sprites with soft depth fade, ribbons, bolts, decals, rune circles, shockwaves with heat haze, ice, debris, a light pool, shake, and an HDR pipeline (bloom, ACES); six spells; Patch's mannequin as a caster |
skills/game-vfx/scripts/ | Seedance on fal, the flipbook maker, sound effects, a 60 fps recorder |
skills/game-vfx/library/ | 12 flipbooks: fire burst, fireball, smoke, plasma orb, lightning, big explosion, ground fire, fire pillar (+ loop), frost from above, arcane burst and vortex |
skills/game-vfx/reference/ | craft notes with numbers, the runtime's API, recording and sound, prompts that worked |
examples/minimal/ | the smallest game that uses it |
demo/ | this page's demo: the dusk arena with the six spells |
Credits
- Method after @CanItCode's Seedance-to-Niagara workflow; the inferno after HK RealTime VFX's UE5 fire spell.
- Flipbooks: made for this project with Seedance 2.5 (ByteDance) on fal. CC0.
- Patch's mannequin (CC0) and its clips from Quaternius' Universal Animation Library 1 and 2 (CC0).
- The arena: Poly Haven's Kiara 9 Dusk, Rock Tile Floor, Rock Boulder Dry, Rabdentse Ruins Wall, Gothic Statue,
Boulder 01, Namaqualand Boulder 02 and Dead Tree Trunk 02 (CC0); Soil Studio by Chiro Visuals through Patch's
soil-and-grass block (MIT; its ambientCG textures CC0). Their credit lines are in
demo/public/credits/. - Code: MIT (LICENSE). Art: CC0.