Skip to content

Yashvardhan4197/TopDownShooter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TopDownShooter

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.



Features

  • 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.
  • Audio-Visual Feedback

    • Sound Effects: Integrated sound effects for gameplay actions like collecting pickups, shooting, player damage, and UI interactions, enhancing immersion.

Patterns Used

  1. 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.
  2. 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
  3. 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.
  4. 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.
  5. ScriptableObjects

  • Used to store:
    • Enemy Attributes: Health, speed, and behaviors.
    • Pickup Configurations: Shield duration, health value, and ammo count.
    • Enables seamless scaling and reusability.

SCREENSHOTS

Screenshot 1      Screenshot 2

Screenshot 3      Screenshot 4

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published