Engine Formats
Every export format, the files it writes, their keys and how stable each one is.
mode8 export packs your frames into one atlas and then writes it out for the engines you name with --formats. This page lists every format, the exact files it writes for --name hero, the keys in its JSON files and its stability. The how-to lives in Exporting to Game Engines.
Note
This page is generated from mode8 schema --section formats and a real export in every format by docs/manual/_tools/gen_reference.py. To change it, change Mode 8 (or the prose in the generator) and run the generator with --write; a test fails when this page is out of date.
Choosing formats#
Pass a comma-separated list. The default is atlas,godot,gif:
mode8 export frames/ --out-dir out --name hero --formats atlas,godot,pixi,phaserFormats that need the atlas (most of them) write it too, so you never have to ask for atlas explicitly. <name> below is --name (default sprite).
All export formats#
| Format | Group | Stability | Files |
|---|---|---|---|
atlas | core | stable | <name>_atlas.png, <name>_atlas.json |
godot | godot | stable | <name>.tres (+ <name>_atlas.png) |
gif | core | stable | <name>.gif (the idle or first loop), <name>_<anim>.gif per animation |
godot_scene | godot | stable | <name>.tscn (+ <name>.tres, <name>_atlas.png; a character scene also mode8_actor.gd) |
normal | godot | stable | <name>_atlas_n.png, <name>_lit.tres, <name>_lit_frames.tres (+ <name>_atlas.png) |
emission | godot | stable | <name>_atlas_e.png, <name>_emission.gdshader, <name>_emission.tres (+ <name>_atlas.png) |
pixi | engine | stable | <name>_pixi.json (+ <name>_atlas.png, <name>_atlas.json) |
phaser | engine | stable | <name>_phaser_atlas.json, <name>_phaser_anims.json (+ <name>_atlas.png, <name>_atlas.json) |
love2d | engine | stable | <name>.lua, mode8_sprite.lua (the MIT runtime helper) (+ <name>_atlas.png, <name>_atlas.json) |
css | engine | stable | <name>.css, <name>_demo.html (+ <name>_atlas.png, <name>_atlas.json) |
indexed | engine | stable | <name>_indexed.png, <name>.hex (+ <name>_atlas.png, <name>_atlas.json) |
unity | engine | experimental | <name>_atlas.png.meta, <name>_<anim>.anim + <name>_<anim>.anim.meta per animation, <name>.controller + <name>.controller.meta (+ <name>_atlas.png, <name>_atlas.json) |
Warning
unity is experimental: file contents may change in any minor release. Everything else on this page is stable under the v1 contract.
Formats in detail#
atlas#
The shared packed sprite sheet: a PNG plus TexturePacker-style JSON-hash metadata (frames, meta), with Mode 8's animations and gameplay boxes. Most other formats reuse this atlas.
Stability: stable. Writes for --name hero: hero_atlas.json, hero_atlas.png.
Top-level keys of hero_atlas.json: frames, meta, animations, boxes.
Report section atlas: image, json, size, frames, extrude, power_of_two.
godot#
A Godot 4 SpriteFrames resource whose AtlasTexture regions point into the atlas, one animation per inferred (or --animations) animation. See Godot.
Stability: stable. Writes for --name hero: hero.tres, hero_atlas.png.
Report section godot: tres, atlas_res_path, animations, frames.
gif#
An animated, upscaled preview GIF (--gif-scale, --fps). For eyeballing, not for games.
Stability: stable. Writes for --name hero: hero.gif, hero_idle.gif, hero_walk.gif.
Report section gif: path, fps, scale, frames, animation, transparent, animations.
godot_scene#
A Godot 4 .tscn scene with the sprite, its feet pivot and per-frame hit / hurt boxes (refined by --parts / --facing). See Godot.
Stability: stable. Writes for --name hero: hero.tres, hero.tscn, hero_atlas.png, mode8_actor.gd.
Report section godot_scene: tscn, kind, pivot, body, hitbox_frames, boxes, actor_script, files.
normal#
A palette-quantized normal-map atlas plus a CanvasTexture resource for Godot 2D lighting (--bevel, --strength, --levels). See Lighting Maps.
Stability: stable. Writes for --name hero: hero_atlas.png, hero_atlas_n.png, hero_lit.tres, hero_lit_frames.tres.
emission#
An emission atlas of the glowing pixels plus a Godot shader and material (--emissive and friends). See Lighting Maps.
Stability: stable. Writes for --name hero: hero_atlas.png, hero_atlas_e.png, hero_emission.gdshader, hero_emission.tres.
pixi#
A PixiJS Spritesheet JSON (frames, animations, meta) for PixiJS v7 and v8. Every frame carries a normalized anchor from the feet pivot; per-animation fps / loop live under meta.mode8.
Stability: stable. Writes for --name hero: hero_atlas.json, hero_atlas.png, hero_pixi.json.
Top-level keys of hero_pixi.json: frames, animations, meta.
Report section pixi: spritesheet_json, files, frame_count, animations, pivot_clamped, stability.
phaser#
Phaser 3 files: a JSON-hash atlas with a per-frame feet anchor (load it with this.load.atlas) and Animation Manager JSON (load it with this.load.animation).
Stability: stable. Writes for --name hero: hero_atlas.json, hero_atlas.png, hero_phaser_anims.json, hero_phaser_atlas.json.
Top-level keys of hero_phaser_anims.json: anims, globalTimeScale.
Top-level keys of hero_phaser_atlas.json: frames, meta, animations, boxes.
Report section phaser: atlas_json, anims_json, files, animations, pivot_clamped, stability.
love2d#
A self-contained Lua module that returns a table (image, frames, animations, pivot, ...), loadable with love.filesystem.load("hero.lua")().
Stability: stable. Writes for --name hero: hero.lua, hero_atlas.json, hero_atlas.png, mode8_sprite.lua.
Report section love2d: module_lua, runtime_lua, files, frame_count, animations, stability.
css#
A stylesheet with one class per frame (background-position) and one @keyframes animation per animation, plus a self-contained demo page.
Stability: stable. Writes for --name hero: hero.css, hero_atlas.json, hero_atlas.png, hero_demo.html.
Report section css: stylesheet, demo_html, files, class_prefix, frame_classes, animations, animation_classes, keyframes, stability.
indexed#
A palette-indexed (mode P) PNG of the atlas, index 0 transparent, plus the palette as .hex lines. Pass --palette to fix the color table order.
Stability: stable. Writes for --name hero: hero.hex, hero_atlas.json, hero_atlas.png, hero_indexed.png.
Report section indexed: png, hex, files, colors, transparent_index, stability.
unity#
A Unity TextureImporter .meta that imports the atlas as a pixel-art sprite sheet in Multiple mode, one named sprite per frame (--pixels-per-unit, --guid-namespace).
Stability: experimental. Writes for --name hero: hero.controller, hero.controller.meta, hero_atlas.json, hero_atlas.png, hero_atlas.png.meta, hero_idle.anim, hero_idle.anim.meta, hero_walk.anim, hero_walk.anim.meta.
Report section unity: meta, files, guid, pixels_per_unit, sprite_count, pivot_clamped, clips, controller, stability.
Other generators#
Autotiles, UI kits and bitmap fonts have their own --formats:
| Command | Formats (stability) | Files |
|---|---|---|
mode8 autotile | godot (stable), tiled (stable) | <name>_autotile.png, <name>_autotile.json, <name>_base.png; godot: <name>.tres; tiled: <name>.tsx |
mode8 ui | png (stable), json (stable), godot (stable) | <name>_<piece>.png per piece (png), <name>_ui.json (json), <name>_<piece>_stylebox.tres + <name>_<piece>_texture.tres (icon pieces) + <name>_button_focus_stylebox.tres + <name>_theme.tres + <name>_health_bar.tscn + <name>_preview.tscn (godot); with the builtin font also <name>_font.png + <name>_font.fnt; --preview PNG writes a mock screen |
mode8 font | png (stable), fnt (stable), json (stable) | <name>.png (png), <name>.fnt (fnt, AngelCode BMFont text with kerning pairs), <name>_font.json (json) |
Versioned manifests#
<name>_ui.json,<name>_font.jsonand<name>_autotile.jsoncarryformat_version(their own format, an integer) andmode8_version(the app that wrote them). The autotile JSON also keeps its olderapp/versionkeys.- The atlas JSON keeps TexturePacker's
meta.app/meta.version. - A project's
layers.jsoncarriesversion, andmode8.tomlcarriesversion(see Project Format). - A format version only increases in a major release, unless the change is additive.
Animation timing#
mode8 anim writes a timing sidecar next to its frames, <prefix>.anim.json (report key timing_sidecar). It records each animation's frames, fps and loop. mode8 export and mode8 import of those PNGs read it, so an animation keeps its own frame rate instead of falling back to --fps; export --animations accepts the file too:
mode8 anim hero.png --rig humanoid --out-dir frames --prefix hero
mode8 export frames/ --out-dir out --name hero --formats atlas,godotThe export report names the sidecar it used in timing_sidecar (null when there was none). Every animation gets its own tag in the atlas JSON meta.frameTags, in every engine format.
Quality report#
mode8 lint --quality (MCP mode8_lint with quality, Python check_quality) adds an advisory quality report. Its rules are orphan_pixels, jaggies, ramp_harmony. Its keys:
| Key | Stability |
|---|---|
pass | stable |
score | experimental |
score_experimental | stable |
rules | stable |
size | stable |
issues | stable |
metrics | stable |
The score ranges 0..10 and is experimental (advisory heuristic; its weighting may change in any release). Metric keys: orphan_pixels, orphan_ratio, flat_orphan_ratio, jaggy_kinks, ramp_count, ramp_issues, near_duplicate_pairs, rare_colors. Each issue has rule, severity, msg, count, pixels.
See also#
- Exporting to Game Engines for loading code per engine.
- Godot for scenes, hitboxes and
.resatlases. - Quality Checks for lint and the quality report.