AppStars

THQ Studio Australia, 2002–2004

Console game AI: a companion that follows the player.

At THQ Studio Australia we were lead AI developer for Goddard, Jimmy's robot dog in Jimmy Neutron: Boy Genius on PlayStation 2, Xbox and GameCube. Goddard used AI and path-finding to follow Jimmy through the game, the same family of algorithms that finds directions in a map app today.

Client
THQ Studio Australia
Industry
Games
Services
Game AI, path-finding, real-time 3D, developer tools
Platforms
PlayStation 2, Xbox and GameCube, in C and C++; Windows tools in MFC
Our role
Lead AI developer for Goddard; we also built an MFC scene editor and a texture asset toolchain, and worked as lead UI programmer.

The challenge

A companion character has one of the hardest briefs in game AI. It's on screen nearly all the time, usually close to the player, so every mistake is seen. It has to keep up without getting in the way, go around walls rather than through them, and never look lost. If it gets stuck behind a crate, the player notices at once.

It also had to do this on three consoles at once, inside a frame budget shared with rendering, physics and the rest of the game. Console hardware of the time gave AI a thin slice of each frame, and the behaviour had to be the same every time a tester played a level, so that bugs could be reproduced and fixed.

Our approach

The game's code belongs to THQ and isn't in our archive, so this page doesn't show any of it or claim details we can't check. What we can describe is the problem and the standard techniques for it, which we used then and still use. Goddard needed to answer two questions every moment: where should I be, and how do I get there? Keeping those apart is what makes a companion predictable and debuggable.

What we built

Deciding where to be

A follower doesn't aim for the player's exact position. It aims for a point near them, a comfortable distance behind, and only moves when the player gets far enough away. That gap stops the companion jittering on every small step the player takes. A state machine, with states such as idle, follow and catch up, keeps the decision readable: at any moment the character is in one named state that a designer or tester can see.

Finding a way there

Getting to that point means path-finding: a search over a simplified map of where a character can walk, usually a graph of connected points or areas. The classic algorithm is A*, which explores the most promising routes first by adding the distance already travelled to an estimate of the distance left. It finds a short route without searching the whole level, which is what makes it affordable in a game frame. The quality of the estimate matters: one that never overestimates guarantees the shortest path, while a slightly greedy one finds a good-enough path faster. The map matters as much as the search. A coarse graph of waypoints is cheap to search but gives robotic, corner-to-corner movement; a mesh of walkable areas costs more to build but lets a character take natural lines through open space.

Keeping up as the player moves

The player never stands still, so a path found a second ago is already out of date. A companion re-plans when its goal moves far enough, reuses what it can, and spreads expensive searches across frames so no single frame stutters. It's the same problem a navigation app solves when it re-routes as you drive.

Never looking lost

Real levels have moving platforms, doors and gaps. Good companion AI detects when it hasn't made progress, picks a nearby reachable point instead of standing still, and has a last-resort way to rejoin the player out of sight. Smoothing the path, so the character doesn't zigzag from point to point, makes it look like it knows where it's going.

Tools for the team

At THQ we also built an MFC scene editor and a texture asset toolchain for the console games. Tools like these let designers and artists change the game without waiting on a programmer.

Architecture

  1. SenseWhere is the player, and where am I?
  2. DecideA state machine picks idle, follow or catch up
  3. PlanPath-finding finds a route around the level
  4. MoveSteer along a smoothed path
  5. RecoverRe-plan or rejoin when stuck

The general shape of companion AI, not code from the game.

Results

Under the hood

Game AI before "AI" meant a model.

What it taught us

A modern AI assistant that takes actions is, underneath, the same loop of sense, decide and act. A language model is very good at deciding. Everything around it is engineering a game programmer would recognise: named states so you know what it's doing, a limited set of actions so it can't do what it shouldn't, time and cost budgets, and a fallback when the plan fails. That's how we build generative AI agents and assistants with MCP.

It also taught us that AI work is mostly about people: designers who need numbers to tune, testers who need to see what a character is thinking, and players who need to read its intent. Before THQ we wrote a 3D engine for the Game Boy Advance, whose demo game ran computer-driven trucks on a state machine.

What we'd do now

Lessons from game AI for anyone putting AI in front of users.

  • Make the AI's state visible. A companion that can print "following" or "stuck, re-planning" is one you can debug. An AI agent should log its plan and each action the same way, so people can see why it did what it did.
  • Budget every decision. Games give AI a slice of each frame. Agents need the same discipline: limits on time, tokens, tool calls and cost, with a sensible answer when the budget runs out.
  • Always have a fallback. A companion that can't find a path picks a nearer point instead of freezing. An assistant that can't complete a task should say so and hand over, not guess.
  • Choose the simplest technique that works. Open ground needs steering, not search. Many business problems need a rule or a small model, not the largest one available.

Questions

What is path-finding in games?

It's a search for a route from one place to another around obstacles, over a simplified map of where characters can walk. A* is the classic algorithm.

Why don't you show the code?

The game's source belongs to THQ and isn't in our archive. We describe the problem and standard techniques instead of claiming details we can't check.

How does game AI relate to today's AI?

Today's assistants still need clear states, limited actions, budgets and fallbacks around the model. Those are the habits game AI teaches.

Related

The services behind this work, and more stories like it.

Services

Case studies

Bring us the hard problem.

A 45-minute discovery call with the engineer who'll build it.