Skip to content

striderzz/First-Person-Shooter-Unity3D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FPS Wave Shooter

FPS Wave Shooter is a Unity-based first-person zombie survival game focused on fast-paced combat, wave-based enemy spawning, ragdoll physics, weapon switching, enemy drops, and boss encounters.

Screenshot (592)

Overview

The player must survive waves of zombies using different weapons while fighting multiple enemy types. Enemies can chase, attack, throw projectiles, drop items, and collapse into ragdolls on death. The game also includes boss AI with a state-based attack system.

Key Features

  • First-person shooter gameplay
  • Wave-based zombie survival system
  • Multiple enemy AI types:
    • Melee zombie AI
    • Throwing enemy AI
    • Boss AI
  • Boss state machine:
    • Chase state
    • Throw state
    • Pause state
    • Immediate chase when player leaves range
  • Ragdoll death system
  • Death particle effects
  • Enemy disappears after death delay
  • Enemy health system with health bar UI
  • Enemy drop system with random drop probability
  • Weapon holder system with weapon array support
  • NavMeshAgent-based enemy movement
  • Animator-based attack and run states
  • Low-poly visual style
  • Smooth FPS controls

Enemy System

The game includes different enemy types controlled through an enum-based system:

public enum EnemyAIType
{
    EnemyAI,
    EnemyThrowAI,
    BossAI
}

This allows the same health/death system to support normal enemies, throwing enemies, and bosses.

Boss AI

The boss uses a simple enum state machine:

public enum BossState
{
    Idle,
    Chase,
    Throw,
    Pause
}

Boss behavior:

  • Chases the player when outside throw range
  • Stops and throws projectiles when in range
  • Pauses for a short time after attacking
  • Immediately returns to chase if the player moves out of range
  • Repeats attack cycle while the player stays in range

Ragdoll and Death Effects

When an enemy dies:

  • AI script is disabled
  • NavMeshAgent is stopped and disabled
  • Health UI is hidden
  • Ragdoll physics are enabled
  • Enemy tag changes to Dead
  • Death particle effect is spawned
  • Enemy drop may spawn based on probability
  • Enemy object is destroyed after a short delay

Weapon System

The weapon holder supports an array of weapons, making it easy to add more guns without rewriting weapon switching logic.

public GameObject[] weapons;

Weapons can be activated by index, allowing scalable weapon selection.

Getting Started

  1. Clone the repository.
git clone <your-repository-url>
  1. Open the project in Unity.

  2. Open the main scene.

  3. Make sure the player object has the tag:

Player
  1. Make sure enemies have:
  • Enemy health script
  • Correct AI script
  • NavMeshAgent
  • Animator
  • RagdollController
  • Health canvas
  • Death particle prefab
  1. Bake the NavMesh for enemy movement.

  2. Press Play and survive the zombie waves.

Unity Requirements

Recommended:

  • Unity 2021 LTS or newer
  • AI Navigation / NavMesh support enabled
  • Rigidbody and Collider components for ragdoll enemies

Controls

Typical FPS controls:

  • WASD: Move
  • Mouse: Look around
  • Left Mouse Button: Shoot
  • Number Keys / Weapon Input: Switch weapons
  • Space: Jump

Controls may vary depending on your player controller setup.

Project Highlights

This project demonstrates:

  • Unity FPS gameplay programming
  • Enemy AI using NavMeshAgent
  • State-machine based boss behavior
  • Ragdoll physics integration
  • Weapon switching with arrays
  • UI health bars
  • Death particles and delayed object cleanup
  • Randomized enemy drops
  • Modular enemy scripts

Future Improvements

Possible future features:

  • More weapon types
  • More zombie variants
  • Boss health bar UI
  • Ammo and reload system
  • Upgrade shop between waves
  • Sound effects and music
  • Main menu and pause menu
  • Save/load high score system
  • More maps and arenas

Contributing

Contributions are welcome. Feel free to open issues, suggest improvements, or submit pull requests.

License

This project is licensed under the MIT License.

Acknowledgments

Special thanks to the Unity development community and Kenney Assets for helpful resources and game-ready assets.

#fps #unity #zombies #opensource!

Releases

No releases published

Packages

 
 
 

Contributors