Manual Make

On this page
  1. Draw a tile
  2. What it draws
  3. Side-view pieces
  4. Props, items and animated kinds
  5. HUD portraits
  6. Build an autotile set
  7. Which layout
  8. Edges, physics and variants
  9. From your own tile
  10. When it goes wrong
  11. Next

Terrain and Props

Draw seamless terrain, side-view platforms, props, items and weapons on the CPU, and build autotile sets with a Godot TileSet and a Tiled tileset.

mode8 tile draws terrain, side-view level pieces, props, pickups and weapons in code, colored from the material ramps of your palette (stone, wood, foliage, water ...). It needs no GPU, takes a moment, and gives the same pixels every time, so a level can be rebuilt from its commands. mode8 autotile turns a terrain into a full set of edge and corner tiles, with a Godot TileSet and a Tiled tileset that paint the edges for you.

A small top-down map painted with Mode 8 grass, dirt and water autotiles, with trees, a chest and a signpost
Autotiled grass, dirt and water with props, all from mode8 tile and mode8 autotile

Draw a tile#

terminal
$ mode8 tile grass --palette snes_16bit_overworld --size 32x32 --out tiles/grass.png
✓ Tile grass (32x32) → tiles/grass.png
  top-down · tiles seamlessly in every direction

Next:
  mode8 autotile tiles/grass.png --out-dir tiles/grass_set
  mode8 lint tiles/grass.png --quality

Terrain tiles repeat seamlessly in every direction. Each kind has a default size (16x16 for terrain); --size draws it natively at another size rather than scaling a small tile up.

One tile repeated over a field shows a grid. --variants writes several versions that tile with each other, so the field can mix them:

terminal
$ mode8 tile grass --palette snes_16bit_overworld --size 32x32 --variants 3 --out tiles/grass.png
✓ Tile grass (32x32, 3 variants) → tiles/grass.png
  also tiles/grass_v1.png, tiles/grass_v2.png
  top-down · tiles seamlessly in every direction (and with each other)

Next:
  mode8 autotile tiles/grass.png --out-dir tiles/grass_set
  mode8 lint tiles/grass.png --quality
A field of mixed grass variants next to a field of one repeated tile
Three variants mixed at random (left) and one tile repeated (right)

--variant N draws just variant N. Godot and Tiled can scatter the variants for you: see autotiles below.

What it draws#

terminal
$ mode8 list tiles
60 tile kinds
  brick              platform           stair_up           stair_down
  sconce*            gate               signpost           whip
  whip_power         knife              flask              shard
  heart              hud_portrait       sword              potion
  gem                crate              chest              torch*
  grass              dirt               water*             cobble
  scifi_panel        iso_tile           tree               coin
  energy_cell        ground_top         ground_fill        wall_back
  ledge              pillar             stair_step         window_arch
  door               stair_step_left    ledge_left         ledge_right
  chain              tree_small         bush               rock
Show 8 more lines
  flower             iso_grass          iso_paving         iso_tree
  iso_crate          iso_chest          iso_house          scifi_door
  scifi_stair        scifi_stair_left   catwalk            pipe
  vent               hazard_stripe      wall_light*        scifi_crate
  * animated

Next:
  mode8 tile brick --out tiles/brick.png
FamilyKinds
Top-down terraingrass, dirt, water, cobble, brick, scifi_panel
Side-view level piecesground_top, ground_fill, wall_back, ledge, pillar, stair_step, window_arch, door
Propsplatform, stair_up, stair_down, gate, torch, sconce, crate, chest, signpost, tree
Pickups and itemscoin, energy_cell, potion, gem, heart, flask, shard
Weaponssword, knife, whip, whip_power
Isometriciso_tile
HUDhud_portrait
Every top-down terrain kind with its variants
Top-down terrain: grass, dirt, water, cobble, brick and sci-fi panel
Every side-view level piece
Side-view pieces for a platformer level
Every prop, pickup, weapon, the isometric tile and a HUD portrait
Props, pickups, weapons, the isometric tile and a HUD portrait

Side-view pieces#

The side-view kinds build a platformer level: ground_top is the walkable surface with its lip, ground_fill the earth below it, wall_back the wall behind the player, and ledge, pillar, stair_step, window_arch and door the furniture. Each says how it repeats:

terminal
$ mode8 tile ground_top --palette nes_master_gothic --size 32x32 --out level/ground_top.png
✓ Tile ground_top (32x32) → level/ground_top.png
  side view · tiles seamlessly left/right

Next:
  mode8 autotile level/ground_top.png --out-dir level/ground_top_set
  mode8 lint level/ground_top.png --quality

Props, items and animated kinds#

Props and items are drawn at their own size, with a transparent background and an outline:

terminal
$ mode8 tile chest --palette nes_master_gothic --out props/chest.png
✓ Tile chest (18x15) → props/chest.png
  prop

Next:
  mode8 lint props/chest.png --quality

torch, sconce and water are animated: they write a second frame next to the first.

terminal
$ mode8 tile torch --palette nes_master_gothic --out props/torch.png
✓ Tile torch (8x16, 2 frames) → props/torch.png
  also props/torch_2.png
  prop

Next:
  mode8 lint props/torch.png --quality

HUD portraits#

hud_portrait makes a small face for a health bar or dialogue box from any sprite you give it:

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

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 .
terminal
$ mode8 tile hud_portrait --source drafts/hero.png --out hud/hero.png
✓ Tile hud_portrait (14x14) → hud/hero.png
  prop

Next:
  mode8 lint hud/hero.png --quality

Build an autotile set#

An autotile set is every edge and corner a terrain can need, so a map painter picks the right tile from the neighbors. Give mode8 autotile a tile kind:

terminal
$ mode8 autotile grass --palette snes_16bit_overworld --size 32x32 --out-dir tiles/grass_set
✓ Autotile terrain: 16 blob16 tiles (32x32) → tiles/grass_set/
  sheet tiles/grass_set/terrain_autotile.png
  top-down · grass edges · 8 interior variants
  Godot TileSet tiles/grass_set/terrain.tres (physics)
    Tiled tiles/grass_set/terrain.tsx
terminal
$ ls tiles/grass_set
terrain.tres  terrain_autotile.json  terrain_base.png
terrain.tsx   terrain_autotile.png

You get the sheet of tiles (terrain_autotile.png, with JSON that names each tile's neighbors), the base tile, a Godot 4 TileSet with terrain and collision set up (terrain.tres) and a Tiled tileset with its Wang set (terrain.tsx). --name replaces terrain in the file names, and --formats godot or --formats tiled writes only one of the two.

The blob16 grass set: sixteen edge and corner tiles
blob16: sixteen tiles, four neighbors each

Which layout#

LayoutTilesUse it when
blob16 (default)16Terrain meets other terrain on its four sides: paths, ponds, fields.
blob4747You need inner corners too: a platform with notches, a lake with bays.
terminal
$ mode8 autotile ground_top --palette nes_master_gothic --size 32x32 --layout blob47 --name ground --out-dir level/ground_set
✓ Autotile ground: 47 blob47 tiles (32x32) → level/ground_set/
  sheet level/ground_set/ground_autotile.png
  side view (lip on top) · organic edges · 8 interior variants
  Godot TileSet level/ground_set/ground.tres (physics)
    Tiled level/ground_set/ground.tsx
The blob47 side-view ground set, with a lip on top and inner corners
blob47 side-view ground: a lip on top, inner corners

ground_top and ground_fill default to --view side: the edges get a walkable lip on top instead of a border on all sides. Other kinds default to --view top.

Edges, physics and variants#

  • --style picks the edge drawing: organic (grass, dirt, water), masonry (brick, cobble) or plain. The default follows the kind.
  • --outline-color dark (default) outlines edges in the terrain's darkest color; black uses pure black.
  • --border-px sets how thick the edge band is (default 2).
  • --interior-variants N adds interchangeable interior tiles that Godot and Tiled scatter at random (2 by default for blob47).
  • The TileSet gets a physics layer with collision polygons; --no-physics leaves it out, --occluders adds a light-occlusion layer for 2D lighting.

From your own tile#

mode8 autotile also takes a PNG you drew. It first checks that the tile repeats without a seam, left to right and top to bottom. A tile that does not still gets its set written, but the summary says which edge shows a seam and the command exits 1: fix the edge and run it again.

terminal
$ mode8 autotile tiles/grass.png --name meadow --out-dir tiles/meadow_set
✓ Autotile meadow: 16 blob16 tiles (32x32) → tiles/meadow_set/
  sheet tiles/meadow_set/meadow_autotile.png
  top-down · plain edges · 1 interior variant
  Godot TileSet tiles/meadow_set/meadow.tres (physics)
    Tiled tiles/meadow_set/meadow.tsx

A PNG has no kind to take the edge style from, so it gets plain edges unless you pass --style.

When it goes wrong#

  • The field looks like a grid: mix --variants, or give the autotile set --interior-variants.
  • The tile looks flat or muddy on your palette: the kind takes its colors from the palette's material ramps. A palette without a green ramp cannot draw green grass; see Palettes for declaring ramps.
  • hud_portrait requires a source sprite: pass --source with the sprite whose face it should show.

Next#

  • Godot: paint with the TileSet, collision included.
  • Other formats: the Tiled tileset and more.
  • Palettes: material ramps, and the same tiles on another palette.