Hundreds of servers in the cloud, but still simulating a single, fully-connected game world
While working on our game Forsaken Legends, we had a lot of discussions around common problems that games such as ours face. The trouble of creating massive, endless procedurally-generated worlds, trying not to splinter our game community, allowing for a persistent experience, and trying to create a living, breathing world are common problems that game studios are constantly trying to overcome.
We wanted to have thousands of players all interacting in one massive game world, where their actions would influence the world for every other player, and have a lasting effect.
We were lucky to come across a UK-based company called Improbable that offered a solution that would make it possible for us to solve all of the design issues we were facing. Instead of using a single server, their SpatialOS platform allows our game to run on hundreds of servers in the cloud, but still simulating a single, fully-connected game world.
Creating a massive terrain for players to explore is not without challenges. The main one would be player dilution. If we allowed players to walk across endless worlds, the further out players went, the higher their chance of never seeing another player. By utilizing the SpatialOS platform, we’re able to have massive amounts of players all on a single game world to keep the number of players in any given area higher.
Another issue we were facing was the ability to keep the entire game world persistent. We wanted players to be able to influence the world around them and have those changes last forever. Imagine a pack of wolves in a forest surrounding a town. If left alone for long enough, the wolves might deplete their source of food and have to start wandering into town to feed. The local town could start offering quests to players to take care of the wolf overpopulation. Once they returned to a normal population, that quest could disappear until needed again. This allows us to have a world that feels alive and responsive to not only the decisions players make, but also allows NPCs and monsters to continue to evolve as the game evolves.
One of the major gameplay mechanics that we wanted to implement was the ability for the game world and its inhabitants to evolve without human interaction. This requires to simulate the lives of hundreds of thousands of entities across the game world, which would have been extremely difficult, if not impossible, using a traditional client-server architecture.
Monsters that level up, mate, hunt, wander, and are truly alive within the world
But SpatialOS allows us to simulate NPCs and monsters continuously without the need for players to be around them or influencing them. This allows us to have monsters that level up, mate, hunt, wander, and are truly alive within the world. It also allows towns to grow and evolve over time. Towns will be able to set up trade routes between each other, hire guards, and grow their local economy. This allows for amazing gameplay experiences, as players can wander around completely-procedurally-built towns and encounter monsters whose abilities have evolved over time by interacting with their surroundings and the ecosystem of the world. And all of this happens without players needing to interact with the NPCs or monsters in any way.
Players and guilds in Forsaken Legends are able to claim plots of land in which they’re able to build fortresses. These bases are all built with physics in mind. If another player comes across a base, they can attack that base. If they take out a wall or foundation piece, the part of the fortress supported by that wall or foundation will crumble down. Imagine if we were running only on one server, and there were multiple guild wars going on at the same time. The physics calculations could start to overwhelm our server and cause lag across the entire game.
Leverage cloud-computing power instead of relying on one machine to do the workload of the entire game
Fortunately, SpatialOS supports massively distributed physics, which ensures smooth gameplay for everyone, as we’re able to leverage cloud-computing power instead of relying on one machine to do the workload of the entire game. This also allows us to keep the entire base-building physics completely authoritative on the server side. This means the clients won’t have to calculate any physics, which speeds up the client when navigating around massive fortresses, and it also prevents players from cheating when destroying bases.
Without SpatialOS, Forsaken Legends would have to be a lot smaller in scale. We wouldn’t be able to support massive amounts of players concurrently playing in one living, breathing game world. We wouldn’t be able to simulate physics across tens of thousands of bases in real-time or allow our game world to continue to evolve across the massive, endlessly-generated terrain. SpatialOS allows us to keep the scale of Forsaken Legends massive in scope, which gives the players a better gameplay experience overall.
You never know what you might find over the next hill in Forsaken Legends! Maybe it will be a sprawling town that’s never seen a human player before, or maybe it’s a massive troll waiting to destroy you. There’s only one way to find out, and that’s to keep exploring the massive world of Forsaken Legends!