Sign in to follow this  

Help making an equation for my isometric map editor.

This topic is 4420 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

I am trying to make a map editor for isometric tiles. This is what is going on I have an ISO scrolling map and a tile picker. How can I determine what tile the pointer is over if the map can scroll? Screen size is 600x600 tile picker is 200x600 The map is 1200x1200 isometric drawn from right to left. How can I keep track of what tiles are acutely displaying on the screen?

Share this post


Link to post
Share on other sites
Keep track of the tile number on the left side of the screen. When you move your mouse, just get the position and add the tile number from the left, that should give you an offset into the map.

Share this post


Link to post
Share on other sites
To keep track of what tile your mouse is over...

You'll do something like split the screen up into rectangular sections.

These will all look exactly the same (i'll attach a screeny of one below).

Find the mouse's relative position to that section.

Section_top_left.x and Section_top_left.y are the top left of the rect section.

Subtract that from the mouse's x and y coords and you'll have those relative coords.

What is the color of the pixle of the coord the mouse is at? Use that to figure which tile the mouse is over.

image of a isometric mask for determining mouse position.

Share this post


Link to post
Share on other sites

This topic is 4420 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this