Drawing isometric boxes in the correct order
Great explanation for a generally messy problem!<p>Just one thought because I spent some time thinking about this type of problem before deciding to do it a different way in my own work:<p>If you use an orthographic projection and just actually draw 3-D boxes, this problem becomes trivial, including the intertwined boxes problem, because the GPU will take care of it at a per-pixel level with the Z-buffer.<p>Of course this also means you&#x27;re suddenly working in 3-D, which complicates other things. But you can still use 2-D textures by picking the right texture coordinates for the vertices on the box.<p>These days it usually makes a lot of sense to be doing 2-D stuff using a 3-D engine&#x2F;library anyway, if only for access to hardware accelerated post-processing and hardware accelerated layering&#x2F;compositing, in which case using actual boxes on a tilted camera and using &quot;no projection&quot; for your HUD&#x2F;UI works pretty well.