Isometric Pixel Art
I&#x27;m currently working on an isometric city builder game. It took me awhile to figure out how to depth sort all assets properly and quickly. I have walls that sit on the edge of a tile, i.e. they take up almost no floor space. Since my game will display the interior of buildings, this means the typical approach of sorting everything by the screen.y position (so long as every asset is a cube (or stack of cubes), or broken up into cubes) fails, because the bottom of the wall texture can be a whole tile-size away from the bottom of the asset.<p>I had to implement &quot;snap to grid&quot; calculations in the background for moving units inside buildings, meaning for the depth sorting algorithm, I pretend they are on a different tile (when needed). Unfortunately I dont have a video of this yet.<p>As for efficiency, I implemented static quads (for non moving items) and only draw items within the quads on screen. And for units&#x2F;vehicles, I do a rectangle collision check (unit rectangle compare to screen space rectangle). It&#x27;s very fast!<p>You can find progress updates on: <a href="https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;Archapolis&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;Archapolis&#x2F;</a><p>Or a few video logs at <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;channel&#x2F;UCUYLstskSLNcSkFg1giTBtQ" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;channel&#x2F;UCUYLstskSLNcSkFg1giTBtQ</a>