Jump to content
  • Advertisement


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

Collision Detection

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

Im currently working on a simple dos console game. Like Pacman I have the cursor move around the screen while on a pre-loaded map. My problem is im not sure how to set collision detection to the cursor. Heres my movement code for the cursor if(InputRecord.Event.KeyEvent.wVirtualKeyCode == VK_RIGHT) { CursorPosition.X = CursorPosition.X + 1; CursorPosition.X++; cout << "+"; score = score + 1; } Im sorry if im not very detailed.

Share this post

Link to post
Share on other sites
Original post by blizzard999
Note that you increment CursorPos.x twice!

Simply use (x,y) to access your map...where is the problem?

Is that why my cursor might be going over and down two spots? Because if thats why im very very happy right now.


Thats the complete source code. I just cant figure out how to implement collision detection between the map and the cursor.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!