Thread: Pac-man World
View Single Post
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 02-20-2011, 02:00 PM

Congratulations! I couldn't look at your program because I had not yet downloaded the new version of Alice 2.2, but I have now and I see that you have used the same collision detection that I did for my Maze program. This is great! I think you are the first person so far to actually use it the way I did in my program, while other people had troubles with understanding it.

Although I like that you understood my collision detection, I don't think it is the best thing to use in this situation. You see, you are giving the user too much freedom. They aren't supposed to be allowed to turn whenever they want and touch the walls. In the real pacman when you change directions, it waits until you hit a valid intersection and then changes directions there. If I wrote this program I would not have used this collision detection, instead I would use dummy objects at every intersection. Then I would have an infinite loop checking to see all the time whether the pacman is near any of the dummies, and if they hit the intersection then it would change direction from there depending on the button hit. The collision detection I did in my maze is not the best option here, but I do like that you understood it and was able to recreate it in another game.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote