Z buffer problem in a 2.5D engine similar to monument valley

I'm making a 2.5D engine in scratch which is similar to but not the same as that of monument valley(a mobile game). The blocks are shown in the image(drawn to scale) I have worked out four cases in which i haveto sort out the order of rendering the blocks. But I'm not able to work out the priority order of the four cases. I'm coding it in scratch,but if u tell the logic I'll implement it myself.

Jun 2, 2025 - 23:00
 0
Z buffer problem in a 2.5D engine similar to monument valley

you can use the coordinate axis which I've drawn in pink in top right corner. I want to make a priority order for rendering so that the blocks don't overlap using a function made of the x,y,z coordinates of the blocksI'm making a 2.5D engine in scratch which is similar to but not the same as that of monument valley(a mobile game). The blocks are shown in the image(drawn to scale)look at the stuff inside the blue outline

I have worked out four cases in which i haveto sort out the order of rendering the blocks. But I'm not able to work out the priority order of the four cases. I'm coding it in scratch,but if u tell the logic I'll implement it myself.