Advertisement Jump to content
Sign in to follow this  

collision detection in maze issue

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

I will make my own Pacman one day and I think I can understand the cornering for Pacman. This allows him to get away from ghosts who can't cut corners. I assume the original Pacman didn't have to worry about time steps etc because they knew exactly how fast the game was going to run because the hardware was the same for everyone. IE Arcade machines, C64's etc.

Actually they didn't "worry about time steps" for technical reasons: older hardware like that simply doesn't have the processing power for variable time steps.


Variable time steps require constantly multiplying values by the delta time. Mutiplication is extremely slow on 8-bit CPUs, and still fairly slow on most 16-bit CPUs.


Instead, games on those older types of hardware would just use a fixed time step, use the vertical retrace interrupt (which occurs at a fixed frequency based on the display system) for timing, and if any given step took too long to process, the game would just slow down.

Share this post

Link to post
Share on other sites

My ultimate goal for this will be a little game, something like Boulderdash crossed with Pacman.

I apologize. I didn't finish my thought; it was a LONG day for me. We are trying to help you based on a very rudimentary image. Is it safe to assume that the graphics shown are simply placeholder graphics? If so, your character bounding box is far too large. In fact, it is far too large even if these are the final graphics! The collision bounds needs to be as small as possible so as to not cause false positives. There is precious little reason for your character's collision bounds to be so large as to force a collision with the environment. As it stands now, your character is always in contact with the walls. If you were to use an actual physics library, your character wouldn't move at all.

All of your problems would go away if you were to reduce the size of the blue square and you would have a much easier time if it were a circle and you did a radius collision test.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!