How do I find which isometric tiles are inside the cameras current view?

Posted by Steve on Game Development See other posts from Game Development or by Steve
Published on 2012-03-20T18:17:29Z Indexed on 2012/03/21 17:39 UTC
Read the original article Hit count: 276

Filed under:
|

I'm putting together an isometric engine and need to cull the tiles that aren't in the camera's current view. My tile coordinates go from left to right on the X and top to bottom on the Y with (0,0) being the top left corner.

If I have access to say the top left, top right, bottom left and bottom right corner coordinates, is there a formula or something I could use to determine which tiles fall in range?

This is a screenshot of the layout of the tiles for reference. screenshot

If there isn't one, or there's a better way to determine which tiles are on screen and which to cull, I'm all ears and am grateful for any ideas. I've got a few other methods I may be able to try such as checking the position of the tile against a rectangle. I pretty much just need something quick. Thanks for giving this a read =)

© Game Development or respective owner

Related posts about tiles

Related posts about isometric