#### Archived

This topic is now archived and is closed to further replies.

# Screen to Space Coordinates - How difficult is it?

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

## Recommended Posts

Seriously, just ignore my post if I''m missing something here. I''ve been reading through the reference section, and found some articles about converting screen coordinates to isometric map space coordinates. I only read through about half of it to realize it was making it much more difficult than it had to be. My iso engine is 2D, so I may be missing something. But just in case, I wanted to share my method for converting coordinates. It seems extremely simple for you guys not to already know, so I''m hoping somone will explain why the article went so in depth and what they were trying to do. This is how I convert to map space coordinates: MapCoordX = (POS_X>>1) + POS_Y; MapCoordZ = POS_Y - (POS_X>>1); Z is in-out, not into-the-air-coordinates. And my tiles are 64x31 in size. The usual ratio. Like I said, this seems pretty simple for you guys to not already know, but maybe it helps someone. Shed some light on me if I''m wrong. Jiia

##### Share on other sites
the method you are using will work for the specific case of a 2:1 tile ratio. the articles speak of more general purpose solutions, since not all iso maps have a 2:1 ratio.

##### Share on other sites
Also, Screen space to Map Sapce is a translation but Screen to Tile is trickier since a given map space coord can land in multipel overlapping tiles.

The "MouseMap" trick Tan shows in his book is an easy and efficient way to resolve that

1. 1
2. 2
Rutin
22
3. 3
4. 4
JoeJ
16
5. 5

• 14
• 30
• 13
• 11
• 11
• ### Forum Statistics

• Total Topics
631776
• Total Posts
3002299
×