# Is it a good idea to use per pixel collision detection in an isometric game?

I've completed the per-pixel collision detection for a small side-scroller game, for learning purposes using a Lazyfoo.net tutorial, and I am wondering if it is a good method for detecting collision in an isometric game consisting of a pure 2D world.

My plan is described in this picture:

As you can see, I want to start with bounding boxes, and if I collide with it I start iterating through the tiles rectangles (19, in this case) for better precision. Is it a good way to handle collisions in this type of game? If not, what would be a suitable alternative?

• The distance between two points in the upleft -> downright diagonal is abs((x1 + y1) - (x2 + y2)).
• The distance between two points in the upright -> downleft diagonal is abs((y1 - x1) - (y2 - x2))
• You have a collision in the same situation where you have a collision between two boxes: If the absolute value of the difference on both diagonals is smaller than the sum of the distance between center and edge of both rhombuses on the respective axis. Or in code, if both distances are smaller than sqrt(tilewidth * tilewidth + tileheight * tileheight) (which is, as you might notice, a constant you can hardcode).