The Challenge
Design expressive NPCs that react differently to player behavior in a Y2K, humor-driven world. The AI had to feel dynamic and unpredictable without relying on complex behavior trees or heavy computation.
What I Built
Built a modular AI system using state machines to manage dynamic NPC behaviors
Developed reusable
State
classes to simplify logic and extend functionalityImplemented a probability-weighted decision system to simulate emotional reactions to player interactions
Designed contextual NPC responses for various triggers (e.g., taking photos, using weapons)
Ensured maintainable and scalable AI architecture aligned with the game’s surreal tone
My Technical Contributions
1. State Machine Architecture
Problem:
Create a flexible system to manage multiple NPC behavior states without duplicating logic or hardcoding transitions.
Solution:
Implemented a base State
class and assigned each NPC a current state. Each state handles its own logic, making behaviors easily extendable.
Result:
Enabled a clean, modular AI system where behaviors like idle, scared, angry, or impressed could be easily added and maintained.
2. Idle State Implementation
Problem:
NPCs needed to simulate life when idle by wandering and occasionally speaking, helping the world feel alive even without player interaction.
Solution:
Programmed an IDLE_State
that moves NPCs to random points on a timer and triggers random dialog lines every few seconds.
Result:
NPCs now display lively, naturalistic idle behaviors that fill the game world with charm and unpredictability.
3. Probability-Based State Switching
Problem:
Make NPCs react differently depending on what the player does, and ensure reactions feel unpredictable but intentional.
Solution:
Created a probability-weighted selection system that assigns each possible reaction a range of chances. On trigger, the system randomly selects a new behavior based on those weights.
Result:
NPCs now respond with a wide variety of emotional states (scared, angry, silly, etc.) based on interaction context — making each encounter feel unique and reactive.
Results & Impact
Delivered a system that supports 10+ unique NPC behaviors with clean, reusable code
Achieved dynamic emotional responses that aligned with the game’s surreal tone
Created a more immersive and humorous world by making NPC reactions context-sensitive and unpredictable
What I Learned
Modular AI design: Building a state machine system taught me how to architect flexible, reusable logic for characters with multiple behaviors.
Balancing unpredictability with control: Using weighted randomness gave me insight into how to simulate emotion and variation without sacrificing player clarity.
Readable systems matter: By separating responsibilities across states and selectors, I created maintainable AI logic that other team members could easily understand.
Player expression through NPCs: Designing reactions to player input reinforced how AI behavior can shape game tone, humor, and emotional response.
Key Technologies & Patterns Demonstrated
AI Architecture: Finite state machines with modular state classes for behavior control
Design Patterns: State pattern, Weighted probability systems, Modular component design
Procedural Systems: Random point navigation, Probability-based decision making
Game Feel: Context-sensitive reactions, Dynamic emotional state transitions
Performance: Lightweight AI without behavior trees, Timer-based update cycles