Manual Start

On this page
  1. 1. Make a project
  2. 2. Draft the pose
  3. 3. Generate the sprite
  4. 4. Animate it
  5. 5. Check it
  6. 6. Export it for Godot
  7. 7. Keep it in the project
  8. What you made
  9. Next

Your First Character

Make a hero of your own from start to finish: a draft, a generated sprite, its animations, the checks and a Godot export.

This walkthrough makes one character the way Mode 8 is meant to be used: you fix the pose with a draft, a local model paints it, you keep the best candidate, and that one sprite becomes every frame of its animations. At the end the hero is a Godot 4 scene and a project asset you can paint on in the Studio.

One step, generation, needs ComfyUI and the kleinedit models: set them up first with Set up local AI. Everything else runs on the CPU. On a typical GPU the whole page takes a few minutes.

text
init -> draft -> gen -> anim -> verify -> export -> import
CPU     CPU      GPU    CPU     CPU       CPU       CPU

1. Make a project#

terminal
$ mode8 init my-game
✓ Created project my-game/
  palette nes_crimson_hero · new assets 64x72 · ComfyUI http://127.0.0.1:8188

Next:
  cd my-game
  mode8 draft knight_right --out drafts/hero.png
  mode8 studio .
  mode8 doctor   # check the local AI setup for mode8 gen
terminal
$ cd my-game

A project is a folder with a mode8.toml. Inside it, every command uses the project's palette and sizes unless you say otherwise; Projects has the details.

2. Draft the pose#

A model asked for "a knight" draws a different size, facing and silhouette every time. A draft fixes all three before any AI runs: it is a shaded blockout of the pose at the final size, in your palette.

terminal
$ mode8 draft knight_right --out drafts/hero.png
✓ Drafted knight_right (64x72) → drafts/hero.png
  palette nes_crimson_hero from mode8.toml

Next:
  mode8 gen 'armored knight with plumed helm, side view, facing right' --draft drafts/hero.png --out sprites/hero.png   # needs ComfyUI
  mode8 anim drafts/hero.png --rig humanoid --out-dir frames/hero
  mode8 studio .
The knight_right draft: a shaded blockout of a knight with a plumed helm, kite shield and sword, facing right
The draft, at 4x

knight_right is one of 20 archetypes, from wolves to mechs to isometric towers (mode8 list archetypes). You can also turn your own concept art into a draft; see Sprites.

3. Generate the sprite#

Describe the subject in plain words and hand Mode 8 the draft:

terminalneeds ComfyUI
$ mode8 gen "armored knight with a crimson cloak, kite shield and sword" --draft drafts/hero.png --n 4 --seed 1001 --keep-candidates shots/hero --sheet shots/hero-sheet.png --out sprites/hero.png
✓ Generated sprites/hero.png (64x72)
  best of 1 candidate (#1), 1 passed · score 14.064 · 8 colors
    preset kleinedit · 2 passes
  art 64x72 px on a 12 px grid, kept 1:1
  palette fit 0.045 (fair) · pose match 0.86 · fidelity 0.66 · no outline added
  review sheet → shots/hero-sheet.png
  candidates → shots/hero/
  palette nes_crimson_hero from mode8.toml
  ! candidate 2 failed: ComfyUI stopped answering while rendering candidate 2;
    it did not answer again within 30s
  ! candidate 3 failed: candidate 3: not rendered (ComfyUI stopped)
  ! candidate 4 failed: candidate 4: not rendered (ComfyUI stopped)
Show 5 more lines
    +1 more warnings (--json for all)

Next:
  mode8 anim sprites/hero.png --rig humanoid --out-dir frames/hero
  mode8 lint sprites/hero.png --quality

Mode 8 asks the model to repaint the draft, four times with seeds 1001 to 1004. Each candidate is snapped onto its own pixel grid, mapped onto the project palette, given a 1px outline where the art has none, and checked against measured quality rules (clean grid, no stray pixels, no leftover background, readable values). The best one is written to sprites/hero.png. The command exits 1 if no candidate passes, and still writes the best so you can judge it yourself.

--keep-candidates keeps every candidate and its raw render, and --sheet puts them side by side, zoomed, with the draft. Look at it before you go on:

The candidate sheet: the draft, then four generated knights at 4x, the chosen one marked
Four candidates from one draft, seeds 1001 to 1004

Not happy? Change the prompt, or try other seeds. Sprites explains prompts, candidates and how the best one is chosen.

4. Animate it#

The approved sprite is now the master. mode8 anim makes the frames by moving the master's own pixels, so the face, the armor and every highlight stay exactly the same from frame to frame:

terminal
$ mode8 anim sprites/hero.png --rig humanoid --prefix hero --out-dir frames/hero --sheet shots/hero-anim.png
✓ Animated 15 frames → frames/hero/
  idle 4, walk 6, jump 1, attack 3, hurt 1  rig humanoid
  strip → shots/hero-anim.png

Next:
  mode8 export frames/hero --out-dir exports/hero --name hero
  mode8 verify --assets-dir frames/hero --check-anim --include-root
Every frame the humanoid rig made from the generated knight: idle, walk, jump, attack and hurt
The frames, at 3x

The humanoid rig makes idle, walk, jump, attack and hurt, and writes their timing next to the frames. Animation covers the other rigs, part maps for sharper motion, and fixing a frame by hand.

5. Check it#

mode8 verify checks every frame against the palette and, with --check-anim, that the feet stay on one line while the hero walks:

terminal
$ mode8 verify --assets-dir frames --check-anim
✓ 15 assets checked: all good
  1 animation checked, 1 stable  (feet 4 px, size 8 px, scaled to the frame height)

Jump and hurt leave the ground on purpose, so verify checks only their sideways drift and says so. Checks explains every rule.

6. Export it for Godot#

terminal
$ mode8 export frames/hero --out-dir exports/hero --name hero --formats atlas,godot,godot_scene,gif
✓ Exported hero (15 frames) → exports/hero/
  atlas, godot, godot_scene, gif · 11 files
  animations idle, walk, jump, attack, hurt
  preview exports/hero/hero.gif + one GIF per animation (5)
    Godot exports/hero/hero.tres
  scene exports/hero/hero.tscn (CharacterBody2D, mode8_actor.gd)
  palette nes_crimson_hero from mode8.toml

Next:
  mode8 verify --assets-dir exports/hero

You get a packed atlas, a Godot 4 SpriteFrames resource, a ready scene (a CharacterBody2D with the sprite on its feet, a collision body and per-frame hitboxes and hurtboxes) and a preview GIF:

The generated knight walking, from the exported preview GIF
exports/hero/hero.gif

Copy exports/hero/ anywhere into a Godot project: the resources find their PNGs by relative path. Godot shows how to use the scene, and Exporting lists the other engines.

7. Keep it in the project#

So far the hero lives in plain folders, which is ideal for scripts and CI. Import it as a project asset to paint on it in the Studio, or to let an agent edit it safely:

terminal
$ mode8 import frames/hero --name hero
✓ Imported hero: 15 frames (64x72) → assets/hero/
  palette hero (new) · animations idle, walk, jump, attack, hurt

Next:
  mode8 studio .
  mode8 export assets/hero/frames --out-dir exports/hero --name hero --animations assets/hero/master.m8.json

The import keeps the animations and their timing, picks idle as the master, and records where everything came from in assets/hero/master.m8.json. Open it:

terminal
$ mode8 --json studio .
{
  "ok": true,
  "url": "http://127.0.0.1:8420/?token=Y8YLSUxwkhCwfEcRz8pcfj5q9CKMHNfg",
  "lan_url": null,
  "allowed_hosts": ["127.0.0.1", "::1", "localhost"],
  "host": "127.0.0.1",
  "port": 8420,
  "token": "Y8YLSUxwkhCwfEcRz8pcfj5q9CKMHNfg",
  "project_root": "/home/you/work/my-game",
  "project_initialized": false,
  "comfy_url": "http://127.0.0.1:8188",
  "mode8_version": "1.0.0",
  "license": "AGPL-3.0-only",
  "source_url": "https://github.com/danexpo/mode8"
}

What you made#

text
my-game/
├── mode8.toml
├── drafts/hero.png         the draft
├── sprites/hero.png        the generated master
├── shots/                  candidates, the candidate sheet and the animation strip, for review
├── frames/hero/            the animation frames and their timing (hero.anim.json)
├── exports/hero/           atlas, SpriteFrames, scene, GIF
└── assets/hero/            the project asset the Studio and agents edit

Next#

  • Sprites: portraits, icons, scenes and isometric buildings, and repainting a region.
  • Animation: rigs for wolves, slimes, mechs and ships.
  • Godot: the scene, its boxes and the actor script.
  • MCP server: let an agent do all of this for you.