The Surge 2: From Zombies to Squads – Part 3: Group Interaction Improvements

Read also:

Part 1: Mobility Improvements

Part 2: Combat Improvements


How enemy behavior improved in The Surge 2.

As a final point, in our quest for a greater and better player immersion and credibility in the behaviour performed by our NPCs when we confront them, we decided that we should improve the interaction and ­coordination of the AIs when they are part of a group. We already had a first basic implementation for the management of enemy groups, but it could only be used in predefined ­situations, which greatly restricted its possibilities of use and did not give the ­sensation of being a natural behaviour. Therefore, we implemented a completely new system that would allow us to coordinate and synchronize the members of a group in a way that any other NPCs could dynamically join the group in any situation if they were allowed and part of an allied faction, and giving designers tools to define different behaviours depending on whether an AI is part of the group or is an independent enemy.

One final thing to keep in mind is that we had to avoid situations where the player was overwhelmed when facing a group of enemies. Again, one of our main goals was to make encounters a challenge, not a source of frustration.

The first thing we did was to develop a simple implementation in which NPCs from allied factions can form a group or ask to join an existing group if they are within the radius of effect of a warning message to communicate that the player is a current enemy. This first implementation proved to meet its main objective which was to be able to create groups dynamically in any situation, but it quickly revealed a series of problems that needed to be solved in the next iteration.

The main problem that was noticed was that encounters against enemy groups quickly became unfair and resembled more like lynching the player than the almost choreographed action experience that we were trying to communicate. For example, enemies like the Hunters became a real nightmare in multiple encounters because of their ability to cloak themselves and their rapid melee attacks.

So, first, we needed a tool generic enough to be able to define different behaviours depending on the situation and that would work with any kind of enemy that the designers contemplated using in group encounters, and second, to design a technique so that the player could distribute his/her attention among the multiple enemies without being overwhelmed by a series of continuous attacks.

3 Government Patrol that can form a group.

The tool we found that could serve us for such purpose was our completely new Buff system, where we could configure different properties of the AIs for different ­situations, such as being part of the group or not, and they would return to their normal behaviour once the Buff was unequipped.

For example, with this Buff system we could decide if we modified the distance to follow a player or the skills that the enemy could execute. In the case of the Hunter, when we were in a group, we deactivated its special ability to cloak itself, for instance.

The technique we developed so that the player wouldn‘t be overwhelmed in confrontations with many attackers was to ­allow only one enemy of the group to ­attack the player getting close and using Melee skills. The rest of the enemies would be kept at a certain distance using Range ­attacks. The enemy marked as ­Melee ­changes ­depending on the distance of each enemy in the group with the player. In this way, the player could avoid attacks at a ­distance and keep much of his/her attention on the enemy, attacking it melee, forming a kind of combat circle very similar to what we can see in some movies when the hero faces several enemies at the same time. It‘s true that this approach is far from what would happen in a real situation, but it‘s much closer to the cinematic and ­choreographed experience we were looking for.

The question now is, what happens if an enemy marked as an enemy who fights at range distance has no range skills? The solution we found was simple, it is marked as a range enemy, but it is allowed to ­approach the player and attack him/her normally, with the purpose that it will become the „Enemy Melee“ once it is close enough. Here‘s a real example of how the system works.
On the picture at the top we can see three Government ­Patrols that can form a group if the situation requires it. Of these three Government Patrols, two are equipped to perform melee and ranged attacks because they possess an assault rifle and their melee weapon. In contrast, the Government Patrol without a helmet on the right of the image lacks an assault rifle and can therefore only perform melee attacks. When the player approaches the control gate, the Government Patrols form, ready to attack if the player gets too close.

Once the combat has begun the AI marked as Melee enemy attacks the player using only melee attacks, while its two companions use ranged attacks with their assault rifles, supporting it against the player. In this way, the player can maintain his concentration on the opponent right in front of him/her without fear of other enemies who might be an obstacle for his/her avoidance moves, or painful attacks that might interrupt him/her. In this case, the player still has to be focused in the range enemies, but their shots are certainly easier to dodge than some hand weapon swings.
Due to the movement and the course of the combat, the player has ended up attracting another enemy that has ended up marked as Melee and that‘s why it has changed its strategy and has switched to using its shield and its melee weapon. In this case the enemy that was previously marked as Melee is now marked as Range, but has no equipment to make use of skills at a distance, so it is allowed to approach the player to fight him/her hoping that at some point it will become again the enemy marked as Melee and return to the previous situation where its two companions provide help.

If during combat, one of the members of the group dies, the rest reconfigure their role in the group and return to the basic state. If only one member of the group is left alive, the group is removed and the remaining enemy is allowed to behave as an independent AI.

With all these changes the general ­Enemy behaviour in The Surge 2 clearly improved and allowed us to get an AI that behaved in a more natural and organic way, highly configurable, challenging to deal with but never a source of frustration. In addition to what we have learned and implemented, we now have a series of systems that we can continue expanding, helping to improve the recognised and engaging combat experience that is the clear identity of the Surge 2.


Carlos Torija Archilla
Gameplay and AI Programmer

Carlos has been part of Deck13 for almost 3 years helping with his knowledge in AI. During his career he has worked in different studios in Spain, UK and Germany and he has helped to develop several titles like: The Surge 1 and 2, LEGO Dimensions, LEGO Avengers, etc.

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *