Archived

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

Programmer16

My 2D mapping question

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