Computer Science Canada

NEED HELP ENDING MY PACMAN GAME WHEN IT TOUCHES THE WALLS!

Author:  kbj7 [ Sat Jun 04, 2005 5:34 pm ]
Post subject:  NEED HELP ENDING MY PACMAN GAME WHEN IT TOUCHES THE WALLS!

this is my maze. HELP MAKE THE GAME END WHEN MY PACMAN TOUCHES THE WALLS PLEASE!!!!!
make an example so i would understand, im a newbie
thanx. Smile

code:
drawfillbox (0, 0, 20, 400, blue)
    drawfillbox (0, 400, 700, 380, blue)
    drawfillbox (620, 400, 640, 0, blue)
    drawfillbox (0, 0, 640, 20, blue)
    drawfillbox (60, 220, 80, 340, blue)
    drawfillbox (60, 60, 80, 180, blue)
    drawfillbox (60, 320, 290, 340, blue)
    drawfillbox (330, 320, 580, 340, blue)
    drawfillbox (560, 60, 580, 180, blue)
    drawfillbox (560, 220, 580, 340, blue)
    drawfillbox (60, 60, 290, 80, blue)
    drawfillbox (330, 60, 580, 80, blue)
    drawfillbox (120, 120, 140, 280, blue)
    drawfillbox (180, 280, 460, 260, blue)
    drawfillbox (500, 120, 520, 280, blue)
    drawfillbox (180, 120, 460, 140, blue)

Author:  lyam_kaskade [ Sat Jun 04, 2005 6:30 pm ]
Post subject: 

Interesting...but right now all you have is several boxes. A pac man game would be much more complicated. Check out the Turing Walkthrough here:
http://www.compsci.ca/v2/viewtopic.php?t=8808

Specifically to stop the pacman from touching the walls, you'll need to learn about collision detection. This can be found at the collision detection tutorial here:
http://www.compsci.ca/v2/viewtopic.php?t=75

Author:  vagyb [ Sat Jun 04, 2005 9:48 pm ]
Post subject: 

i guess u can use whatdotcolor command for collison detection in a simple pacman game?


: