Lost Redemption
Design breakdown
Attack Plans
With Lost Redemption, I wanted something more than the basic "follow-the-player" AI. The game required more tactical variety, specifically distinct behaviors for ranged and melee units. My goal was to implement state machines that allowed enemies to switch fluidly between patrolling, chasing, and attacking based on sensory input. I developed a state machine where each state (Patrol, Chase, Attack) has its own logic. For ranged enemies, I cast a line cast that I would use with raycasting, originating from an "Eyes" game object to simulate line-of-sight detection. Once the raycast detects the player, the AI transitions to an Attack State, triggering a coroutine to handle weapon firing rates independently of the main update loop. For melee units, I used a detection radius instead of raycasts. This allowed them to "sense" players behind them or in close quarters, triggering a Chase state until they reached a specific attack threshold. This eliminated the "tunnel vision" common in my previous projects. The AI became significantly harder to cheese because it could effectively track player movement and maintain persistent pressure, creating a much more challenging combat experience.
Pathfinder
For a critical escort mission in Lost Redemption, I needed to engineer a 2D pathfinding system that allowed an NPC to dynamically navigate complex vertical terrain, including platforms and ladders, to guide the player. Since the native Unity NavMesh is optimized for 3D, I sourced a plug-in that would assist me in creating NavMeshes for 2d spaces. With this plug-in, I custom-baked a navigation surface that specifically defined walkable ground and vertical transition zones. I laid out two types of areas for the AI to use: walkable and ladders. Ladders allowed the AI to navigate vertically. To complement the pathfinding, I also developed a state-driven animation controller using Integer-based parameters to drive transitions. This ensured that the AI’s physical movement (velocity and direction) was tightly coupled with its animation states for walking, climbing, and idling. The overall result was a functional navigation system that successfully met the mission's requirements and respected the level's verticality. The project validated my 2D navigation architecture. It also provided critical insights into the synchronization challenges between pathfinding data and state-driven animations, specifically regarding vertical traversal fidelity. These findings have established a clear technical roadmap for refining AI responsiveness in future iterations.
Gunfight
When it came to designing the boss fight, I mapped it out as a two-stage encounter specifically to break "single-weapon" playstyles and force players to master the full combat kit. Stage one utilized a "vulnerability window" design. I implemented a reload cycle that disables the boss's firearm, creating a tactical opening for melee engagement. I also programmed the boss to retreat to the opposite side of the arena after taking damage, resetting the playing field and preventing the player from "stun locking" the encounter. Additionally, I prioritized player feedback by dynamically hiding the weapon mesh during reloads and implementing unique hit-reaction animations for each stage to signal progress without relying solely on UI health bars. This created a high-stakes "push and pull" dynamic. Play testers were forced to switch from defensive dodging to aggressive melee rushing, resulting in a boss fight that felt like a comprehensive mastery test rather than a repetitive gear check.
Final Words
I wanted the climax of the boss to transcend a standard kill-loop by seamlessly transitioning the antagonist into a friendly NPC, thereby creating a narrative-driven finale. I engineered a state transition where, upon reaching zero health, the AI’s combat controllers were instantly hot-swapped for an NPC sub-system, ensuring a bug-free transition between hostile and friendly logic. To achieve this visually, I collaborated with character artists to trigger a custom animation, which I tied to a logic gate that flagged the boss as dead and initialized the NPC sub-systems. This technical pivot enabled the gameplay to transition seamlessly into the narrative, eliminating a jarring cutscene and delivering a high-impact story beat and a meaningful emotional payoff for the player.