Skip to main content

The AI Programmer

·551 words·3 mins
Engineering Roles in Game Dev - This article is part of a series.
Part 4: This Article

Overview
#

The Role of an AI Programmer is to work closely with Design and Animation to breathe life into characters that make the world come alive.

Not to be confused with LLMs or Gen-AI.

To achieve this, an AI Programmer will develop systems for Enemies, Allies, and other NPCs (Collectively, “Agents”). The game will often need systems for:

  • Navigation (NavMeshes, NavVolumes)
  • Perception (Sight, Hearing, Damage/Injury, Team Alerts)
  • Behaviour (Do I take cover? Attack? Disengage and return to patrol?)

The AI programmer will also need to examine how these systems interplay with each other.

  • How is my behaviour impacted by my environment/effects/emotion (scared/angry)
  • How do I coordinate my behaviour with other team/squad members for tactical plays?
  • What do I do when I can’t navigate to my target?

And then we might need to think about optimizing for scale.

  • What happens when our agent count goes 10x? 100x? For instance on a large open world.
  • Can we have agents “think” less often if there are more of them? (i.e. only X number of agents get to evaluate new options each frame.)
  • Can we push their decision making to other processing threads?
  • Can we put agents to sleep if they’re not relevant (i.e. too far away)
  • Can we have agents share information (i.e. pathfinding routes) if they’re close together instead of calculating for each one?
  • How do we avoid ‘kiting’ large numbers of enemies? (impacting performance)

And along with all that there’s the most important goal: “Coming to life”. The goal of AI behaviour in games is often more about player perception of that behaviour and less about actual intelligence. This is articulated brilliantly in the following GDC talk by Kimberly Voll.

So that’s a general overview. Let’s get into some specific questions. I asked Slavomir Krbyla, formerly AI Systems Owner at Romero Games for his advice for anyone interested in getting into AI Programming.

Pros
#

Why might a student want to pursue this role?

Programming AI for games is an intersection between technology and psychology. If you are looking for a technically challenging role, where solutions are often out of the box, this is a great fit.

Cons
#

Why might a student want to avoid this role?

It is difficult to create game AI. Usually, a large number of NPCs need to look intelligent, without eating all the computation budget for the game. The complexity of algorithms can be much higher than in other game dev fields.

Example
#

Something you did in this role as an example of the kind of work you get to do?

You need to face your creations in-game to evaluate them, and the resulting AI behaviour often surprises you. My favourite example is throwing a grenade into Swat squad that I was creating. It triggered an evade maneuver that chaotically repositioned survivors. Once the combat behavior started again, they assaulted my position from different angles, breaching through windows. This felt like a scripted ambush, but it was totally emergent.

Student Projects
#

What kind of student projects would you recommend doing to prepare for this role?

Creating a project with basic stealth and combat in Unreal Engine to get familiar with topics like navigation, perception, and behaviour modelling is a great start.

Learning Resources
#

Dave Ryley
Author
Dave Ryley
Game Developer
 Author
Author
Slavomir Krbyla
Senior Game Programmer at Bohemia Interactive
Engineering Roles in Game Dev - This article is part of a series.
Part 4: This Article

Related

The UI Programmer

·986 words·5 mins
Overview # The UI Programmer works closely with Design and UI Artists, and is responsible for any and all user interfaces seen in the game. This can include, Start Screen and start game flow Settings Screens The Player HUD Weapon reticules Enemy, Item Indicators Inventory Screens Minimaps Quest/Mission logs And any other screens or widgets you can think of.

The Gameplay Programmer

·496 words·3 mins
Overview # The Gameplay Programmer is the “Swiss Army Knife” of Game Dev Engineering Roles. While other roles keep to a specialization, the gameplay programmer is defined by its lack of specialization, opting to go wide over deep to bring the other pieces together. As a Gameplay Programmer, you could find yourself working on, Player Movement Abilities Tutorial Systems Quest Systems Combat Systems Game Economy Systems Inventory Systems, Weapons and Items Just to name a few.

Engineering Roles in Game Dev

·719 words·4 mins
Getting into Game Development # I was approached to do a student talk at the University of Limerick for students of the Games Development course. For context, it’s a computer science/engineering course with a focus on games development. I’m an alumni myself, graduating in 2019, and have been working in games since then. I asked myself what kind of advice I would give my past self when starting on this road. There’s a mountain of skills to learn, technical skills, time management, collaboration, and more. As a student you’re relying on the course structure and modules to provide you with the direction you need, but as great as the course was, for me it was missing one thing.