Gridwright Start for $1

Isometric Tileset Godot 4: Setup, Heights and Y Sort

Set up an isometric tileset in Godot 4 that lines up: 32x16 cells, Diamond Down, the texture origin for tall blocks, height layers and Y sort, step by step.

Isometric Builder at work
Isometric Builder at work: Isometric maps and scenes.

You set the TileSet to Isometric, paint a row of grass blocks, and they sit half a cell too low, as if they sank into the ground. You put a tree behind a house and the tree draws on top of it. You add a second floor of blocks and the ground under it shows through the walls. Isometric in Godot 4 is not hard, but it only lines up when four or five settings agree, and none of them are on by default.

This guide sets up an isometric TileSet in Godot 4 that lines up the first time: the cell size, the layout, the offset for tiles taller than the cell, height layers and Y sort. Every number below was rendered in Godot 4.7 and checked pixel for pixel against the art's drawing order. To lay out a map from finished pieces first, try it here: the free demo of the Isometric Builder runs on its page.

The numbers that matter: cell size, shape and layout

An isometric tile in pixel art is a diamond twice as wide as it is tall. The common size is a ground diamond of 32x16 pixels, and a full block is that diamond with 16 pixels of side under it, so its picture is 32x32.

Isometric Builder in use
Isometric Builder in use. Every tool runs in your browser, nothing to install.

Godot asks for the cell, not the picture: the TileSet's Tile Size is the rectangle around the diamond, 32x16 ("the encompassing rectangle of the tile shape", in Godot's reference). Enter 32x32 because the block picture is 32x32, and the rows sit twice as far apart down the screen.

Tile Shape: Isometric gives you diamonds, and Tile Layout decides how cells are numbered. The default, Stacked, numbers them in staggered rows. For a map you think of in columns and rows, choose Diamond Down: the first coordinate goes down to the right and the second goes down to the left. With 32x16 cells, map_to_local() gives the centre of cell (0, 0) at (16, 8), cell (1, 0) at (32, 16) and cell (0, 1) at (0, 16). The cell in front of (x, y) is (x + 1, y + 1), which keeps movement and pathfinding code simple.

Step 1: Make the TileSet

  1. Add a TileMapLayer to your scene. In the Inspector, set Tile Set to a new TileSet.
  2. Click the TileSet and set Tile Shape to Isometric, Tile Layout to Diamond Down and Tile Size to 32x16.
  3. Open the TileSet panel at the bottom of the editor and drag your sheet into it. Set the atlas's Texture Region Size to the size of one picture: 32x16 for flat floor tiles, 32x32 for full blocks. Put floors and blocks in separate atlases if their sizes differ.
  4. For pixel art, set Project Settings > Rendering > Textures > Canvas Textures > Default Texture Filter to Nearest. The default is Linear, which blurs every pixel edge.

Floors now paint correctly. Blocks do not, and that is the next step.

Isometric Builder in use
Isometric Builder in use. Every tool runs in your browser, nothing to install.

Step 2: Tiles taller than the cell need a Texture Origin

Godot draws each tile's picture centred on its cell. A 32x16 floor fills the cell exactly, so centred is right. A 32x32 block is taller than the cell, and its ground diamond sits at the bottom of the picture. Centred, the block lands 8 pixels too low: that is the sunken look.

Isometric Builder in use
Isometric Builder in use. Every tool runs in your browser, nothing to install.

The fix is the tile's Texture Origin. Select the block in the TileSet panel's Select mode and, under Rendering, set Texture Origin to (0, 8). A positive Y moves the picture up. In our renders, (0, 8) put a 32x32 block exactly on its cell, (0, 0) was 8 pixels low and (0, -8) was 16 pixels low.

The rule for any picture whose ground diamond sits at its bottom edge:

  • Texture Origin Y = (picture height − cell height) / 2
  • 32x16 floor: 0
  • 32x32 block: 8
  • 32x48 tree or lamp post: 16

In Select mode you can Shift-click several tiles and set the value for all of them at once. When the picture is in the right place, the tile's Y Sort Origin (0 by default) is the centre of the cell it stands on, which is what sorting needs.

Your game, looking finished

Every Gridwright asset pack, made to fit together, and all 44 tools for the fiddly work, with every new release, for $17 a month. Try it in your own game first: 3 days for $1 with every tool and up to 10 packs. Cancel any time.

Start: 3 days for $1 See everything it includes

Step 3: Y sort, so things go behind each other

Turn on Y Sort Enabled (CanvasItem > Ordering) on the TileMapLayer and on the Node2D that holds it. Godot's reference says an isometric TileSet "works best if all sibling TileMapLayers and their parent inheriting from Node2D have Y-sort enabled". Now each tile is drawn in order of its Y on screen, so the row nearer the camera covers the row behind it.

Isometric Desert
Isometric Desert: Isometric pixel art desert: sand, oasis, mud-brick town, bazaar, pyramid ruins, camels, palms. One of the 150 packs in Gridwright.

Put your player, NPCs and loose props under that same Y-sorted parent, with each node's origin at its feet. A character standing south of a tree is drawn after it and covers its trunk. One step north and the tree covers the character, with no code from you.

A building that covers several cells sorts by its front cell: cut it into one tile per cell, as Godot's docs suggest for large objects, or place it as a Sprite2D standing on that front cell.

Step 4: Height, one layer per level

Hills, cliffs and the upper floor of a house are blocks stacked on blocks. In Godot that is one TileMapLayer per level, all using the same TileSet, each one moved up by the block height. With 16 pixel blocks, level 1 is 16 pixels up and level 2 is 32.

Isometric Sci-Fi Colony
Isometric Sci-Fi Colony: Isometric pixel art sci-fi colony: cut-away base walls, sliding doors, reactor, rover, alien planet. One of the 150 packs in Gridwright.

There is a catch. When you move a layer up, its tiles also sort as if they stood further back, so the ground block under a raised block is drawn on top of it. In our render, a raised block without the fix had 512 pixels wrong. The layer's Y Sort Origin puts the sort point back where the block stands: give each level the same number you moved it up by. Keep the ground first in the scene tree and the higher levels below it, because when two tiles sort at the same point Godot draws them in tree order.

This script on the parent Node2D sets all of it:

extends Node2D
## World: Ground, Level1, Level2 are TileMapLayers with the same isometric TileSet.
const BLOCK_HEIGHT := 16

func _ready() -> void:
	y_sort_enabled = true
	var level := 0
	for layer in get_children():
		if layer is TileMapLayer:
			layer.y_sort_enabled = true
			layer.position.y = -BLOCK_HEIGHT * level
			layer.y_sort_origin = BLOCK_HEIGHT * level
			level += 1

With it, a 3x3 stone platform with two grass blocks on top rendered pixel for pixel the same as drawing the art back to front by hand. To place a block from code, call set_cell(Vector2i(col, row), 0, atlas_coords) on the layer of the height you want. To find the cell under the mouse on the ground, use local_to_map(get_local_mouse_position()) on the Ground layer.

Where to get an isometric tileset

Searches for an "isometric tileset free" or an "isometric tileset generator" mostly come from one need: pieces on one grid, so the steps above work on all of them. Packs drawn on different diamonds or with different block heights bring back the problems from the top of this guide. Gridwright's isometric packs share the 32x16 diamond and 16 pixel blocks, and each carries an isometric.json with every sprite's anchor, footprint and height. The Isometric Tileset has the blocks, floors, ramps, paths, fences, animated water and buildings to start a map with.

Build the map first, then open it in Godot

Painting a level tile by tile in Godot works, but trying ideas is slow. The Isometric Builder is a map editor with every Gridwright isometric pack loaded. Blocks stack by their real heights, paths, fences and walls join by themselves, characters go in with their shadows, and night mode lights the windows and fires. It all runs in your browser.

The full version exports a Godot 4 folder with the sprites and a ready .tscn: copy it to the root of your project and open the scene. Every sprite is a Sprite2D in drawing order, under a root node with nearest filtering. It also saves a Tiled map, JSON, a PNG at up to 8x and an animated GIF. The free demo has the pieces from the packs' free samples and saves PNG pictures with a small mark; the full version has every piece of every Gridwright isometric pack and every export.

FAQ

What tile size should an isometric tileset use in Godot 4?

The size of the ground diamond, not the picture: 32x16 for the common 2:1 pixel art style. Taller pictures, such as 32x32 blocks, keep that cell size and get a Texture Origin instead.

Why are my isometric tiles drawn in the wrong order?

Y Sort is off on the TileMapLayer or on its parent, or a raised layer is missing its Y Sort Origin. Turn Y Sort on for both, and give a layer moved up by N pixels a Y Sort Origin of N.

Make your first isometric map

Open the Isometric Builder demo, press Try the sample, raise a hill next to the village and switch on night mode. When you want every isometric pack in it and the Godot scene export, start Gridwright for 3 days for $1. You get all 44 tools and 150 asset packs, every isometric one drawn on the grid this guide sets up.

Your game, looking finished

Every Gridwright asset pack, made to fit together, and all 44 tools for the fiddly work, with every new release, for $17 a month. Try it in your own game first: 3 days for $1 with every tool and up to 10 packs. Cancel any time.

Start: 3 days for $1 See everything it includes