PacMan! (updated with video)

JAKE isn’t just limited to robots and beepers. Since we have Movers in JAKE, we can create all sorts of objects, not just robots. It’s entirely possible to set up your own PacMan scenario, as in the video below:

I’ve already written about Ghosts. While working on the example programs to accompany JAKE, I’ve created a KillerGhost – a subclass of ghost that kills any robots it touches. All of this was done within the JAKE editor – it’s something (albeit difficult) that a student could do themselves without having access to the underlying JAKE Java code.

So we have a ghost that can kill robots. Since Movers can use different icons (using the name of a file in the same directory), we can also create a new PacMan class. This class is a type of Mover, so we can change its icon and give it move() and turnLeft() instructions. We can create methods on the controller (buttons) to move ¬†our PacMan character about the maze. Since it’s a type of Mover, it can’t move into walls.
If we add extra beepers to the world, the PacMan object can pick them up to use as food (as in the original game).

Previous Post

Next Post

Leave a Reply

Your email address will not be published. Required fields are marked *