← Back to Games

Forgotten Arsenal

UnityC#
Forgotten Arsenal

Role & Scope

Role:Gameplay Programmer
Team Size:3
Platform:PC
Duration:1 month
Status:Released

About this game

Forgotten Arsenal is a first-person shooter built around a modular weapon system spanning 16 scripts across 4 architectural layers. The core design centers on a dual-ammo cartridge mechanic, where each weapon holds two elemental ammo types fired independently via left and right mouse buttons. Ammo behaviors are implemented as pluggable strategies through an IAmmoEffect interface, enabling effects like chain lightning and fire damage without modifying the core weapon code. Weapon stats and ammo configurations are driven by ScriptableObjects, keeping data separate from behavior for designer-friendly iteration.

My Contributions

Core Gameplay & Combat Systems

  • Implemented a modular weapon system, supporting multiple ammo types with unique behaviors, recoil patterns, ammo consumption, and damage.
  • Designed and implemented weapon overheat and cooldown mechanics, including HUD feedback and gameplay tuning.
  • Developed ammo inventory and stacking systems, enabling upgrades, pickups, and UI-driven ammo management.
  • Implemented damage handling pipeline, supporting different damage types and contextual enemy reactions.

Enemy AI & Behavior

  • Implemented multiple enemy types including giant spiders, nightcrawlers, and a flying wraith
  • Integrated animation events to synchronize enemy attacks, damage windows, and death behaviors.
  • Developed enemy health systems, including enemy health bars and visual feedback on damage.

Player Interaction & World Systems

  • Implemented interactable systems using interfaces, enabling scalable interactions such as doors, power boxes, pickups, and portals.
  • Developed portal-based scene transitions, including fixes for player positioning and fall-through edge cases.
  • Added traversal mechanics such as jump pads, reward platforms, and environmental hazards.
  • Implemented destructible environment elements, including frozen breakable walls.

Audio & Narrative Systems

  • Implemented a dialogue and voice line manager, supporting multiple voice lines and skip functionality.

Level Design & World Building

  • Responsible for Level 1 in its entirety, including layout, enemy placement, pacing, and environmental storytelling.
  • Implemented cutscenes using Unity's Cinemachine, coordinating animations, camera movements, and audio cues.

Modular Weapon & Ammo System

A data-driven weapon system for a first-person shooter built in Unity, featuring a dual-ammo cartridge mechanic where left and right mouse buttons fire different elemental ammo types simultaneously. The system is designed around ScriptableObjects and interfaces for maximum extensibility.

Dual-Ammo Cartridge

Players load two different ammo types into left and right slots of a cartridge. Left click fires one element, right click fires the other, and holding both triggers a combined dual-fire mode. Ammo types include Basic, Lightning, Fire, and Ice, each with unique on-hit effects. Players swap ammo loadouts mid-game through a drag-and-drop UI built on Unity's EventSystem (IDragHandler, IBeginDragHandler, IEndDragHandler).

ScriptableObject Data Architecture

Weapon stats (gunStats) and ammo configurations (AmmoTypeConfig) are ScriptableObjects, separating data from behavior. Designers can create new weapons or ammo types entirely in the Unity editor with no code changes required. Each ammo config defines its damage type, base damage, whether it's hitscan or projectile, VFX prefabs, SFX, and available upgrades.

Pluggable Ammo Effects (Strategy Pattern)

An IAmmoEffect interface allows each ammo type to carry a unique on-hit behavior. The Gun and Projectile classes check for and execute these effects without knowing their implementation. New effects are added by creating a MonoBehaviour that implements IAmmoEffect and assigning it to an AmmoTypeConfig asset, requiring zero modification to existing firing code.

Chain Lightning (Recursive Algorithm)

The LightningEffect implements IAmmoEffect with a recursive chain-lightning algorithm. On hit, it uses Physics.OverlapSphere to find nearby enemies, selects the closest unchained target, applies damage, and recurses. A HashSet<Collider> tracks already-hit targets for O(1) deduplication. Each chain link also triggers the ammo's current upgrade effect (e.g., LightningUpgradeStun stops NavMeshAgents).

Overheat System with Event-Driven UI

Continuous firing builds heat. When max heat is reached, the weapon locks out and enters a cooldown coroutine. The GunManager exposes a delegate event (HeatIncreased) that the OverheatMeter UI subscribes to. The gun system has no direct reference to UI, keeping the two fully decoupled.

Hitscan + Projectile Dual Firing Modes

Each weapon is flagged as hitscan or projectile in its ScriptableObject. Hitscan weapons raycast from the camera and apply damage instantly. Projectile weapons spawn a prefab that moves forward and handles collision via OnTriggerEnter. Both paths feed into the same IDamage and IAmmoEffect pipelines.

Per-Ammo Recoil

Each ammo type has its own recoil profile (vertical kick, horizontal kick, gun kickback). On fire, coroutines lerp the camera rotation and gun model position/rotation to create distinct weapon feel per element.