LibGDX render order Isometric Maps

Hi there,

I am new on the forums, I used Tiled for a assignment last week for Uni to create a simple platformer mostly just using base java and no engine. I liked Tiled very much, it made level design easy and allowed me to focus on programming instead of spending a large amount of time designing levels.

So I have moved on from that now and I am trying to create an isometric RPG using LibGDX.

I am struggling trying to figure out how to make tiles render in the correct order.
What is the best way to make things render in the correct order for an Isometric map using LibGDX?
As you can see from the picture, ordering the layers is not going to be a solution as the player can be in fronts of one tile on the same layer and behind another.

Does LibGdx provide a way to do this?

Could I modify the RenderTileLayer function from the IsometricTiledMapRenderer class to check the position of the tile and player and then draw them in the correct order with something like

    Row loop
        Col Loop
            Layers Loop
                if objecty > tiley

The issue I see with using something like above is that larger tiles maybe overlaped.

Thanks, any advice on how to do this would be appreciated, I am new to Java and OOP.

Generally we solve this by simply using “oversized” tiles. So we use tiles like 32x64 on a 32x32 grid. Then we simply order the objects and tiles by their “feet y” and render them in that order.