Project Type: Solo, Simplified Pacman Clone
Technologies: C++, SFML
Span: September 2015 – Present
System Support: Ubuntu 15+
[Source Code]: https://github.com/invaderjon/gdev/tree/pacman
- Correct and integrate NxN spatial partition implementation for collision
- Animation (in progress)
- Collision handling
- Better game code organization
- Introduce win/lose conditions
- Blackboard/broadcast player position for ghosts
- A* pathfinding
- Handle based asset manager
- Custom container classes
- Custom allocators
- Polling based input system
- Event system
- JSON parser and writer
- Custom file types
The ghosts utilize A* pathfinding with the Manhattan distance heuristic to navigate their way across the map. Currently they randomly select destination on the map, navigate there, and then select a new destination. Eventually, this behavior will be replaced with chasing the player.
Handle Based Asset Manager
All resources in the game are obtained and accessed via handles rather than by pointers. The centralized resource manager handles allocating and loading all assets in the game. Although not implemented, this allows the engine to decide when it is appropriate to unload assets, such as during a low memory event.
Custom Container Classes
To avoid memory allocation/deallocation and allow for performance optimization, there are custom implementations of a dynamic array (vector), hash map, and hash set. These utilize a custom allocator rather than calling new/delete.
The engine supports the usage of custom allocator implementations. This gives the user the freedom to implement optimizations such as pre-allocation to avoid common memory allocation bottlenecks.
Polling Based Input System
An input system is implemented by the engine, which allows the user to check the states of inputs during each frame.
A global event system exists that allows users to register for and dispatch events. Events are defined by an interface, which has a method to determine its type.