Portfolio
Pacman
Program Description

An application written in java to emulate the classic namco video game pacman. The player controls Pac-Man through a maze, eating pac-dots. When all dots are eaten, Pac-Man is taken to the next stage. Four enemies (Blinky, Pinky, Inky and Clyde) roam the maze, trying to catch Pac-Man. If an enemy touches Pac-Man, a life is lost. When all lives have been lost, the game ends.
This program stores the top scores in a MYSQL database.
It outputs report scores in xml file.
Features
- Usage of keyboard or joystick.
- As the level progress more ghosts will be generated.
- Double buffered images to store in memory
- Scores are stored into a MYSQL database.
- Usage of cron4j scheduler to generate xml report on scores.
- Run in three output modes
- Preliminary Network capability
- Usage of MVC Design Pattern
- Sound Engine
Code Snippet
private PacmanImg pacmanImages;
public int viewdx, viewdy, pacmanx, pacmany, reqdx, reqdy;
public int pacmananimpos = 0;
public Pacman()
{ setPacmanImages(new PacmanImg());
}
public void DrawPacMan(Graphics2D g2d) {
if (viewdx == -1)
DrawPacManLeft(g2d);
else if (viewdx == 1)
DrawPacManRight(g2d);
else if (viewdy == -1)
DrawPacManUp(g2d);
else
DrawPacManDown(g2d);
}
|
Screenshots
« Back to the desktop applications