Game AI & Algorithms

Technical Samples

CONTENT

Game AI Agents: Spatial Reasoning

“Where can I go?”

Path Networks

Problem

An agent can’t reason about raw level geometry. Before it can decide where to go, the world has to be reduced to something searchable — a graph of places and the connections between them.

What I built

Algorithm to connect sampled waypoint nodes over arbitrary level geometry: candidate nodes sampled across the walkable surface, edges validated by traversability tests between node pairs, then pruned to remove redundant connections.

Graph edges are only valid if the player can navigate between them without any geometry collisions. Therefore, player width and proximity of graph edges to world geometry needed to be considered.

A* Pathfinding

Problem

An agent can’t reason about raw level geometry. Before it can decide where to go, the world has to be reduced to something searchable — a graph of places and the connections between them.

What I built

Algorithm to connect sampled waypoint nodes over arbitrary level geometry: candidate nodes sampled across the walkable surface, edges validated by traversability tests between node pairs, then pruned to remove redundant connections.

Graph edges are only valid if the player can navigate between them without any geometry collisions. Therefore, player width and proximity of graph edges to world geometry needed to be considered.

The Gameplay Engine

Architected a scalable game backend focusing on SOLID principles.

Dependency Injection Service Backend

I built the entire gameplay backend on service interfaces — every system is accessed through an abstract interface, never a specific implementation. That means real services can be swapped for lightweight stand-ins (a NullInputService, for instance) to run and test any part of the game in isolation. The same pattern that lets writers and designers query any object cleanly is what makes the backend testable and safe to keep extending.

I deemed this architecture choice vital for decoupling and managing the engineering complexity of an RPG.

Game State Stack-based FSM architecture

Every gameplay phase and transition — dialogue, pause, cutscenes — runs through one Game Manager class. Built as a stack-based state machine, so any state can suspend what’s running and resume it cleanly. 

Enables a scalable game architecture via single-responsibility game manager classes. Critical for dealing with the complexity of an RPG.

Like what you see?