View Full Version : collision
lambs4
09-30-2003, 06:14 PM
Why does my collision code not work? Collisions are detected from the left and top , but not the right or bottom. When I move the character 32pixels at a time collision is detected properly. Now I want to move the character 4pixels at time instead.
[edit]
You can get the file here: http://www.geocities.com/lambs_04/files/pacman1.zip Right Click and Save Target As... or Copy and Paste into address bar.
Stan100
09-30-2003, 06:24 PM
Where's Pacman.h?
Is there anything else you're forgetting? Not to rag on you but I hate it when people ask for help and don't give me everything I need to ACTUALLY help with.
I'm not even gonna look at something if I can't compile it. I assume this is a console game. (Did not see any Bitmaps)
Just edit your first post with a zip.
lambs4
10-05-2003, 05:16 PM
Can someone please help me on this one? I have tried may attempts to solve this problem myself.
The problem more than likely involes how I'm calculating and displaying my graphics on screen and not how I'm performing collision checking.
Note: You'll need Allegro to compile the source yourself.
Stan100
10-07-2003, 06:42 PM
Well, from looking at you're first post, I going to try to help you without downloading the code. (I don't like allegro.)
It sounds like you may be over-checking your bounds. Fiddle around with it. Try subtracting 1 from your collision on the right and bottom. In fact as I right this, I'm am starting to think that I am 100% right. Maybe, maybe not.
I would have replied sooner but MY USER CP DOESN'T SEEM TO BE RECIEVING UPDATES TO ANY OF MY THREADS
(hint to moderators. Plz tell me why)
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.