A classic space shooter game build implementing Object Pooling, State Machine and OOPS in Unity.
The main goal of the project was build -
- A pool system for Bullets and Powerups
- State machine for Enemy movement and Shooting State
- Background Scrolling using UV Rect
- Use Service Locator, MVC and Observer pattern as well
Use WASD or Left/Right key to move player ship. Use Left mouse button to shoot bullet.
After every interval a powerup is spawned which changes shooting style for player.
The architecture for code was broken down in following ways -
- Use Service Locator for communication between Services
- MVC pattern for different entities in game
- Generic Object Pool for Bullet and Powerup spawn
- State Machine for Enemy state change
- Observer pattern for Play, Game Over events
I build this project over the course of 2 days and its been an incredible learning curve.