Isometric tile range aquisition

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/20 23:40 UTC
Read the original article Hit count: 212

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, bot left and bot right corner coordinates, is there a formula or something I could use to determine which tiles fall in range?

screenshot

I've linked a picture of the layout of the tiles for reference.

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