Welcome, Guest. Please login or register.

Login with username, password and session length

Advanced search

1411457 Posts in 69368 Topics- by 58422 Members - Latest Member: daffodil_dev

April 22, 2024, 05:52:51 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperDesignResources for NPC AI
Pages: [1]
Author Topic: Resources for NPC AI  (Read 3104 times)
Level 0

View Profile
« on: September 07, 2023, 07:14:14 AM »

I've been having a hard time digging up good resources for building out convincing NPC AI. I'm curious what games like Dwarf Fortress or Rimworld use to make their characters feel alive, or what makes certain enemy AI very unique and memorable.

I've done my research on implementation, i.e. behavior trees, state machines, etc. I'm more looking for AI design principals. What should an actor do when its not in combat or when a player interacts with it non violently. Conversely, what should an actor do in combat? Something more convincing then just "run towards player and wack them".

Anyone have any links or knowledge to drop on this subject?
Level 4

View Profile
« Reply #1 on: September 19, 2023, 11:29:14 AM »

I think you might want to try to find research on goal and utility based autonomous agents. Selecting behaviors can depend on a variety of factors that are calculated. I think the term has settled on utility agents. The overview of those is that you give your agent traits (hunger, fear, mission objective, etc.) and define formulas that relate them together, and those act as your conditions for selecting your behaviors in a behavior tree.

But this is probably a frustrating answer, because it is still more implementation theory. As for what NPCs should actually be doing, that is I guess an area of behavior science research. At some point, you just have to make a decision to have them wander around or build out custom arbitrary behaviors, goals, and traits that come from your imagination. But if you have it all set up to be calculated properly it becomes a lot more straightforward.

As for advice on what you should have your NPCs do, I think that is more in terms of artistry, and we would really need to know more about what NPCs you have in your game. For example, in a game like monster hunter, the monsters have really advanced behaviors that they use to interact with the environment. They will jump in pools to take baths, or go graze in different parts of the levels... but that follows from their design as monsters living in nature. When and why they do this are calculated by the traits they are designed with and the utility functions they have, but if you aren't building a game about monster creatures in nature you obviously need your NPCs to do different things.

I would really recommend starting by looking up articles on gamasutra (it's called gamedev now I think) about how an AI in another game you are interested in was made, because their are a lot of postmortems that get posted there on the subject. There was a good killzone one that talked about utility agents, and I believe the definitive starter for Behavior tress comes from a Halo 2 postmortem. I can't find the links though. And then there are usually recommendations for books, papers, and other resources.
Pages: [1]
Jump to:  

Theme orange-lt created by panic