2D Isometric Terrain Generation & Collision Handling

Hello fellow Unity devs!
I hope this post finds you well! I’m wondering if hopefully anyone has any expertise working with
2D Isometric styled games

I’ve been hard at work developing a long-term passion project, I’ve been attempting to implement a terrain generation system (Which I have a handful of experience with). However, admittingly I’ve been struggling to think of a game-plan.

Of course I’m not looking for someone to tell me how to code everything lol I’m just wondering how you guys would approach a problem like this.

I’m currently working on a way to create a system that is capable of procedurally generating 2D isometric terrain, where elevations are accounted for. I currently have a mock-up system in place that kinda pulls it off when the level is built manually (for the sake of showing off what I am trying to make).


Here’s a screenshot of the game during run-time and in-editor

Here I have a simple isometric level made with Unity’s built-in tilemap system! Where the red and purple boxes represent collision tiles. (Notice the labeling of ‘2’ on the red and ‘1’ on the pink/purple).

I wrote this convoluted system that determines what “layer” or elevation the player is currently standing on. Depending on the corresponding layer the player is only affected by that layer’s corresponding colliders. If he/she is standing on the second layer, the player is only effected by the red “layer 2 tiles” and if the player is on the first layer, they are only effected by the ping “layer 1 tiles”.

Basically I am trying to find a way to potentially re-think this system in a way that works for a procedural terrain generation system, including having a collision system that helps mimic a 3D space.
And no, I’m not going to make this 3D lol

Thanks so much for reading!

Heyo, dev of procedural isometric map generator and isometric tilemap auto collider here(both are 100% 2d)

If your system already works for a premade map, why would it matter if the map is made procedurally? Dont you just check if the level2 has a tile’s top surface on the player’s feet position to determine the level?

To mimic 3D space physics, you place the player’s terrain collider at the feet only. The problem is at the rendering. If you have only 2 levels you can just increase the players sorting order to be higher than level2 when player moves up a level. If you have more than 2 levels that becomes much more difficult to manage. There might be solutions to having the upper level tiles automagically sort correctly with respect to player but I haven’t researched or tried anything yet

Some notes:
If you have only have a lower level and an upper level you can use the physics shape(editable on the texture itself) of the upper level’s edge tiles as collision shapes, that’ll automatically build the collider shape if you add a tilemapcollider.
I use a separate tilemap for the collider because I dont enforce only 2 levels and the separate tilemap/sprites for colliders give me a really easy time on replacing them(when the stairs arent flat or when I want larger stair openings for pathfinding etc.). Note that you need like 50+ collider sprites if you want accurate-ish shapes for more than 2 levels(about 3x more if you want 100% accuracy iirc)

If you use collider tiles that thick, you are not going to be able to get close to the edge of the upper or lower levels; so you should use thin lines if you dont see the wall of the level2 as collision tiles along with composite collider2d

If your stairs dont have colliders on the edge of the wall, your player will be able to move sideways on the stair

Let me know if you need a voucher for isometric tilemap auto collider
Cheers