Jump to content
  • Advertisement


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


My 2D mapping question

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

Hey I''m making a 2D rpg. The way I''m doing the mapping is like this: The map is a bitmap at the size of 800x600 (the screen size of 640x480). I load the bitmap to and paint it using a rect that is PlayerX-320,PlayerY-240 to PlayerX+320,PlayerY+240. My problem is in my boundaries. For boundaries I use an array, 1200 (40 16x16 sections by 30 16x16 sections). I do SectorToCheckX = PlayerX/16 and SectorToCheckY =PlayerY/16. The problem is that it checks for a 800x600, when the player can only move to 640,480 (-32 for each one). Would it just be easier to use 3D textured quads? I know this is a smarter idea because I could do layers, and stuff, but I''m just trying to do the easy thing right now.

Share this post

Link to post
Share on other sites

  • 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!