Computer Science Canada Collision code |
Author: | Armir [ Tue Apr 19, 2005 7:20 pm ] |
Post subject: | Collision code |
Hey, i have an assignment where I have to create a PACMAN game and I've done everything except making the pacman stop at certain points. I was just wondering if anyone could help me out. Thnx |
Author: | Vertico [ Tue Apr 19, 2005 7:36 pm ] | ||||
Post subject: | |||||
i can help. considering im also making a pacman game. to stop him at certain places you can use an x- y- cordinates to see were its suppost to stop. for example...
or you can use something called whatdotcolor to determine if the cordinates hit a color or not hit a color when moving. so if the walls are bue and u want it 2 stop when u reach it then u do something like....
i used whatdotcolor in my game. some ppl say its not good, but its alot easyer then finding the exact cordinates of every wall. you can look up both ways of "stopping at certain points" in the tutorials if this didnt make much sence |
Author: | jamonathin [ Tue Apr 19, 2005 10:12 pm ] | ||
Post subject: | |||
just to add to what the samurai cat guy said. if you're going to use coordinates, make sure you take in mind that he's going to be moving there, so when ur checking use: Left or right (x - dif) or (x + dif) Up and Down (y + dif) or (y - dif) and just add in >0 or <maxx or <maxy if you're using whatdotcolor, same thing. for example moving pacman left
|
Author: | c0bra54 [ Wed Apr 20, 2005 12:24 am ] |
Post subject: | |
there should be a colision system for whatdotcolour up, i helped out the person with it.. i am the random guy doing colision for a 64 map game ... lol |