Jump to content
  • Advertisement
Sign in to follow this  
luzarius

Isometric Zoning Math

This topic is 4256 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The following screenshot is a Isometric Grid. What I want to do is be able to find out what zone each tile is in. http://img226.imageshack.us/my.php?image=isometriczonehelpvi9.jpg So based upon the screenshot what math equation do I use to determine what zone a tile is in given the x,y coordinate?

Share this post


Link to post
Share on other sites
Advertisement


Your top row on that picture is wrong 5:24 should be 5:23

That could be a starting place to at least identify the Y
count of a systemaic cartesoan system of zones (stepping by
8 from the origin.

Likewise the X coordinates step by 4 across each zone.


If you organized the zone identifiers via a number system
then the ZONE address of any point would be:


ZX = (int)tilex / 4 (assumes rounding down to 0 for full fraction range)
ZY = (int)tiley / 8

This could then be combined into a single value

ZID = (ZX * YZONECOUNT) + ZY // YZONECOUNT being count of Y zone size of world


I prefer a Y major system but thats just a preference.


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!