A 2D top-down shooter featuring multiple enemy types, pickups, levels, and a complete game loop, built with efficient and scalable systems like MVC architecture, object pooling, and ScriptableObjects.
-
Core Gameplay
- Three Levels: Progress sequentially; levels are loaded additively for streamlined management.
- Enemies:
- Dog: Fast and agile.
- Goblin: Tanky and strong.
- Ranged Shooter: Fires projectiles at the player.
- Turret: Stationary and shoots continuously.
- Pickups:
- Shield: Temporary invincibility.
- Health Boost: Restores health.
- Ammo Pickup: Refills ammo.
-
Interactive Features
- Complete Game Loop:
- Lobby, pause, restart, game lost/win UI, and level transitions are all integrated seamlessly.
- Progress through levels with clear objectives; the next level unlocks only after completing the current one.
- Complete Game Loop:
-
Audio-Visual Feedback
- Sound Effects: Integrated sound effects for gameplay actions like collecting pickups, shooting, player damage, and UI interactions, enhancing immersion.
-
Object Pooling
- Efficiently manages reusable objects:
- Enemy Pool: Handles all enemy types (Dog, Goblin, Ranged Shooter, Turret).
- Projectile Pool: Manages projectiles for ranged enemies, turrets, and the player.
- Pickup Pool: Governs random and pre-placed pickups across levels.
- Efficiently manages reusable objects:
-
Service Locator Pattern
-
A centralized Game Service manages all core services:
- Player Service
- Pickup Service
- Level Service
- UI Service
- Sound Service
- Common Pools for example: Pickup,Enemy,Projectile Pools
-
-
MVC (Model-View-Controller)
-
Strict adherence ensures modularity and scalability:
- Model: Manages game data (enemy stats, pickups, and player state).
- View: Handles UI elements, player visuals, and animations.
- Controller: Implements game logic and connects Model and View.
-
-
Observer Pattern
- Decouples game actions like starting, restarting, and transitioning between levels.
- Example: On restarting, updates enemy spawns, resets player stats, and clears the level.
-
ScriptableObjects
- Used to store:
- Enemy Attributes: Health, speed, and behaviors.
- Pickup Configurations: Shield duration, health value, and ammo count.
- Enables seamless scaling and reusability.