Computer Science Canada Pacman Help |
Author: | hacker101 [ Wed Jun 08, 2005 8:09 pm ] | ||
Post subject: | Pacman Help | ||
Hi everyone! I have to make pacman for a project in Turing and I am having problems setting the boundaries so that pacman does eat the walls. I know I need to use View.What.Dot.Colour but how? Please tell me how or if you think there is another way other than View.What.Dot.Colour please advise. Please repond ASAP Thanks P.S Here is my code.
|
Author: | vagyb [ Wed Jun 08, 2005 9:13 pm ] | ||
Post subject: | |||
you can do this for example if ur coordinates for pacman are X and Y
after then u put w/e u want to happen if it touches a blue wall |
Author: | Drakain Zeil [ Wed Jun 08, 2005 9:45 pm ] |
Post subject: | |
What the guy above me said, and also, I suggest you take that map background and make it into a picture file: quicker to load it's easy to read less lines of code. for more there's no need 8) |
Author: | vagyb [ Wed Jun 08, 2005 9:52 pm ] |
Post subject: | |
Drakain Zeil wrote: What the guy above me said, and also, I suggest you take that map background and make it into a picture file:
quicker to load it's easy to read less lines of code. for more there's no need 8) yep create it with paint as MAP.bmp file and load it on turing var picture: int picture := Pic.FileNew ("MAP.bmp") to draw it put Pic.Draw (picture, x,y, picMerge) |
Author: | hacker101 [ Wed Jun 08, 2005 10:25 pm ] |
Post subject: | Thanks |
Thanks for the response, the What.Dot.Colour should work Another thing how would you go about drawing the dots for pacman to eat so that computer know when to execute the next level I know haven't included the code but yeah Thanks |
Author: | vagyb [ Wed Jun 08, 2005 10:48 pm ] |
Post subject: | |
well u would draw balls and use whatdotcolor again to detect the balls, and every time it eats a ball u can make a counter += 1, and whenever the counter reaches 30 or something the next level happens. so var counter: int:=0 if whatdotcolor (x,y) = yellow then get rid of the balls here (u can take them off screen thats wat i usually do) counter +=1 end if if counter > 30 then blabla new lvl |
Author: | hacker101 [ Thu Jun 09, 2005 8:08 am ] | ||
Post subject: | Pacman Help | ||
vagyb wrote: you can do this
for example if ur coordinates for pacman are X and Y
after then u put w/e u want to happen if it touches a blue wall This doesn't work, here I attached the full pacman file. I have also tried using View.What.Dot.Colour Please help asap. Thanks |
Author: | gohan [ Fri Jun 10, 2005 1:47 pm ] | ||
Post subject: | |||
LMAO...that is one hungry Pac man...(sry hacker101), but you gotta think that is funny...anyways, to get rid of the problem, just |1|First draw it on paint(cause everyone has that,or at least should have it) |2|Save as whatever(Pacmap.bmp) |3|put this code in
|4| Put Restrictions in (check jamonathin tutorial on Character Movement Restrictions)>>>>> http://www.compsci.ca/v2/viewtopic.php?t=8175 |5|Play the game (YEAH GUY) |
Author: | gohan [ Fri Jun 10, 2005 1:49 pm ] | ||
Post subject: | |||
LMAO...that is one hungry Pac man...(sry hacker101), but you gotta think that is funny...anyways, to get rid of the problem |1|First draw it on paint(cause everyone has that,or at least should have it) |2|Save as whatever(Pacmap.bmp) |3|put this code in
|4| Put Restrictions in (check jamonathin tutorial on Character Movement Restrictions)>>>>> http://www.compsci.ca/v2/viewtopic.php?t=8175 |5|Play the game (YEAH GUY) |
Author: | Drakain Zeil [ Fri Jun 10, 2005 3:51 pm ] | ||
Post subject: | |||
gohan wrote: LMAO...that is one hungry Pac man...(sry hacker101), but you gotta think that is funny...anyways, to get rid of the problem, just
He doesn't even need to do it in paint. He already have the level drawn, there is some line in turing that exports to bmp for you... too bad I've forgotten it :p.
|1|First draw it on paint(cause everyone has that,or at least should have it) |2|Save as whatever(Pacmap.bmp) |3|put this code in
|4| Put Restrictions in (check jamonathin tutorial on Character Movement Restrictions)>>>>> http://www.compsci.ca/v2/viewtopic.php?t=8175 |5|Play the game (YEAH GUY) I used it in my pain program. |