Swarm Technology in Game Design
From fake open-world games towards real open-world games.
(small re-edit March 2022)
What is wrong with current Open World games? What is Swarm Technology? What could it mean for games? How could it be programmed?
There’s some well-founded criticism against Open World games, that are actually hardly open world, predictive as a clock, often full of tricks to get you back in line to the scripted story. That has to do with the current limits on NPC’s characters that all have to be scripted. What if those scripts had stronger AI aspects, that increased possible responses in multiple ways? What if NPC’s responses to the hero were based upon tendencies, rather than set dialogues according to story trees? I mean tendencies that could alter their conversations or even actions, as either the hero or actual developments in their world called for different reactions?
Game Mechanics under Scrutiny.
Players are smart. They not only play within the game, they also study the game mechanics to see how to win, and deal with obstacles. And once players understand the mechanics behind the game, the game’s magic dwindles down.
Total War is a great game, but enemy generals are (thus far) all the same AI. So rather than offering diversity in aggressive, tactical and defensive generals, we get always the same kind of thinking. Many monsters and zombies in games are boring too. They all act the same, you only get bigger and more of them as you rise in the ranks. Oh, and the diverse strategies of monsters in Elden Ring. Even these become a repetitive puzzle over time. Gamers understand such patterns, and easily spot the most predictive ones, the ones that start spoiling the fun.
So what if game AI’s were stronger? What if games had actions and reactions build in, out of sight of the player, that could offer very diverse developments within the game, making even replays way more surprising? Imagine that in one run of the game it seems a horde is storming all the lands and all citizens start to flee. Can you stop the horde? In the second playthrough, you feel bound to save the horde from genocide by a mad king with aggressive followers, a king who is invading their lands. Such huge differences can be achieved through Swarm Technology.
New technology suggest the idea that some mathematicians added to programming teams, might make open worlds way more fluid, as encounters could develop over time. Enemies might learn as well. A world around the players may develop even, based on the outcome of battles or, I hope to help make that possible too, negotiations and relationships.
What is Swarm Technology?
Swarm Technology offers game design real-world swarm behavior and principles written as game rules to new kinds of applied game rules using the same concepts for all NPC’s. Thus NPC’s may develop way more diverse reactions, possibly influencing the whole world around them. Each NPC becomes like a bee with a message connected to the whole hive of all NPC characters.
Swarm Technology means blending AI capabilities with NPC crowd reactions. It takes the step from scripted behavior in given story trees towards responsive NPC’s acting on personal and crowd tipping points. Once these are passed NPC’s will act differently. Take a village that starts to look for a murderer together, once someone finds one of them murdered. Think guards raising the alarm. So each NPC and animal may get a number of thresholds that can trigger a given variety of reactions. Behavior may even change out of sight and control of the player.
Each NPC could have a financial threshold before they may do something for me, may have a fear threshold before they betray me to the guard, etc. Replayability may become so much better, by slightly resetting certain thresholds. In the first play of the game, it seems the people only follow me for money, in next they keep betraying me to their king, and in another, I must kill the king on my own, before they are willing to follow me.
Here’s a video of application in robotics. So why not in games?
Now I must admit. Getting Swarming right is hard to do. As this video shows. Rather than admit defeat, getting the balance right is, or should be, the story of the game!
As seen in the video, with players going on a killing spree, like European settlers with bison, the game designers chose the wrong solution to deal with that. Players should have been able to kill all wildlife and suffer the consequences, at the least for a certain period. Or learn that when they keep certain terrible monsters alive, they keep all of nature alive. Hence they may end up protecting monsters that want to kill them, against other players that want to kill the monster. Wouldn’t that be an interesting dynamic?
That’s the reality of nature, and it’s very hard to get that balance right. This is where this solution comes in:
and here’s how that might work…
When information becomes viral
Swarm Technology means the world around you isn’t fixed anymore because the world around you develops itself onward as well. The player may affect the world as in the butterfly effect or, become a butterfly getting caught in the storms of others.
As said, this means replaying the same game may feel like entering new lands, where responses are very different, problems are very different and the solutions needed very different. It may mean having to solve many problems at the same time. When rabbits go extinct, wolves start to attack people and farms. Then people need to flee, leaving farms behind, creating hunger in the land. Which may lead to the conquest of a neighboring country for food. Will you as a player, help or stop the invasion, explore what caused it and organize a wolf massacre, or help build enclosures around villages? And any solution might trigger side effects like a wolf massacre might lead to a rabbit plague, and all vegetables get eaten and lead to hunger as well, etc.
Now, why is this so incredibly essential that we go this way with games?
- Reality works like that. Kingdoms fell because of lack of wood because they chopped all forests down. Empires fell because too many men died in battles, unlike games where you can conquer forever. Empires may fall because of climate change or a new religion. On an even deeper, incredible important, level: Nature is not a commodity, and we humans must truly learn to understand this. Currently, the ecology of our oceans is in danger! Building Sims that treat nature as a commodity makes young people think it’s a matter of management, whereas, in reality, it is all about balancing, adapting to change, and protecting nature, even when the economy might seem to suffer because of that.
- On a more cheerful note, replay-ability. You may make yourself super strong and fast and problems few. You may create huge amounts of problems and be swept away. Settings you may change may include animal populations. So players can create their own problems, many monsters fights, or more people politics (by putting settings at very stable when it comes to nature). One can even leave clear settings out and leave it to the players. Expect them to make YouTube video’s advising each other what stats get what results, thus more free marketing and a lively community.
- Lesser cut-scenes are needed. King asking for (non-descriptive) help. King offering more/less power to the player. King either leaving his palace with head down or king rewarding player for his successes. And the player will have so much more options on how to solve an issue. Multiple ways to conquer an enemy camp become possible. Not only attacking is possible, but also creating a hungry bear plague over time doing the work for you or meddling in politics until the funding of the camp dwindles to zero.
- It offers more variation in gameplay. Games can become ultra-tough killing sprees. Or after a while finding the best balance to make a country thrive may be the deeper game. For this, you may have to become a gardener in the eco-system, a general in the army, and diplomat between towns, a builder, a killer, and not in the least a detective to find what hidden patterns shape each problem. Is an invasion a conquest, or are the invaders running from a problem at home? That’s for you to find out.
What will be different in the design?
Swarm Technology means designing games with included complexity in the behavior of all NPC’s and perhaps even animals. Information is seen as viral, thus attitudes, actions, and reactions spread like diseases jumping from one NPC to another, slowly creating mass movements through changing opinions.
Interventions of players may influence, or, as in the real world, sometimes not all. Trying to prevent a war may end in a painful disaster. A new crisis may happen (an invasion) while you thought you were close to solving a local love story. It means leaving behind the world of cut scenes that must be reached, and entering a world, where many AI dialogues may feel like one connected story as they each can help develop different outcomes of the game.
Swarm Technology conversations with given characters may change very much during the game, making 50 + different conversations possible with each NPC, each making sense within the context of the game. Consider that for immersion.
What could it mean for games?
- Instead of you reacting to what the game brings to you, and the game reacting within set limits to your actions, the game could also react within itself. This means you can be swallowed up by events, that swallow up the whole game. You might have migrating herds of animals that even have seasonal behavior. Or you might have an actual refugee crisis as a horde pushes people out of their lands. You might return to a village after a while to find the villagers are now involved in a fight with a village nearby. The evolvement of NPC’s with each other will create a more immersive experience, less predictive developments, and a feeling of being part of history, rather than a scripted story. The cycles of local daily life, may (in slow ways) start to interact with the cycles of the larger world. A village where the mine runs dry may be abandoned unless the player establishes new sources of income for it.
- Instead of well-placed enemies, you could have enemies that roam the map and even may follow trails left by the hero. (Cross a river!) You could have civilians that slowly would get more suspicious and or angry at the hero, while others still might feel positive towards him. You could have tipping points where populations might start a rebellion, either incited by the hero or against his rule. You could have armies forming out of peasants as their king becomes madder every day. And in MMO’s players loving to kill a lot may find they leave a trail of clues (cookies) and soon have a large posse breathing down their neck.
- In a more advanced mode villages might be in the process of slowly growing, with new people arriving. Growing tensions between subcultures might lead to interventions from the hero who might prevent genocide or, sadly, take part in one. (players might still think in Us or Them mode, only to find later that other options were available too.) You might have an economic system, where if NPC’s go below a certain amount, they either start begging or robbing. As a lord, you might discover your tax policies have actual effects on people's behavior, that not even the game designers could predict. Think how an NPC farmer may start poaching, fishing, or moving when his food income runs too low. Or how an NPC knight that doesn’t get paid enough, may start looting, then robbing or join the enemy if their loyalty stats are too low.
- Now we come to where the tech needs to be really smart. Instead of a few cutscenes, all scenes could be unscripted dialogues. With a smart AI system of dialogue creation, all NPC dialogues might have meaning and possible consequences in the game. In a Western listening to certain crooks in a corner might help you prevent or prepare for a bank robbery. Several developments might be started out of sight slowly growing in force. In a Western town, a bank robbery might be prepared, by one crook seeking others willing to aid him, while at the same time cattle ranchers build an army to chase natives and or sheepherders away, while the priest starts a campaign against alcohol. NPC’s meeting each other will have a tentative dialogue which researches what development is most dominant and urgent in their actions. From this, outcomes may ensue.
How It may Work In Conversations
Here’s an example conversation of two NPC’s. One has criminal intent. If a player wasn’t present, this conversation would take place anyway, only through a measured cookie exchange. Compare to Total War turns, where you wait for all sides to make their move. To calculate this one might have local calculations of individuals and regional calculations of general tendencies. And designers could hide the calculation running time in clever ways.
But if a player listens in, he might hear something like this:
1st part: Hello and establishing.
Jake (criminal bend on robbing banks with a gang): ‘Howdy.’
Pete (upstanding local citizen): ‘Howdy.’
Jake: ‘Good day isn’t it.’
Pete: ‘It sure is.’
Jake: ‘What are you up to?’
Pete: ‘Building a school.’ (here the AI can give diverse options, from fleeing the town, looking for my wife to protest against the sheriff.)
2nd part. Exchange of main interests. Given that Jake is a criminal looking for more gang members the exchange may go like this. Criminals will incite dialogue and not give away what they are doing.
Jake: ‘Nice. Good for the town.’ (the AI knows what category each answer falls. A reaction as fleeing for the army might make Jake switch to that option too, as it is more urgent than his own mission. other responses could be ‘good/sorry for you, your business, your family’, or plain ‘happy/sorry to hear that’.)
Pete: ‘I help our community to grow.’ (Explaining the category of his answer.)
Jake: ‘You got financial issues?’ (Jake can only interest poor NPC’s he meets with a grudge to consider joining his gang. And Jake will only rob the bank when he has collected a gang of five. Which may take a while, as Jake lives in a small town with few people with grudges, unless you the hero as sheriff make a mess of things)
Pete: ‘No. The town pays for the school.’ (The town pays for all collective buildings. The mayor decides what building is up, as inhabitants pay taxes and he has collected enough for a next village building. Unless of course, the hero enriched himself too much at the cost of all others in town. Yes, feels a bit like political reality. ;) )
3rd part. Rounding of.
Jake: ‘Good luck then. See you.’ (Jake notices no poverty and thus moves on. When the player is close, this full conversation takes place. When the player is a street away, these NPC’s just exchange a few cookies, establishing Jake has no need of Pete, at this moment and there’s not a collective problem, like armies, that all NPC’s need to deal with.)
Pete: ‘Goodbye.’
NPC’s might even walk away from people listening, when the conversation might turn more secret, giving the player to puzzle to come close without being noticed. Had Pete been interested Jake might have proposed they walk to a more private place. The player will need to sneak up to listen. The private talk he listens to may turn out to be about several other fixed options, like dating, gathering a protest, shady business deals like smuggling, investing in a mine, etc.
Now imagine every living animal and human had such strategies, all interacting with each other. Imagine 30 different kinds of meeting scripts each possibly influencing the course of the whole game world.
Here’s a worked-out concept of how to make this work in a game, written in January 2019. https://medium.com/the-gentle-revolution/ecodians-game-concept-302fb72c974f
How can this be done?
Each figure in the game could have certain behavioral flocking patterns that are just active on a larger map (invisible to the player). Here, like a swarm of ants, NPC’s that meet will exchange small amounts of data. All these meetings may change course for one or both NPC’s. A farmer may leave his field to join an army, a sick person may infect another. These calculations of information exchange may stop when the computer demands full attention to player interactions with his surroundings.
On the larger map, hidden cycles will go a lot slower and to a lot lower level of detail. In a certain circle (depending on software possibilities) around the player, NPC’s are activated to act such interactions openly and in more detail. Each NPC has therefore certain data packages (cookies) connected to them, from which they make exchanges with other NPC’s when they meet. For instance, a criminal NPC may either rob another NPC or try to enlist them into their gang. On the big map, game theory will help to slowly calculate expanding wolf hordes. Working towards certain levels that trigger villages to call for help, or flee as a whole.
Choose the deciders for your game.
What might these data packages be about? All NPC’s may have certain basic characteristics. Choose the elements that fit your game best: disease, criminal behavior, siding with a political or armed faction, religion, values, profession, helping build/find/chase/fight something(s), like/dislike of a person. These aspects may lead to activities such as participation in activities like lynch mob, posse, fleeing, stopping a fire, building a school. Also, political and religious views can be viral and infect other NPC’s towards a new stance on an issue. Some NPC’s might be corrupt, others stick to their values/beliefs, others might even seek to be swayed, or sway with the strongest power around them. Of course, most might be very difficult to sway, or only slowly. This might all be (randomly) presettable before each new game.
For NPC’s in a wider circle around the player meeting thus may mean, when Jake and Pete meet, the computer calculates the change of swaying Pete to path a crime, which with Pete is currently 0%. But after meeting Jake it may have risen a mere 2%, while with others it might have risen by 15%, thus making Jake a criminal slowly building his gang.
And including ecological awareness does offer deeper more real gameplay options. From a growth mindset (crony capitalism is killing the world) we can now start to experience the ecological mindset (humans as part of a living system that needs healthy balance).
And thus games can become important in better understanding what it means to be a participant in a living world.
Crime Fighting
Another use of Swarm technology in Open Worlds or even MMORPG’s might be about dealing with crime. It might even be that NPC’s committing crimes leave a few cookies at every crime. Witnesses might remember aspects of criminals. And heroes looking for a criminal might, when investigating suspects (man with a blue coat and black hat), hold cookies they collected about the criminal (blue coat, black hat, silver spurs, and horn tattoo on hands) against the suspect. Indeed this man has the first three, but no tattoos. A given amount of variations might be enough to point out the criminal. Or they might point you out, as you too leave a trace behind after a crime, perhaps two when leaving in a hurry. Such use of traces might reduce the number of crimes players commit just to gather more power or stuff quickly. Too many and they’ll be hunted.
In MMORPG’s bullying players might get known and find their name on wanted posters around the country, igniting bounty hunts. Such aspects may help build better societies with more collaborative players. All of course, only when you’d want that. Trust me, players will find ways to be smarter crooks.
Huge Increase in Replay-ability
And finally, Swarm technology may create very different game developments. Be aware variations can be like a version of the game, where one incentive becomes a plague overcoming all others. You as a developer would have to consider if that is an amazing variation and good drama, or a game killer. Perhaps players can even set some balances at the beginning. The chance of revolting farmers starts at 15%. Monsters roam and breed 20% faster.
Wouldn’t it make played countries wonderfully new, when randomly chosen settings at the beginning of each new game, might lead players in very new territory? With AI settings for each NPC, in each new game, much like computer-generated levels, you might have computer-generated characters. Thus in a Western town, it might first be the banker who is very corrupt, and next time the mayor. Is there smuggling of weapons to the Mexicans and or is there a growing band of rebels, seeking to start a new civil war? Consider the difference in drama from entering a land where a very military king pressures his people with too high taxes, to fight a horde pressuring at the border, to a land where a weak king (who also soon dies, leaving an empty throne) with lots of religious farmers who now have to deal with aggressive barons who involve you in a fight for the crown. And the horde might this time end up as more bend on trade as long as the people keep respect for them.
Truly, Swarm Technology, Swarm Scripting (using algorithms and game theory) can change the face of all virtual gameplay around the world.
Note: Send this article to game designers you know, because I’m very interested to help develop this idea further in one or more games.
An older post on Game design: The Next Revolution in Gaming. And older post on Swarm Leadership as applied in real-world settings.
This great video shows how game designers are on their way to get here, but not fully embrace it as the core for their societies developments as the main story of which the player becomes a part.