This is an educational project that aims to provide an implementation in Unity of each pattern described in the book Game Programming Patterns by Robert Nystrom.
You'll find the code for each pattern at the path Assets/Project/ along with a readme file that explains how the pattern was used and to what end.
Please mind that these are just demonstrations. If you don't know a pattern and how it works, please consider reading the respective chapter of the book and then come here to see a more robust implementation.
You can play a web version of the "game" here.
Here's the current stage of development for each pattern:
- Command ✅
- Flyweight ✅
- Observer⏳
- Prototype
- Singleton
- State ✅
- Double Buffer
- Game Loop
- Update Method
- Bytecode
- Subclass Sandbox
- Type Object
- Component
- Event Queue
- Service Locator
- Data Locality
- Dirty Flag
- Object Pool
- Spatial Partition
Assets provided by Kenney, Quaternius and Emcee Flesher