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.

Draw a tile#
$ 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 --qualityTerrain 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:
$ 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
--variant N draws just variant N. Godot and Tiled can scatter the variants for you: see autotiles below.
What it draws#
$ 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 rockShow 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| Family | Kinds |
|---|---|
| Top-down terrain | grass, dirt, water, cobble, brick, scifi_panel |
| Side-view level pieces | ground_top, ground_fill, wall_back, ledge, pillar, stair_step, window_arch, door |
| Props | platform, stair_up, stair_down, gate, torch, sconce, crate, chest, signpost, tree |
| Pickups and items | coin, energy_cell, potion, gem, heart, flask, shard |
| Weapons | sword, knife, whip, whip_power |
| Isometric | iso_tile |
| HUD | 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:
$ 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 --qualityProps, items and animated kinds#
Props and items are drawn at their own size, with a transparent background and an outline:
$ mode8 tile chest --palette nes_master_gothic --out props/chest.png
✓ Tile chest (18x15) → props/chest.png
prop
Next:
mode8 lint props/chest.png --qualitytorch, sconce and water are animated: they write a second frame next to the first.
$ 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 --qualityHUD portraits#
hud_portrait makes a small face for a health bar or dialogue box from any sprite you give it:
$ 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 .$ 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 --qualityBuild 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:
$ 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$ ls tiles/grass_set
terrain.tres terrain_autotile.json terrain_base.png
terrain.tsx terrain_autotile.pngYou 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.

Which layout#
| Layout | Tiles | Use it when |
|---|---|---|
blob16 (default) | 16 | Terrain meets other terrain on its four sides: paths, ponds, fields. |
blob47 | 47 | You need inner corners too: a platform with notches, a lake with bays. |
$ 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
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#
--stylepicks the edge drawing:organic(grass, dirt, water),masonry(brick, cobble) orplain. The default follows the kind.--outline-color dark(default) outlines edges in the terrain's darkest color;blackuses pure black.--border-pxsets how thick the edge band is (default 2).--interior-variants Nadds 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-physicsleaves it out,--occludersadds 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.
$ 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.tsxA 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--sourcewith 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.