Effects
Hit flashes, dissolves, explosions, sword arcs and sparkles, drawn in your palette as animation frames ready to export.
mode8 fx draws short effects as numbered PNG frames in your palette. There are two families: effects made from one of your sprites (flash it when it is hit, dissolve it when it dies) and standalone effects drawn from scratch (an explosion, a sword arc, a sparkle). They run on the CPU and give the same pixels every time, and every frame passes the same checks as the rest of your art.

Make an effect#
Start from a starter project, so the effects use its palette:
$ mode8 init my-game --template platformer
✓ Created the platformer starter in my-game/
26 assets · palette nes_master_gothic · lint 26/26 passed
hero, slime, ground, wall, window, pillar, ledge_left, ledge, ledge_right, stairs, +6 more + 10 UI pieces
UI kit → my-game/godot/art/ui/ · font → my-game/godot/art/font/
Godot project → my-game/godot/ (runs main.tscn)
Next:
cd my-game
godot -e --path godot
mode8 studio .
mode8 export hero
$ cd my-game
$ mode8 fx --kinds explosion,sparkle --out-dir fx --sheet shots/fx.png
✓ FX explosion, sparkle: 16 frames → fx/
sheet shots/fx.png
timing → fx/fx.anim.json (export keeps the per-frame durations)
palette nes_master_gothic from mode8.toml
Next:
mode8 export fx --out-dir exports/fx --name fx --formats atlas,gifThe frames are fx/explosion_00.png, fx/explosion_01.png and so on. --sheet writes a zoomed contact sheet with one labeled row per effect, which is the quickest way to look at them.

Every effect#
$ mode8 list fx
14 effects
hitflash needs --source SPRITE
dissolve needs --source SPRITE
spawn needs --source SPRITE
shatter needs --source SPRITE
afterimage needs --source SPRITE
outline_pulse needs --source SPRITE
impact standalone
slash_arc standalone
explosion standalone
smoke_puff standalone
sparkle standaloneShow 6 more lines
dust_puff standalone
heal standalone
pickup standalone
Next:
mode8 fx --kinds explosion --size 32x32 --out-dir fx| Effect | Needs --source | What it draws |
|---|---|---|
hitflash | yes | the sprite alternating with a solid light silhouette, the classic "took damage" blink |
dissolve | yes | the sprite breaking into a pattern of pixels that thins out to nothing |
spawn | yes | dissolve played backward: the sprite assembles from pixels |
shatter | yes | the sprite crumbling into scattered pixels |
afterimage | yes | trailing copies behind the sprite, for dashes and speed |
outline_pulse | yes | an outline that brightens and fades around the sprite, for power-ups and selection |
impact | no | a flash that bursts into a spiky star and sparks |
slash_arc | no | a sword arc sweeping across the frame |
explosion | no | a flash, a ring of fire and debris |
smoke_puff | no | a puff of smoke that grows and breaks up |
sparkle | no | a four-pointed star that grows and shrinks |
Effects made from a sprite#
The six sprite effects take the sprite with --source. Their frames are the sprite's size and use only the sprite's own colors (and the palette's), so they match it exactly:
$ mode8 fx --kinds hitflash,dissolve,shatter --source assets/slime/master.png --out-dir fx/slime
✓ FX hitflash, dissolve, shatter: 18 frames → fx/slime/
timing → fx/slime/fx.anim.json (export keeps the per-frame durations)
palette nes_master_gothic from mode8.toml
Next:
mode8 export fx/slime --out-dir exports/slime --name slime --formats atlas,gif
Asking for a sprite effect without a sprite is an input error that says what is missing:
$ mode8 fx --kinds hitflash --out-dir fx/hit
error: fx kind(s) hitflash need a source sprite (--source master.png)
example: mode8 fx --kinds explosion,sparkle --size 32x32 --out-dir fx --sheet shots/fx.pngSize, length and variety#
--frame-count Nsets how many frames each effect gets.--size WxHsets the canvas of the standalone effects. Each has its own default, such as 32x32 forexplosionand 16x16 forsparkle. Sprite effects always use the sprite's size.--seed Nchanges the random parts (the debris of an explosion, the pieces of a shatter) while keeping the run repeatable: the same seed gives the same frames.--prefix NAMEputs a name in front of the file names, so several versions can share a folder.--paletteoverrides the project's palette.
$ mode8 fx --kinds explosion --frame-count 8 --size 48x48 --seed 7 --prefix boss --out-dir fx/boss
✓ FX explosion: 8 frames → fx/boss/
timing → fx/boss/boss.anim.json (export keeps the per-frame durations)
palette nes_master_gothic from mode8.toml
Next:
mode8 export fx/boss --out-dir exports/boss --name boss --formats atlas,gifThe frames are fx/boss/boss_explosion_00.png to boss_explosion_07.png.
Export the frames#
Effects export like any other frames. Each effect becomes its own animation, named after its frames:
$ mode8 export fx --out-dir exports/fx --name fx --formats atlas,godot,gif
✓ Exported fx (16 frames) → exports/fx/
atlas, godot, gif · 6 files
animations explosion, sparkle
preview exports/fx/fx.gif + one GIF per animation (2)
Godot exports/fx/fx.tres
palette nes_master_gothic from mode8.toml
Next:
mode8 verify --assets-dir exports/fxYou get one atlas, a Godot SpriteFrames resource with an explosion and a sparkle animation, a preview GIF of everything and one GIF per effect.
By default every animation plays at 8 fps and loops. Most effects should play once, and faster. Write their timing in a small JSON file, one entry per animation with its frames, fps and loop:
{
"explosion": {"frames": ["explosion_00", "explosion_01", "explosion_02", "explosion_03", "explosion_04", "explosion_05"], "fps": 12, "loop": false},
"sparkle": {"frames": ["sparkle_00", "sparkle_01", "sparkle_02", "sparkle_03", "sparkle_04", "sparkle_05"], "fps": 12, "loop": true}
}and pass it to the export:
$ mode8 export fx --out-dir exports/fx --name fx --formats atlas,godot,gif --animations fx-timing.json
✓ Exported fx (16 frames) → exports/fx/
atlas, godot, gif · 6 files
animations explosion, sparkle
preview exports/fx/fx.gif + one GIF per animation (2)
Godot exports/fx/fx.tres
palette nes_master_gothic from mode8.toml
Next:
mode8 verify --assets-dir exports/fxExporting covers the atlas, the engines and where timing comes from.
Check them#
Every frame is checked as it is written. To check a folder again later, for example after you touched up a frame by hand:
$ mode8 verify --assets-dir fx
✓ 42 assets checked: all goodNext#
- Exporting: atlases, GIFs and every engine format.
- Animation: walk, attack and idle frames from a master sprite.
- UI and fonts: the HUD the effects play behind.