In the Aseprite beginner guide you drew your first sprite, and in the walk cycle tutorial you made it move. Now it needs ground to walk on. This is part three of the Aseprite series, and it’s the first one that leaves Aseprite: you’ll build a tileset and bring it into Godot 4.
Tiles are the most economical art in a 2D game. You draw a handful of small squares once, and they build every level. That only works if two things are true: the tiles fit together without visible seams, and the engine knows which tile goes where. Aseprite helps with the first part, Godot with the second.
You’ll draw your tiles on a tilemap layer in Aseprite, export the tileset as a PNG, set it up as a TileSet in Godot, give the solid tiles collision and finally create a terrain set, so Godot picks the right edge and fill tiles for you while you paint a level.
What You’ll Need
- Aseprite 1.3 or newer. Tilemaps arrived with version 1.3. The basics (canvas, pencil, palette) are in the beginner guide.
- Godot 4. I checked the Godot steps against the official documentation for Godot 4.7, the current stable version.
- A tile size. I’ll use 16×16 pixels. If you haven’t decided yet, Choosing the Right Resolution and Sprite Size helps you pick one that fits your base resolution.
- A Godot project set up for crisp pixel art. If your sprites look blurry in Godot, do Crisp Pixel Art in Godot 4 first. Your tiles will need the same settings.
- About 60 minutes
Step 1: Plan a Small Tileset
Before you draw, decide what your tiles have to do. For this tutorial, the goal is the ground of a side-view platformer: grass on top, earth below.
You don’t need a big set to start. Six tiles are enough for a first floating platform:
- Top left: grass on top, edge on the left
- Top middle: grass on top, continues left and right
- Top right: grass on top, edge on the right
- Fill left: earth, edge on the left
- Fill middle: earth all around
- Fill right: earth, edge on the right
Every tile in this set is defined by its four sides: does the ground continue there, or is there empty space? Keep that in mind. In step 8, it’s exactly what you’ll tell Godot.
Corners, slopes and single-tile pillars come later. A small set that works teaches you the whole pipeline. You can add tiles at any time, and Godot picks them up when you export again.
Step 2: Create a Tilemap Layer in Aseprite
Create a new sprite with a transparent background. Its size doesn’t matter much, it’s your workbench. Something like 128×64 pixels gives you room to lay out a test platform at 16×16 pixels per tile.
Now add a tilemap layer. The Aseprite documentation on tilemaps names the menu path Layer → New → New Tilemap Layer, or the shortcut Space+N.
A tilemap layer works differently from a normal layer. The documentation compares it to an indexed image: an indexed image stores a palette index for each pixel, and a tilemap layer stores a tile index for each grid cell. The tiles themselves live in the tileset, a collection of tiles that works like a palette. Tile index 0 is the empty tile.
When you create the layer from the menu, Aseprite opens a dialog for the new tileset. The fields Grid Width and Grid Height set the size of the tiles, and the default comes from the grid of your sprite. Set both to 16. Write the number down, because Godot will need exactly the same size in step 6.
Step 3: Draw Your Tiles in Auto Mode
A tilemap layer has two drawing modes. You switch between them with Space+Tab:
- Draw Pixels changes the content of the tiles, like drawing on a normal layer.
- Draw Tiles places or picks whole tiles and changes only the map, not the tiles.
Start in Draw Pixels. Here, Aseprite offers three sub-modes. According to the documentation:
- Auto (
Space+2) is the default. It creates new tiles or reuses existing ones automatically and removes tiles that aren’t used anymore. - Manual (
Space+1) changes the content of tiles without rearranging the tileset. - Stack (
Space+3) creates a new tile for every change and leaves the existing tiles alone.
Stay in Auto and draw your platform directly on the canvas: one row of grass tiles on top, one row of earth below, three tiles wide. Aseprite cuts your drawing into 16×16 cells and adds each new cell to the tileset. You’ll see the tiles show up in the tileset palette while you draw.
That’s the big advantage over drawing tiles one by one on a normal canvas. You draw the platform as a whole, so you see the edges between tiles while you draw them.
Step 4: Make the Middle Tiles Seamless
The middle tiles are the ones that repeat. A platform ten tiles wide uses “top middle” eight times in a row. Any pixel at the left edge of that tile has to fit the pixels at its right edge, or you’ll see a seam every 16 pixels.
Here’s how to test it in Aseprite:
- Switch to Draw Tiles (
Space+Tab). - Pick the “top middle” tile in the tileset palette and place it four or five times in a row. Do the same with “fill middle” below.
- Look at the result at 100 % zoom. Does the grass line run straight through? Do you spot a pattern that repeats too obviously every 16 pixels?
To fix a seam, switch back to Draw Pixels and choose Manual (Space+1). Because every cell of the map only points to a tile in the tileset, a change to the tile shows up in every cell that uses it. You fix the edge once and see the result across the whole row immediately.
Two tips from the pixel art side:
- Break the grid. A grass edge that’s perfectly straight and identical in every tile makes the repetition obvious. A few pixels of grass hanging over the edge, or a small stone in the earth, help, as long as they continue across the tile border.
- Keep the outer edges simple. The left and right end tiles only appear once per platform. They can have more detail than the middle tiles.
Step 5: Export the Tileset as a PNG
First, save your work as an .aseprite file with File → Save. That keeps the tilemap layer and the tileset for later.
Godot needs the tiles as an image. Since version 1.3, Aseprite has a menu item for exactly that: File → Export → Export Tileset. It only works while the tilemap layer is the active layer. It exports the tileset, the tiles from the palette, not the platform you drew on the canvas.
The dialog is the same one you know from Export Sprite Sheet. Three settings matter here:
- Layout: Horizontal Strip or By Rows both work. Godot doesn’t care whether your tiles sit in one row or in a grid, because each tile gets its own properties there.
- Borders: leave Border Padding, Spacing and Inner Padding at 0. Then every tile sits exactly on a 16-pixel grid. If you do add spacing or a border, you’ll have to enter it in Godot in step 6.
- Output: tick Output File and save a PNG, for example
ground_tiles.png, into your Godot project folder. Godot doesn’t need the JSON Data file.
One thing that might surprise you: the export also contains tile 0, the empty tile, as a transparent square. That’s fine, as you’ll see in the next step.
Step 6: Turn the PNG into a Godot TileSet
Switch to Godot. The Godot documentation on TileSets describes the setup:
- Add a TileMapLayer node to your scene and select it.
- In the Inspector, create a New TileSet in the Tile Set property and click it to expand it.
- Check Tile Size. It has to match the size from Aseprite. The default is 16×16, so for this tutorial it already fits. With 32×32 tiles you’d change it now.
- Open the TileSet panel at the bottom of the editor and drag your PNG from the FileSystem dock into it.
- Godot asks whether it should create the tiles automatically. Click Yes.
The order of steps 3 and 4 matters. The documentation says: “If relying on automatic tiles creation, you must set the tile size before creating the atlas.” If you drag the PNG in first, Godot cuts it with whatever size is set at that moment.
Fully transparent areas don’t get a tile. That’s why the empty tile 0 from the Aseprite export simply disappears. If your export had spacing or a border, enter it in the atlas properties as Separation and Margins. Texture Region Size is the size of one tile in the atlas, here 16×16.
In the same list you’ll find Use Texture Padding. Leave it on. According to the documentation, it adds a transparent one-pixel edge around each tile “to prevent texture bleeding when filtering is enabled”, and the recommendation is to leave it enabled unless it causes rendering issues.
Now switch to the TileMap panel at the bottom, pick a tile and paint into the scene. If the tiles look blurry, the filter settings from Crisp Pixel Art in Godot 4 are missing.
Step 7: Give the Solid Tiles Collision
Right now your character would fall straight through the ground. Tiles need collision shapes, and those live in a physics layer of the TileSet.
- Select the TileMapLayer, expand the TileSet in the Inspector, open Physics Layers and click Add Element.
- Go back to the TileSet panel at the bottom and choose the Select mode. Click one of your tiles.
- In the middle column, open the Physics Layer section that appeared after step 1. With the TileSet editor focused, press
F. Godot creates a rectangle that covers the whole tile.
For six tiles, you can do this one by one. For bigger tilesets, the documentation recommends Paint mode: you set up the property once in the middle column, then click or drag over the tiles on the right, and each one gets the same shape.
For this platform, every tile gets a full square. Later, for slopes, you can move the points of the shape. A right-click on a point removes it, so a triangle is just a square with one corner removed.
Step 8: Let a Terrain Set Connect the Tiles
You could paint every level by hand and pick the right edge tile each time. Terrains do it for you. You tell Godot which sides of each tile continue the ground, and Godot chooses the matching tile while you paint.
Create the terrain set. In the Inspector, in your TileSet, open Terrain Sets and add an element. Set its Mode to Match Sides. The documentation lists three modes: Match Corners and Sides, Match Corners and Match Sides. With Match Sides, only the sides of a tile have to match its neighbors, not the corners, and that’s exactly how you planned the tiles in step 1. Then add a Terrain inside the set and call it “Ground”. The documentation is clear that a terrain set alone isn’t enough: you need at least one terrain in it.
Assign the terrain to the tiles. In the TileSet panel, choose Select mode and click a tile. In the middle column, open Terrains and set Terrain Set to 0 and Terrain to 0. Both IDs start at 0, and -1 means “no terrain”.
Set the peering bits. Now a section called Terrain Peering Bits appears. Each bit stands for a neighbor of the tile. Set a side to 0 (your Ground terrain) if the ground continues there, and leave it at -1 if there’s empty space. For your six tiles from step 1:
| Tile | Top | Right | Bottom | Left |
|---|---|---|---|---|
| Top left | −1 | 0 | 0 | −1 |
| Top middle | −1 | 0 | 0 | 0 |
| Top right | −1 | −1 | 0 | 0 |
| Fill left | 0 | 0 | 0 | −1 |
| Fill middle | 0 | 0 | 0 | 0 |
| Fill right | 0 | −1 | 0 | 0 |
The fill tiles have 0 at the bottom as well, so you can stack several rows of earth.
Paint with the terrain. Open the TileMap panel and switch to the Terrains tab. According to the documentation on TileMaps, there are two modes:
- Connect connects the new tiles to the surrounding tiles on the same layer.
- Path only connects tiles that you paint in the same stroke, until you release the mouse button.
Choose your Ground terrain in Connect mode and paint a platform. Godot places grass on top, earth below and the edge tiles at the ends. If a spot gets the wrong tile, check the peering bits of the tiles involved first. Most of the time, one side is set wrong.
Common Mistakes
Dragging the PNG into Godot before setting the tile size. Godot then cuts the atlas with the default size of 16×16. With 32×32 tiles, every tile gets cut into several pieces. Set Tile Size first, then drag the image in.
Different tile sizes in Aseprite and Godot. 16×16 in one, 32×32 in the other, and nothing fits. Use one size everywhere and write it down.
Exporting the canvas instead of the tileset. A normal export saves the platform you drew, not the tiles. Use File → Export → Export Tileset.
Seams in the middle tiles. If you see a line every 16 pixels, the left and right edges of a repeating tile don’t match. Test with a long row in Draw Tiles mode and fix it in Manual mode.
A terrain set without a terrain. The terrain set alone does nothing. Add at least one terrain inside it.
Peering bits that contradict each other. If “top middle” says the ground continues upward, Godot uses it in the middle of the earth. Check each side against your plan from step 1.
Collision forgotten. The tiles look solid but aren’t. Every tile the player can stand on needs a shape in the physics layer.
Quick Reference
- Aseprite: Tilemaps since 1.3, new tilemap layer Layer → New → New Tilemap Layer (
Space+N), Draw Pixels / Draw TilesSpace+Tab, ManualSpace+1, AutoSpace+2, StackSpace+3 - Export: File → Export → Export Tileset with the tilemap layer active, borders at 0, PNG as output, the
.asepritefile stays your master - Godot TileSet: TileMapLayer → New TileSet → check Tile Size first (default 16×16) → drag PNG into the TileSet panel → Yes
- Collision: Physics Layers → Add Element, Select mode,
Ffor a full rectangle - Terrain: Terrain Sets with mode Match Sides, one terrain inside, peering bits
0where the ground continues and−1where it doesn’t, paint in the Terrains tab with Connect
What You’ve Learned
- How a tilemap layer and a tileset work together in Aseprite
- How to draw tiles in Auto mode and fix seams in Manual mode
- How to export the tileset as a PNG
- How to turn the PNG into a Godot TileSet in the right order
- How to add collision and let a terrain set place edge and fill tiles automatically
Next up: add the missing pieces to your set. Inner corners, a single-tile pillar and a one-tile-high ledge are good candidates. Each new tile only needs its peering bits, and Godot fits it in. And if you need something to walk on your new platform, the character from the walk cycle tutorial is waiting.
Sources
- Aseprite documentation: Tilemap (accessed November 2026)
- Aseprite release notes: v1.3-beta21, menu item File → Export → Export Tileset (accessed November 2026)
- Godot Engine documentation (4.7): Using TileSets, Using TileMaps (accessed November 2026)