Pac Man Architecture page Iteration 1

Group 8 Architecture Document PacMan

History of Revisions: 11/01/02 Chris Epsom Initial Document Creation

This Function will initialize all of the game graphics and all midlet properties. Then it will control which screens are shown and be the “main” thread. Some psuedocode is as follows:

returnVal = initScreen();
if(returnVal == 1)
returnVal = optionsScreen();
else if(returnVal == 2)
returnVal = gameScreen();


There is a GameScreen class that will be the superclass for all of the different game screens. Each screen will be called by PacManMain and will return an integer with proper return value when finished. Screen functions will be initScreen(), refreshScreen(), and closeScreen().

This will be a class that will store the game board as well as the current status of the number of dots, their position, the ghosts’ positions, and PacMan’s position. Each BoardSpace will be 1 byte in order to conserve space. Each bit will be as follows: (starting with most significant) isDot, isSuperDot, isPacMan, isGhost, isLeftWall, isRightWall, isTopWall, isBottomWall.

This will be a class that holds all of the utility functions that the game will use. InputListener() will be used to gather inputs from the User through the keys on the phone. AnimateScreen() will accept an array of BoardSpace objects and will draw the screen and the position of all of the other objects. The AnimateScreen() function will run multiple times with each call and have a timeout period in order to animate a complete movement from one square to the next.

Pac Man Architecture page Iteration 2