Project Overview

A fast-paced top-down 2D shooter game developed in Unity, featuring intense enemy wave mechanics, precise sprite-based graphics, and optimized performance systems. The game challenges players to survive increasingly difficult waves of enemies while managing resources and upgrades.

This project showcases advanced Unity 2D development techniques, including object pooling for performance optimization, dynamic difficulty scaling, and responsive player controls that create an engaging arcade-style gaming experience.

Key Features

Enemy Wave System

Dynamic enemy spawning with increasing difficulty, multiple enemy types, and intelligent AI behavior patterns.

Player Damage System

Comprehensive health management with visual feedback, invincibility frames, and smooth damage transitions.

Object Pooling

Performance-optimized memory management for bullets, enemies, and effects to maintain smooth 60fps gameplay.

Score Tracking

Real-time score system with multipliers, high score persistence, and achievement-based progression.

Sprite-Based Assets

High-quality 2D sprites with animation systems, particle effects, and responsive visual feedback.

Responsive Controls

Smooth player movement with precise aiming mechanics and customizable control schemes.

Technical Implementation

Built using Unity's 2D framework with custom C# scripts for game logic, the project emphasizes performance optimization and code maintainability.

Core Systems:

  • Unity 2D Physics - Collision detection and rigidbody movement
  • Object Pooling Pattern - Memory-efficient entity management
  • State Machine - Game state management and scene transitions
  • Event System - Decoupled communication between game components
  • ScriptableObjects - Data-driven enemy and weapon configurations
// Object Pool Manager for Performance Optimization public class ObjectPool : MonoBehaviour { [SerializeField] private GameObject bulletPrefab; [SerializeField] private int poolSize = 100; private Queue<GameObject> bulletPool = new Queue<GameObject>(); void Start() { // Pre-instantiate bullets for the pool for (int i = 0; i < poolSize; i++) { GameObject bullet = Instantiate(bulletPrefab); bullet.SetActive(false); bulletPool.Enqueue(bullet); } } public GameObject GetBullet() { if (bulletPool.Count > 0) { GameObject bullet = bulletPool.Dequeue(); bullet.SetActive(true); return bullet; } return Instantiate(bulletPrefab); } public void ReturnBullet(GameObject bullet) { bullet.SetActive(false); bulletPool.Enqueue(bullet); } }

Game Mechanics

The game features a carefully balanced progression system that keeps players engaged:

Player Systems:

  • Health & Lives - Multi-hit system with visual health indicators
  • Weapon Upgrades - Collectible power-ups that enhance firepower
  • Movement - 360-degree movement with momentum-based physics
  • Shooting - Mouse-aimed firing with multiple weapon types

Enemy AI:

  • Chase Behavior - Enemies track and pursue the player
  • Spawn Patterns - Strategic enemy placement and timing
  • Difficulty Scaling - Progressive speed and health increases
  • Special Abilities - Unique enemy types with different attack patterns

Challenges & Solutions

During development, several technical challenges were overcome:

Performance Optimization:

Challenge: Frame rate drops when spawning large numbers of bullets and enemies.

Solution: Implemented object pooling pattern to reuse GameObjects instead of constant instantiation/destruction, resulting in consistent 60fps performance.

Collision Detection:

Challenge: Accurate hit detection for fast-moving projectiles.

Solution: Used Unity's continuous collision detection and implemented raycast-based bullet detection for pixel-perfect accuracy.

Game Balance:

Challenge: Creating engaging difficulty progression without overwhelming players.

Solution: Implemented data-driven design using ScriptableObjects for easy tweaking of enemy stats, spawn rates, and power-up effects.