Space Shooter
A 3D first-person shooter where I built the entire combat layer - ScriptableObject-driven weapons with ammo and recoil, two enemy types, a Pickup inheritance tree, and a clear-the-room win state - on top of Unity's first-person controller.
Playable Open the WebGL tab to play it in your browser.
-
01
Weapons Data-Driven Weapons
Drove every weapon from a
WeaponSOScriptableObject - fire rate, damage, magazine size, and automatic vs semi - so a new gun is a data asset and a prefab, not new code.WeaponSO.cs -
02
Combat Hitscan Shooting
Built hitscan fire as a camera-forward raycast gated by the weapon's fire rate and ammo, spawning a hit VFX and damaging any
EnemyHealthit strikes, with a muzzle flash, a shoot animation, and a Cinemachine impulse for recoil shake.Weapon.cs -
03
Weapons Weapon Switching
Programmed an active-weapon controller that swaps guns by instantiating the SO's prefab and injecting the ammo HUD, and reads input to fire in semi or automatic mode per the weapon's config.
ActiveWeapon.cs -
04
Enemies Chaser & Turret
Built two enemy types - a
NavMeshAgentrobot that paths to the player every frame and self-destructs on contact, and a stationary turret that tracks the player withLookAtand fires Rigidbody projectiles on a cooldown.Robot.cs·Turret.cs -
05
Pickups Pickup Inheritance
Wrote an abstract
Pickupbase that floats, spins, and fires a virtualOnPickupon player contact - ammo and weapon pickups override it to refill the magazine or switch to a new gun.Pickup.cs·AmmoPickup.cs·WeaponPickup.cs -
06
Game Flow Health & Win State
Built shield-bar player health that cuts to a death Cinemachine camera on defeat, enemy health that reports each kill to a
GameManager, and a win the moment the room is cleared - with timed spawn gates feeding the fight.PlayerHealth.cs·GameManager.cs