Jump to content
  • Advertisement
Sign in to follow this  
pjuke

Plot isometric tiles ?

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

Hi! So I'm working on a game with isometric tiles. But I can't figure out how to plot the Y coordinate to draw each tile on. My map is a two-dimensional array. I use a double for-loop to analyze it and see what kind of tile it should blit. I know how to plot the X coordinate, but not the Y, at the moment it looks like this: http://img39.imageshack.us/img39/86/gameoh.jpg The yellow square is my temporarly player... So how do I do, lol ? Thank you! :)

Share this post


Link to post
Share on other sites
Advertisement
You're close, you just need to overlap the tile rows. If you look at your picture, what you really want is for every other row to be touching at the top and bottom, so the rows in between need to be placed at half-tile position.

Which means you pretty much just do this:


def tileYInPixels(tileRowIndex, tileHeightInPixels) :
return tileRowIndex * (tileHeightInPixels / 2.0)


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!