Game Screenshots
2. Engine Screenshots
Post-Mortem
Overview
The goal of this project was to create a playable version of the classic PacMan game using SDL. The game application involved two main parts: the level editor and the game.
What Went Well
Good OOD practice
We implemented a resource manager singleton for centralized resource handling
We developed a flexible component system with extensible classes (texture, control, collision components, etc.)
We created an abstract script class that could be implemented for different game objects
User-friendly Design
We provide an easy-to-use GUI for users to customize the layout of the game with a menu of game objects to select from, and even be able to change PacMan speed, ghost speed, and frightened duration.
Engaging Gameplay
We implemented unique pathfinding logic for Blinky, Inky, Clyde and Pinky to replicate the game as original as possible.
We introduced the innovative feature of two-player mode with one player being able to control a ghost, which renders the classic game more enjoyable.
What Could Have Been Better
Version control
We were all pushing directly to the main branch at first, which has led to complex, interconnected bugs. At one point, we had to rollback several commits to a stable version.
Project management
We could have a centralized task tracking board that tracks the process and assigns weekly tasks to each team member. We could also have regular meetings to synchronize with each other.
Testing
Limited time for thorough playtesting led to minor bugs in edge cases.
Lessons Learned
Breaking the game into smaller, reusable components simplifies debugging and feature updates.
Implement proper branching strategies and code review processes. Always create branches and only push when it is tested to work.
To Run on a MAC device (for both engine and game, access through main menu): At parent directory, in terminal, run "./Engine/bin/prod_sdl".
To Compile (for both engine and game, access through main menu): At parent directory, in terminal, run "dub -c game".
Main Menu: Click “Edit” or “Play.”
Edit page: Click existing files to modify existing levels or create a new level; both operations are in the level editor. Press “ESC” to go to the main menu.
Level editor: Click GUI buttons and the grids to put different game objects. Press “ESC” to finish the editing. If you are modifying an existing level, it will be autosaved. If you are creating a new level, input the file name and press “ENTER” to save; you can press “ESC” to discard the saving process.
Level editor-Custom: Press “ESC” to discard your design. Click “Save object to key” and then press any key you want that object to be bonded with. From now on, the key you bond will generate your customized block.
Play page: Click the level you want to play or cancel.
This is a somewhat detailed instruction for our game engine:
1. Some ghosts may behave weirdly; they are not bugs but features.
In detail:
Blinky
- Behavior: Directly tracks the player.
- Logic: Uses the player's current position as the target point.
Pinky
- Behavior: Predicts the player's movement direction and attempts to intercept.
- Logic: Uses a point located a certain distance ahead of the player as the target point.
Inky
- Behavior: Combines Blinky's position and the player's position for complex path planning.
- Logic: Calculates the vector from Blinky to a position ahead of the player. The target point is twice this vector offset from Blinky's position.
Clyde
- Behavior: Switches behavior based on distance to the player:
- If the distance is far, it chases the player.
- If the distance is close, it moves towards the spawn point.
- Logic: Determines the distance between the ghost and the player and dynamically selects the target point.
2. Arrow keys on the keyboard control Pacman, while the player ghost can be controlled by WASD accordingly. We leave the freedom to the player to design the chase game between a player Ghost and Pacman.
3. You can have multiple Pacman or ghosts, that is also a feature. Pacmans share bodies and spirits!
4. Customized blocks can bind on any key for any number. You can design the color of the block and grant it some properties. Make sure you press the bonded key in the level editor to place your customized blocks!