Hello friends
In my current implementation, my NPCs completely ignore their allies / unimportant characters, and entirely focus on how to directly kill their target. This is clearly extremely simple, so I’m wondering how I should handle more strategic communication / planning between entities.
My game is very “open ended”, so who characters fight, who are allies, and so on is very dynamic and complex. So some sort of “planner” probably wouldn’t work. Also how AI is built is very dynamic, with different characters having different “actions” that they can utilize, from melee attack to flee.
Instead, my thought is that npc’s can somehow communicate and agree on specific things, like an npc saying that they can be a ranged character, and another should go in for a melee attack.
Or am I overthinking it?
Josh
I’ve never done anything like this, so take the following with a grain of salt.
The first thought to pop into my head is that each agent would want to do some simple analysis of the scene, then make their own decisions based on what they perceive. For instance, if the target is already under attack by other agents, that might be a factor in a decision about what weapon to use.
This way you don’t need planning or communication. Also, it’s more likely to mirror how non-allied forces might behave in real combat. They probably aren’t going to discuss what each will do, they’ll observe and react.
In other cases, you can have pre-defined groups which have set behavours - certain members might always engage in melee while others always hang back and provide some kind of support.
Whatever you do, keep it as simple as you can to get the desired result from a player’s perspective. Making things smarter behind the scenes is cool for programmers and designers, but if it won’t make things noticeably different to the player then it isn’t really changing the game.
P.S: This is probably better suited to the Game Design forum.
2 Likes
What I have done for group AI is usually start with a kung-fu circle and a blackboard. Use the kung-fu circle to manage the number of enemies attacking the player, and if certain enemies are a lot stronger take that into account with a weight or load based system.
Next, use a shared blackboard so enemies can select a group strategy based on what ever group goal is relevant.
The goal is to make the NPCs feel realistic to the player and fun to interact with. If you implement group strat planning using a blackboard, make sure you set up some audio signals for the player to pick up on. For example, if one NPC is going to cover another while the second one rushes the player, that enemy should play an audio that says “Rush him while I cover you!” The key is to give the player feedback about what is going on so the player can appreciate it and enjoy it.
3 Likes
You can check how Dishonored 2 did it with Crews system:
We group our ai into fire teams of 4. Each AI has its own scope. But the fire teams are controlled by a AI Director as we call it. The director can act on the info it gets from the fire teams and dispatch teams or individual AI. We do not cheat, the director only have the info the AI can relay to it. So if you kill it before it can relay a radio message to the director the information will not be relayed. The time the radio message takes depends on the spoken line. If the AI can speak the entire line the Director will get the message and he can act on it. Also if a AI team member fires a gun and you kill hmi right away after. Nearby fire teams will investigate the unreported discharge.
Alot of tweaks like that. Our AI is coded to be unpredictable. Most AI is not for gameplay reasons. We might need to add some predictability down the road. Game play tests will tell
3 Likes
The simplest way to do it imho is to decouple global scene goals from agents.
Basically you have a “strategic system” that just maintain a list of scene goals and rank them, agent scan the list and subscribe to one according to slot available and condition like proximity. It can be thing like guard a place, attack the player or heal another agent.
Agenta lso have internal decision system that is basically a personal secondary goal system (which can act as personality, reflex etc …), that can make them disengage the scene (like flying away ie prioritize survival). BY disengaging they allow other agent to take the slot, which can create emergent situation…