Manual Make

On this page
  1. Make an effect
  2. Every effect
  3. Effects made from a sprite
  4. Size, length and variety
  5. Export the frames
  6. Check them
  7. Next

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.

Every standalone effect frame by frame: impact, slash arc, explosion, smoke puff and sparkle
The standalone effects, one row each

Make an effect#

Start from a starter project, so the effects use its palette:

terminal
$ 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,gif

The 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.

The explosion as it plays: a flash, a fiery ring and falling debris
explosion, played at 12 fps

Every effect#

terminal
$ 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        standalone
Show 6 more lines
  dust_puff      standalone
  heal           standalone
  pickup         standalone

Next:
  mode8 fx --kinds explosion --size 32x32 --out-dir fx
EffectNeeds --sourceWhat it draws
hitflashyesthe sprite alternating with a solid light silhouette, the classic "took damage" blink
dissolveyesthe sprite breaking into a pattern of pixels that thins out to nothing
spawnyesdissolve played backward: the sprite assembles from pixels
shatteryesthe sprite crumbling into scattered pixels
afterimageyestrailing copies behind the sprite, for dashes and speed
outline_pulseyesan outline that brightens and fades around the sprite, for power-ups and selection
impactnoa flash that bursts into a spiky star and sparks
slash_arcnoa sword arc sweeping across the frame
explosionnoa flash, a ring of fire and debris
smoke_puffnoa puff of smoke that grows and breaks up
sparklenoa 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:

terminal
$ 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
The starter slime through hitflash, dissolve, spawn, shatter, afterimage and outline_pulse
The six sprite effects on the starter slime

Asking for a sprite effect without a sprite is an input error that says what is missing:

terminalexit 2
$ 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.png

Size, length and variety#

  • --frame-count N sets how many frames each effect gets.
  • --size WxH sets the canvas of the standalone effects. Each has its own default, such as 32x32 for explosion and 16x16 for sparkle. Sprite effects always use the sprite's size.
  • --seed N changes 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 NAME puts a name in front of the file names, so several versions can share a folder.
  • --palette overrides the project's palette.
terminal
$ 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,gif

The 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:

terminal
$ 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/fx

You 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:

fx-timing.json
{
  "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:

terminal
$ 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/fx

Exporting 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:

terminal
$ mode8 verify --assets-dir fx
✓ 42 assets checked: all good

Next#

  • 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.