Sign in to follow this  
Wavinator

Intelligent Yet Playable Swarming Response

Recommended Posts

Wavinator    2017
Is there a way to make enemies swarm intelligently across a level yet still give the player tools to counter this behavior? Imagine a situation where you've elected to invade some underground lair or bunker filled with enemy troops. If the enemy swarmed to counter your threat it would lend an air of "veracity" to the game's world-- you might find yourself admiring the fact that you're faced with foes that evince intelligent looking behavior. But in this sort of environment what you'd probably also get would be dull, frustrating gameplay: You'd enter a room or corridor, enemies would pack the way forward and possibly even the way back, and (if combat worked as it does in most games with hit points) you'd probably trudge through mobs of enemies. The enemies might cluster in such a way that they'd empty themselves from the level, presenting most combat in the first few rooms. If that's the case, why bother to have an intricate level? I've been thinking a one against many invader would need tools-- decoys to misdirect, some ability to control space (lock doors), maybe even places where they see the overall level and misdirect enemy teams. They would probably also need the ability to hide. Maybe the mob situation I describe above would be the result of failure, certain death for a player who allowed the enemy to mass on them in one place? Have you seen anything like this or, if not, what issues do you see?

Share this post


Link to post
Share on other sites
Kaze    948
Quote:
Original post by Wavinator
Maybe the mob situation I describe above would be the result of failure, certain death for a player who allowed the enemy to mass on them in one place?


In many games this can work in the players favor by finding a good choke point and taking on all the enemies their.

Share this post


Link to post
Share on other sites
Atrix256    539
I think left for dead sets a good precedence here.

The enemies are very weak so swarms aren't catastrophically bad for you.

They do swarm in certain areas (via the AI director) but there are still ambient zombies that fill the entire map.

Also, there are the few special zombies (boomer, hunter, etc) that are harder to kill so it breaks up the monotony of just killing swarms of weak enemies.

IMO anyhow, i think l4d does a great job with this stuff (:

Also, have you played sim ant? I know that game is ancient but that game was all about swarms :P

Share this post


Link to post
Share on other sites
Wavinator    2017
L4D is a great example, but zombies aren't so much what I had in mind in terms of expectations. You'd maybe expect to find lone zombies because you don't expect them to coordinate (of course if they do it's a good surprise). But what about something like cops or army soldiers or an orc battalion responding to your threat?

And chokepoints could be good, but while playable it seems not so smart for an enemy force to allow itself to be consistently soaked up at one spot over and over again.

Share this post


Link to post
Share on other sites
Atrix256    539
Hrm...

I would think agility, stealth or intelligence would be your only defenses

Being able to move more quickly than they do, or in ways that they can't to escape and help prevent yourself from getting trapped in a corner would be one way.

Like in prototype when you got swarmed you could use your mutant powers to scale buildings and fly away etc.

or if you were a mouse trying to navigate a level full of cats that would chase you on sight, you could have mouse holes and tunnels that you could fit in that they couldn't.

Or if the swarm guys weren't very intelligent it could be like zelda phantom hourglass how there are those knights that when you get into their field of vision they chase you (til you run back to a safe spot) but that if you are smart, you can sneak by them undetected.

Or like in phantom hourglass, or in modern warfare 2, metal gear solid etc, you can be stealthy to avoid getting swarmed and when you do get swarmed have to return to a stealthy position if you can, but like you said, it's kind of a "you've screwed up" scenario to get swarmed.

I'm curious now what ideas other people have :P

Share this post


Link to post
Share on other sites
JasRonq    156
Mass attacks for mass enemies of course. In a one on one fight, to make it dramatic, you have some great duel or shoot him in the eye with an arrow. When there are five dozen encircling you and more coming, you break out the big guns and start splatting some orc corpses.

Share this post


Link to post
Share on other sites
Quote:
Original post by Wavinator
L4D is a great example, but zombies aren't so much what I had in mind in terms of expectations. You'd maybe expect to find lone zombies because you don't expect them to coordinate (of course if they do it's a good surprise). But what about something like cops or army soldiers or an orc battalion responding to your threat?
I'd imagine (but don't actually know) in a military base or securely guarded building, when a alarm goes of, every guard wont spontaneously leave their assigned guard positions, to wildly pursue the intruder. I'd think guards on patrol, or in the breakroom, would, but guards assigned to doors would not, until the intruder comes into sight. And certainly the guards in the control room wont leave their monitoring stations to chase after the player.

Orc battalions? If you are invading a orc fortress, suppose some stay behind out of laziness, or to finish their meal that was interrupted? And ofcourse the ones guarding the prisoners won't up and leave their position, or risk getting beheaded and impaled on a pike by their leader. If the orc battalian isn't in a base, but just raided a city and is camped there now, there would be plenty of orcs wandering all over the city in ones and twos, scavenging for extra loot.
Quote:
And chokepoints could be good, but while playable it seems not so smart for an enemy force to allow itself to be consistently soaked up at one spot over and over again.
Have multiple routes to get to any location, and have the enemy AI split up into groups, and take different routes to get to the same location. The player might take out alot of troops in a good chokepoint, but the longer he waits, the more likely a different group of enemies will find their way behind him.

Break swarms of enemies into multiple groups of enemies (6-12), and have the different groups coordinate with each other on a larger scale, while the individual enemies interact with others in their group on a smaller scale.

I like what Atrix256 said about L4D's special zombies to break the monotony. This can be re-done with things other than zombies also: Soliders: Have snipers and soldiers with rockets, maybe even a flamethrower or two. Guards: Normal guards with pistols (bullet proof vest), guards with semi-automatics (bullet proof vest), SWAT-like guards with fully automatics and full body armor, guards with powerful semi-auto shotguns, guards who cut the lights and come in with night-vision. Orcs: Basic orcs with swords, taller/stronger orcs with battle axes, orcs with lots of armor (higher ranking leaders), orcs with chain whips, etc...

Share this post


Link to post
Share on other sites
Ashaman73    13715
Quote:
Original post by Wavinator
L4D is a great example, but zombies aren't so much what I had in mind in terms of expectations. You'd maybe expect to find lone zombies because you don't expect them to coordinate (of course if they do it's a good surprise). But what about something like cops or army soldiers or an orc battalion responding to your threat?

And chokepoints could be good, but while playable it seems not so smart for an enemy force to allow itself to be consistently soaked up at one spot over and over again.

I've got a similar feature in my (fantasy) game. The basic idea is, that entities are organised in groups, that they share a location based knowledge and that they have different tasks.

When a level starts, the enemies start exploring the surrounding and sharing the knowledge about already explored locations (room based knowledge). When they encounter obstacle (doors) or opponents, they will add special knowledge (obstacle, danger) which will decay over time.
Each entity has special skills, like exploring, hauling resources, attacking enemies or unlocking doors, which will lead entities to look for work. I.e. if an enemy encounter the player, it will mark this place as "dangerous". Other enties or whole squads which has the skill of "fighting enemies" will decide on their own to clear the give place of enemies (in this case killing the player).
On the other hand, other entities with other tasks and skills will continue to swarm the level
So, to prevent the enemy to swarm the whole level, the player have to utilize doors and other obstancle to "control" the enemy flow, because just sitting at one chokepoint will not attract or block all enemies.

Share this post


Link to post
Share on other sites
Dragoncar    517
Note: This could be difficult to actually implement.


This would go with the other suggestions about having soldiers work as squads and only some in an area would come looking for you. What you good do is implement various ranks of officer as actaul enemies in game. By the player killing these officers depending on the rank various effects would occur.

eg. Killing the commander stops reinforce ment from other areas of the base. Killing the officer for the area makes it take longer for enemies to gang up on the player.


Also for ways the player can counter the swarm is to keep moving (this would include moving to high ground, leading enemies into choke points) but staying in one place to long would mean the play has to face to many enemies. Also if the player is able to not be followed the enemies would search rather than swarm until another alarm is triggered or the player spotted.


Another suggestion would be to make not all enemies have long distance communications such that the only enemies that can come and help are people in hearing range or if one enemy can run to get them. This could add to game play as you could kill the person who is running off to get help or let him go to bring the enemies to you, or if a long range communicator is present do you try and kill all the enemies quickly or snipe him first.

Share this post


Link to post
Share on other sites
jbadams    25712
If there player is facing a group of intelligent, coordinated enemies (such as soldiers or police) she might attack the leader of the group, causing the group to panic or disperse. This opportunity could be used to more easily take down the remaining enemies, or to escape/achieve an objective/whatever.

She might also attempt more guerrilla-eske tactics, picking off enemies in a hit-and-run style or by setting traps. Perhaps if the player is able to wound but not kill an enemy the rest of the group will remain stationary or fall back until their comrade is stabilized, or picking off a member of a group might make that group wary of proceeding.



Groups of enemies attacking a choke-point would likely realize the player has an advantage and try a different approach:
  • Some enemies remain and attempt to suppress or distract the player from a longer range whilst others use an alternative route to access the player's location.

  • The enemies fall back, perhaps to a choke-point of their own in an attempt to ambush the player.

  • The enemies attempt to "level the playing field" by using flash-bangs, smoke bombs, etc. to alter the environment in an advantageous way.

  • The enemies try using a longer ranged weapon (grenades, etc.) to clear the way before attempting to move forwards again.

Share this post


Link to post
Share on other sites
LorenzoGatti    4449
Level layout is an important factor.
Consider the lair assault scenario for different kinds of lair:
- At the door of a unicursal maze, it's attrition at its purest, with tactics limited to retreating to heal and moving to get a good shot or to get out of range;
- With one entrance and a tree-structured tunnel network, the player has new pathfinding decisions to make, but enemies cannot easily surround him or escape without long-range coordination;
- With loops, enemies can reach the player's back and/or retreating from his front much more esily;
- With extra entrances, most enemies are able to retreat outside the base and come back to where the player went in, possibly nailing in what seemed to be a promising choke point.

And not all choke points are equal: players will confidently stop indefinitely and fight in a narrow corridor, but will run around like mice if they have to fight the same lump of enemies from open places (e.g. through the open door of a building in a sniper-infested courtyard).

I think that the probability of being surrounded or attacked from behind and the perceived clear and safe portions of the level are the main criteria that govern how the player handles choke points; controlling enemy information and movements would be a nice extra, but punishing boring strategies is much more important.

And regarding enemies vacating interesting parts of the level to be slaughtered in one place, it can only happen if you want to: many solutions are possible.
- Enemies might vacate nothing interesting, wasting no game assets and limiting the important parts of the level to where the fights happen.
- The vacated parts of the level can have other reasons than fighting to be interesting, e.g. searching for something or witnessing events.
- Realistically, only a limited reserve force would "swarm": many enemies would be alerted and keep their places, ready for the intruder to come to them.
- Concentrated enemy forces can be strong enough to force the player to retreat (or to die, reload the game and try moving a bit more), at which point they can unswarm where they came from with modest losses.
- In a suitable level, enemy forces can force the player to move, keep moving themselves, and bring the fun wherever the player goes.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this