Tilemap with 3rd "height" dimension

Godot Version

4.4.1 stable

Question

Is there a way to efficiently draw a lot of tiles on an isometric grid and have their y-position be affected by some “height” variable? I don’t necessarily need the whole functionality of a TileMapLayer, I would just like to be able to layer multiple of them over each other and have tiles that don’t fit perfectly into the grid, i.e. are pixelated or have for example grass sticking out on the top.

I remember Unity having something like this (even though it was pretty annoying to use in my opinion) where you could have the z-position of a tile make it be rendered at a different y-position.

Isometric Z As Y: Creates an Isometric Tilemap where a Tile’s Z-axis value is added to its Y-axis value. This causes the Tile to be visually offset along the Y-axis by that value, creating the illusion of height as the Tiles are placed on the Tilemap.

Is there a reason you can’t just use two TileMapLayers? A TileMapLayer with a 3rd dimension is a GridMap.

What I want to do is offset tiles vertically by an arbitrary amount, I don’t really understand how that would be possible with two TileMapLayers. And using a GridMap I would have to somehow map 2D textures on meshes to create the illusion of 2D terrain… If there is no other way I would be happy to try that but it seems over-the-top to me and I feel like at that point it wouldn’t be slower to just create a unique node for every tile

I’m assuming you’re thinking about the style of maps console tactics games (Ogre Battle, Final Fantasy Tactics, Vandal Hearts…) used. It’s worth noting that in the 16 bit days, this kind of thing was done on standard 8x8 tilemaps purely through careful tile design. PlayStation era stuff was done in full 3D, at least in part because the PlayStation series consoles do not have tilemap or sprite hardware; they are pure polygon engines.

If I were to tackle something like this now, I’d probably try the gridmap route. That said, if your maps aren’t particularly large, you might be able to make it all out of sprites.

After some more thought on the subject, tiles in TilemapLayer don’t have to fit within the actual size of a tile. If you don’t mind making taller versions of tiles (and having to keep some metadata around for height so sprite placement looks correct) you could do this all with a standard tilemap and a suitable tileset.

Thank you! I will try placing taller tiles into a TileMapLayer as you suggested and generating their sprites at runtime when they are needed to save on memory and work.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.