Sunday, November 15, 2009

Levels

13 levels have been implemented and the game moves to the next level once all pellets have been eaten.

Pellets

Added pellets on the map. Pacman 'eats' them as he passes over them. Pygame rects have proved to be very useful so far.

Saturday, November 14, 2009

Refining Walls

Using a variety of tiles to represent walls apparently gives a much better appearance:

vs


Improving Maneuverability

I realized that making pacman change direction into a new tunnel was very hard since the key had to be pressed at the exact pixel to avoid collision. This would have led to frustrating gameplay. The solution was to keep track of the arrow key that was pressed last - the game knows where the player would like to go and checks at each step if the move can be made. Making turns is now much easier.

Resize Screen/Apply Background

Alright, I have resized the screen and removed the world map as background and now it actually looks like pacman:

Legal Ghosts

The ghosts now check for collisions and make a random decision for the new direction. Pacman follows keyboard input but the icon does not represent the correct direction yet. However, everything stays within the map and makes legal moves.




Continuous Motion

After adding the ghosts, I worked on implementing continuous motion - not step by step. The ghosts and pacman all move smoothly now, but only pacman checks for collisions - the ghosts can still go through walls and through each other.

Added Ghosts

Added ghosts today. At the moment they do not move - I am yet to implement continuous motion.