Thread: collision

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    380

    collision

    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.
    Last edited by lambs4; 10-01-2003 at 03:33 PM.
    Don't you dare hit me on the head, you know I'm not normal.
    A Stooge Site
    Green Frog Software

  2. #2
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361
    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.
    Stan The Man. Beatles fan

    When I was a child,
    I spoke as a child,
    I thought as a child,
    I reasoned as a child.
    When I became a man,
    I put childish ways behind me"
    (the holy bible, Paul, in his first letter to the Cor. 13:11)

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    380
    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.
    Don't you dare hit me on the head, you know I'm not normal.
    A Stooge Site
    Green Frog Software

  4. #4
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361
    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)
    Stan The Man. Beatles fan

    When I was a child,
    I spoke as a child,
    I thought as a child,
    I reasoned as a child.
    When I became a man,
    I put childish ways behind me"
    (the holy bible, Paul, in his first letter to the Cor. 13:11)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Some collision handling fun
    By DavidP in forum Game Programming
    Replies: 9
    Last Post: 04-13-2008, 08:45 AM
  2. Collision Detection Problems
    By Dark_Phoenix in forum Game Programming
    Replies: 1
    Last Post: 12-17-2006, 03:25 PM
  3. Collision Detection
    By Grantyt3 in forum C++ Programming
    Replies: 3
    Last Post: 09-30-2005, 03:21 PM
  4. collision detection
    By DavidP in forum Game Programming
    Replies: 2
    Last Post: 05-11-2002, 01:31 PM
  5. Replies: 4
    Last Post: 05-03-2002, 09:40 PM