Swarm Technology in Game Design
By: Floris Koot
Tags: Game Criticism, Game Design, Games, Swarm Intelligence, Game Development

Swarm Technology in Game Design

From fake open world games towards real open world games.

(small re-edit Feb 2019)

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 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?

Watch this video for expansive exploration where current open world design is losing it.

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 the enemy generals are (thus far) all the same AI, rather than offering diversity in aggresive, tactical and defensive generals. 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. 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? In one run of the game it seems a horde is storming all the lands, while a poor citizenry prefers to flee. In the second run you feel yourself almost bound to safe the horde from genocide by a mad king with aggressive followers. Such huge differences can be achieved through Swarm Technology.

Here you can see the basics of swarm behavior, like in schools of fish, or flocks of birds. Now imagine that even movements of nomadic tribes could be scripted like this in open world, mixing daily behavior and trekking.

What is Swarm Technology?

Swarm Technology moves game design from 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’s becoming a bee with a message all being part of one whole.

Swarm Technology means blending AI capabilities with NPC crowd reactions. It takes the step from scripted behavior in given story trees (When I have enough risen to a certain game level and had the right conversations, the people will start seeing me as their leader) towards responsive crowds acting when tipping points are passed and which even may change behavior out of sight and control of the player (In the first play of the game it seems the people only follow me for money, in another they keep betraying me to their king, and in another I must kill the king on my own, before they lose their fear).

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 the game! Or should be.

How the ecological system of Ultima Online failed, yet was an essential step forward.

Yet I think, with players going on a killing spree, like European settlers with bisons, the makers of chose the wrong solution. Players should have been able to kill all wildlife and suffer the consequences, at the least for a certain period. That’s the reality of nature, and it’s very hard to get that balance right, not in the real world (haha, people thinking about colonizing Mars, while we failed at creating a long term habitable Biodome on Earth), not in games. This is where this solution comes in:

Maximum regulation freedom for players? This is just the beginning, I think.

and here’s how that might work..

When information becomes viral

Swarm Technology means the world around you isn’t fixed any more, 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. It 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. Because of unguarded people need to flee, leaving farms behind, creating hunger in the land. Which may lead to 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, 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 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 it’s all about balancing, adapting to change, and protecting nature, even when 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 (or leave that balance out, as it is very very hard to get right. Wait no, now it’s the players responsibility and they’ll make YouTube video’s advising each other what stats get what results, thus more free marketing and a lively community), numbers and kinds of enemy, your own stats and other things. 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 and enemy camp as many games offer as the highlight of freedom is just the beginning and soon outdated. More variation in game play. Games can become ultra tough killing sprees, yet walking an empty land because you killed everyone isn’t fun in the long run. 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 conquest, or are the invaders feeling 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 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 movement or changing mass opinions. Interventions of players may influence, or, as in the real world, sometimes not all. Trying to prevent a war may end in 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, as they each can help develop different outcomes of the game. Through Swarm Technology conversations with given characters may change very much during the game, making possibly 50 + different conversations possible, each making sense within the context of the game.

This game can’t deal with players going on a killing spree against the good guys. Fun, but a bit sick too. And the consequences the game currently offers, are too light. Some swarming might make all guards react much smarter and cooperated against players running amok.

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 a 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 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 a 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 eonomic system, where if people go below a certain amount, they either start begging or robbing. You might be the lord of a land where your tax policies have actual effects on behavior, that not even the game designers could all predict, or could be very different in several replays of the game. Think how a NVC farmer, may start poaching, fishing, or moving when his food income runs too low. Or how a NVC 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 possibly 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 sheep herders 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 an outcome may ensue.

Here’s an example conversation. 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 a diverse options, from fleeing the town, looking for my wife to protesting 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 catagory 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 catagory 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 deal like smuggling, investing in a mine, etc.

Now imagine every living animal and human have such a strategy, all interacting with each other. Imagine 30 different kinds of meeting scripts each possibly influencing the course of the whole game world.

A worked out concept how to make this work in a game, written in Januari 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 slower level of detail. In a certain circle (depending on software possibilities) around the player, NPC’s are activated to act such interactions openly and 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. In 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.

What’s the tipping point for people to revolt or start lynching others?

Choose the deciders for your game.

What might these data packages about? All NPC’s may have certain basic characteristics. Choose the elements that fit your game best: disease, criminal behavior, siding with political or armed faction, religion, values, profession, helping build/find/chase/fight something(s), like/dislike of 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 views can be viral and infect other players 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. Off 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 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 with 15%, thus making Jake a criminal slowly building his gang.

And including ecological awareness does offer deeper more real game play options. From growth mindset (crony capitalism is killing the world) we can now start to experience the ecological mindset (humans as part of a living system). And thus games can become important in better understanding what in means to be participant in a living world.

Can cookies bring more effective detective aspects to MMORPG’s?

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 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 a use of traces might reduce the amount 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 smarter ways to be crooks, or, play mode, have 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 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. Amount of revolting farmers starts at 15%. Monsters roam and breed 20% wider terrain.

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? 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. The horde luckily is this time more bend on trade, if people keep respect for them.

Truly, Swarm Technology, Swarm Scripting (using algorithms and game theory) can change the face of all virtual game play 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.

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.