Jump to content
  • Advertisement
Sign in to follow this  
ErikPeeters

Tile selection

This topic is 4378 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 All, I'm having a problem with the selection of a tile. I have made a tiled map in OpenGL of little squares. The squares consist of bitmaps of 64 x 64 pixels with on the bottom a 45 degree turned square of 64*31 pixels. The rest of the picture is black and blended into the background to only display the turned square. The thing I want is to know which tile I click upon or hover over. I have made regions in c++ and loop through my map tiles in which one my mouse pointer is. I constantly change between OpenGL units and pixel coords. This is causing a major performance hit and is probably not the way to go. Can some one help me please how I can select tiles or squares in OpenGL? Thanks in advance, - Erik

Share this post


Link to post
Share on other sites
Advertisement
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!