The unsung heroes of development

3 min read

Secret Level

BEST BEHAVIOUR Donkey Crew’s lead gameplay developer, SERGII GREBEN, on programming AI for NPCs

Topics
Topics

Sergii Greben’s path into game development is an interesting one. Having worked in a web development job for a few years, and finding that this failed to give him much satisfaction, he joined a group of passionate Mount & Blade modders; a group that soon blossomed into its own developer, Donkey Crew.

In the early days of the company, when things leaned more towards a group of enthusiasts rather than a professional team, he could essentially choose whatever he wanted to work on – and chose AI for human NPCs. “I was just trying to make them behave a little bit more like actual humans,” says Greben. “It’s all about iteration. Just try playing it. See what doesn’t work, what feels off, try to fix it. Try again, and so on, until it gets better.”

That was almost ten years ago. Now working on DC’s third game, Bellwright, Greben still applies the same fundamental approach – only now, the scope is much wider. The latest title is an ambitious project with strategy, survival and city building elements. There’s combat, but also more complicated NPC behaviours such as crafting and harvesting. They also need food and sleep. How do characters in this world prioritise?

“It’s a pretty complicated system underneath,” says Greben, “[we call it] a job priority system. Any activity that needs to be performed, whether it’s bringing material from one place to another, or performing some construction etc – is a job that’s registered on a system, and an NPC gets assigned to it. Now it’s his job, he does it until he switches to another.”

While you might expect the ‘jobs’ to vary wildly in programming difficulty, that’s not necessarily true. “It’s all very simple at the very basic level, and it all becomes very complex when you’re trying to make them look like real human beings. When you’re trying to make them stop, talk to each other. Pause in what they’re doing. That all becomes very complicated.”

AI AI OH

A few options were considered for NPC material gathering – including having simple representations within the player’s camp, such as a woodcutter’s tent and a woodcutter NPC, with the gathered material popping into existence there – but instead, these NPCs will act just as the player would themselves. This mimicking human behaviour can create a more immersive world, but it can also result in unexpected side effects during development.

NPCs WE SAW

Some memorable examples of AI in games

FEAR

Despite being 20 years old, FEAR boasts enemies acting smarter than those in many games.

LEFT 4 DEAD

L4Dfamously makes use of an AI director to orchestrate enemy and pickup spawns.

FORZA HORIZON 5

The Forzagames u

This article is from...
Topics

Related Articles

Related Articles