How to Make a Tilemap — Tileset, Layers, Collision
Four decisions make a tilemap: cell size, tileset grid, layer stack, collision. Make them once and painting the level is mechanical.
No tilemap skill in the catalog yet, so the prompt carries the spec: 32 px cells, three index layers, 16 autotile variants, collision flags.









Walk the map.
Click to open the live level and walk it here.
A level is data, not a drawing.
Neta Studio is an AI world builder — cast, places, art and playable scenes in one place. A tilemap is the smallest useful piece of that world: an index grid you can edit, walk and export, with the same cast standing on it.
- Cells, not brush strokes — Every path and prop is an integer in a layer, so a 48 × 30 map is a few hundred numbers, not a 3 MB painting.
- Autotile does the corners — A terrain blob resolves its own edges and inner corners from four neighbours. You paint the shape; the tileset picks the tile.
- Walk it before you ship — Collision is a layer, not a guess. Toggle the overlay, walk the route, and see exactly which cell stops you.
Questions? Answered.
Do I need an engine to make a tilemap?
No. The level here is HTML and a canvas: a tileset image, three index arrays and a render loop. Export the JSON when you want to open it in Godot, Unity or Tiled.
What tile size should I use?
Pick one and never mix it. 16 px reads as retro, 32 px is the safest for characters and props, 48 or 64 suit a wider camera. The tileset and the grid must use the same number, or sampling lands mid-tile.
What is the difference between a tileset and a tilemap?
The tileset owns pixels: one sheet plus the rule that it is, say, 16 columns of 32 px tiles. The tilemap owns placement: one index per cell per layer. You change the level without redrawing the art.
How does autotiling work?
Each terrain tile is chosen from its four neighbours — north, east, south, west — which gives 16 variants: centre, straight edges, outer corners and inner corners. Paint a blob and the edges resolve themselves.
How many layers do I need?
Three is enough for most 2D levels: ground (dense, every cell), detail (sparse, 0 for empty) and collision (1 for blocked). Add a foreground layer only when something must pass in front of the character.
Where do collisions live?
In their own layer, aligned to the same grid. Keep them out of the art so you can retile a wall without losing its blocking, and toggle the overlay to check a route before you ship.
Can I export it to Tiled or Godot?
Yes. The export is width, height, tile size, tileset columns and the three layers as index arrays — the shape every 2D engine and Tiled’s JSON importer already read.
Does it work on a phone?
The level runs in a mobile browser: the map scales down, the control strip scrolls on one row, and the page never scrolls sideways at 390 px.
Make the level you keep sketching on paper.
One sentence for the place. The grid, the tileset, the layers and a walkable character come back with it.