Most recent blog

Shin Megami Tensei III: Nocturne Review

Wednesday 31 July 2019

The Best and Worst of Procedural Generation

Rise of the Machines.

You know, Game design is a really involved process. Every step of the way you are met with complications and tribulations as you attempt to (I love this analogy) build on top of wet concrete. So much development time gets chewed up by iterating and reiterating and shaping and reshaping fundamental design elements, that it can be overwhelming for unprepared development teams. Wouldn't it be a lot easier if one of those main development tasks could he handled by an independent entity. Not a contractor per-se, something more reliable with less overheads. Something like a computer. Instead of dedicating time to make a worldspace you could leave it to an algorithm to... procedurally generate.

Obviously I am being factious. Some game companies do utilize procedural generation in their games and the process is not quite as simple as a set-and-forget kind of thing. At least not if you intend for the final product to be presentable. A lot of work and oversight needs to go into the creation of a procedural generation system to ensure that it is creating content that is viable, bug-free and worthwhile for the player. When developers put in the time to set it up, the result is spectacular. Procedural generation is capable of creating much more than is feasibly possible with a limited workforce or creating the right conditions for potentially endless replayability.

Taking the leap to trusting the work of an algorithm can be daunting to some. Afterall, some of the fun of game design is knowing exactly how everything you've made fits together, like solving a huge, 4d puzzle; when you leave a portion of that work up to a computer, suddenly you add an element of uncertainty to that equation. If the possibilities of your procedural generation algorithm are endless, than how can you be sure to account for everything that could potentially go wrong?  Because of this factor, it is still considered a risky venture to implement procedural generation systems, ensuring those systems are a rarity in the modern AAA market.

Procedural generation does have a very long history in game development, longer than some people think. Not always a successful history, mind you, but a storied one at least. For the purposes of this blog I want to go back to some of the standout games to feature procedural generation and see how successfully they are implemented. That means that for every game I mention there are likely at least 10 more from that timeframe that I have skipped over, intentionally or otherwise. I have just taken the liberty to choose some games that I either have history with or a connection to. That being said, remember when I mentioned how I used to be a huge Star Wars nut? Would you believe that they made a Star Wars game that prominently featured procedural generation? Well they did.

'Star Wars: Yoda Stories' is an old school, topdown action-adventure game from the age before the prequels. Released in 1997, 'Yoda Stories' tells the tale of Luke arriving on Dagobah to complete his training under master Yoda. "Oh", you may think, "like that level from Lego Star Wars 2 then". No, and don't you ever make that comparison again! The game starts as you land in your X-wing and are forced to navigate the confusing locales in order to discover the home of that beloved little goblin. And when I say 'confusing locales' I'm not just referring to that fact that planet is a literal swamp. I mean 'confusing' because the game is ugly as sin and the environments are mind-numbingly repetitive. Once you do find Kermit's height-impaired little brother, that is only the start of your woes. Yoda then proceeds to send Luke on a fetch quest for some useless macguffin that might not even be on the same planet as you. Then rinse and repeat until you're too brain dead to operate the keyboard anymore.

"Sounds like you don't like this game." Why yes it does, voice in my head, well noted. "So why did you bring it up?" Well you see, the environments that the player are forced to roam through seem so uninteresting and boring, to the point where you just couldn't imagine a human being actually designing it, and that is because no human being did. Indeed, Yoda Stories' 'game selling' feature was the fact that it's levels were entirely procedurally generated, meaning that you could play again and again and never encounter the same level twice. (Why you would ever want to play again is beyond me, but the option is there.) This little gimmick would be nice if the algorithm was given enough direction and tools to make areas that felt somewhat distinct, but alas either 1997 programming tools were too rudimentary or the developers just didn't care enough. Whatever the reason, we are left with a game that is historic, but pretty decently awful.

Wait, the same game director who made Yoda Stories made another Lucas Arts published game a year beforehand? And it features another timeless property? Well that game can't be bad, right? Afterall, if it were, there is no way Lucas Arts would have hired him again within the space of a year, would they? 1996's 'Indiana Jones and his desktop adventures' is a topdown, action adventure- wait a minute, this seems familiar. That's right, it is essentially the exact same game with different a different coat of paint. However, this time the creators tried to push the 'procedural generation' aspect even harder then before; slapping possibly my favourite ever splash-text on the boxart: "Literally Billions Of  Possible Games!" Is that right? Billions, huh? Technically correct if you count one rock being slightly to the left as a whole new game. It's just a shame that all of those game's are terrible, isn't it.

Before we speed ahead, let's go back a bit. To a game that birthed on of my personal favourite franchises of all time: 'The Elder Scrolls: Arena'. Long has my love-affair with The Elder Scrolls blossomed. Starting with Morrowind and eventually stretching to every single main-line entry of the series. But none of that history has made me biased, when I first approached Arena I made sure to put all that aside and judge the game from it's own merits. As such I managed to enjoy Arena for the old school, rudimentary, hack and slash that it was. The dungeons became a little unwieldy in the later levels but my overall impression was that it was a solid game that could very much stand on it's on. (In fact, it sort of does stand on it's own; considering how little story and lore the game shares with it's successors.)

One element of the game that I didn't enjoy was the experience of attempting to grind. Many of the end-game locales require the player to seriously beef up before tackling them, which leaves the player in a bit of a predicament. You see, whilst you were able to use the map to travel to story-relevant areas and cities, there is no way to use the map for tracking down optional areas to conquer. Adventurers had to use their initiative and wonder out into the wilderness hoping to come across old ruins. (Or just stalk the town's streets at night, as then they become dripping with hostiles. Apparently, no one ever told the city guard to take shifts.)  The problem with this approach is the fact that the gameworld is big. Ungainly big. As in, before ESO, this game was the only one in the franchise to encompass all of Tamriel. Hearing this might may you think "Wow, how did early Bethesda manage to craft an entire continent?". Well, I featured the game on this blog so you can likely figure it out. The Elder Scrolls Arena utilized a procedural generation algorithm in order to craft it's open world. The result is an open world that would take weeks to traverse (In real time) and a random assortment of side-dungeons that honestly aren't worth the effort to clear. Like many early randomly-generated games, Arena's execution falls a fair bit short of the team's aspirations. Luckily the base game is solid enough that this failure didn't sink the game and now we have Skyrim so I'd say the world is mostly better off.

The next game is legendary enough to likely need no introduction or explanation, but I enjoy self-imposed redundancy, so here we go. 2009 saw the release of the biggest indie title ever, Mojang's Minecraft. Since then, millions of players have been won over by Minecraft's promise of unrestrained creativity where you can make the game whatever you want it to be. (Providing you want it to be a game about building things.) It's social proliferation has reached such a degree where the game has managed to survive being run through by traditional media and still come out the otherside smelling of roses. Minecraft even pulled of the greatest trick any game can pull, being dethroned from it's 'most popular' podium by newcomer Fortnite, only to crawl it's way back 'On The Waterfront'-style in a comeback story for the ages. (Once which everyone tells differently, by the by.
I mention Mojang's opus here because Minecraft was the very first game I played in which I noticed and appreciated the procedural generation element. In Minecraft, the world in which you inhabit stretches out for all eternity. (Or at least until you travel 7784 miles away from spawn. which you ain't gonna do be accident.)  This means that the player can wonder the world and explore it's vistas in perpetuity. This algorithm is one that Mojang have spent the last 10 years perfecting, in order to ensure that the world it generates is always worth looking at. For my part, I still see the odd extreme hill that still blows me away even after all these years. The infinite world also means that the player has access to infinite resources with which to build with. Minecraft is perhaps one of the best examples of procedural generation implemented and executed perfectly. It enriches the game and truly makes it feel endless. (In a good way.)

There is one genre in particular makes use of procedural generation as part of it's MO. Rougelites and Rouge-likes like to change up their playspace each time the player dies in order to keep things feeling fresh. And it's necessary for a game genre built around the concept of the player dying and starting again over and over.  Rougelites in particular often use a 'room-based' navigation system in order to allow for random generation to affect each 'room' separately and string them together into one unique dungeon. The Binding of Issac, Moonlighters, Spelunky and many more all rely upon robust algorithms mixing things up constantly. Randomized layout, enemy placement and item generation assures that no one is ever relaxed when tackling a new run.

This implementation is the similar to the way Diablo and it's successors use procedural generation. In Diablo, the player is tasked with battling their way down through hell and slaying the titular demon of damnation. The kicker is that the plethora of dungeons that the player goes through, are all computer generated, as is their enemies and the hoards of loot said-enemies drop. This is another necessary implementation as Diablo is designed to be replayed over and over as the player engages in the gameplay loop of perpetual self improvement. Diablo-esque games like Path of Exile and Torchlight make use of similar systems in their send up to Diablo.

A few of the examples I have already bought up have been about developers using algorithms in order to circumvent a potentially impossible workload. Although, I think no company embodies this ideal as perfectly as Hello Games with their title, No Man's Sky. NMS is a game that will be forever tainted by the fact that is promised the stars and gave the moon. But to be honest, even in apparent failure, Hello games achieved something spectacular. Describing the size of No Man's Sky is hard, so I'll just quote the official Wiki "The universe of No Man's Sky (is comprised of) 255 unique galaxies, which in turn comprise around 3 to 4 billion regions, each of which contain more than 122 and up to hundreds of star systems. All star systems feature from 1-6 planets and moons, and usually a single space station." One quote from one the developers was floating around about how 'if you were to visit one planet every second, you would die before experiencing half of a single galaxy."

Technologically, No Man's Sky is an absolute marvel only possible through advanced and refined procedural algorithms. The problem is that NMS relies on the generation a bit too much. With all those planets available, there are bound to be a few that aren't worth visiting, the problem is that NMS planets are so similar that it isn't long before none of them are worth visiting. That's a little bit of a problem in a game that is specifically deigned around the idea of exploration. If the player has seen everything by the 10th hour then they sort of lose the incentive to keep travelling. In recent updates, No Man's Sky has shifted the focus from 'constant exploration' to the much more gamplay-sound mentality of 'builidng a home'. Taking a page out of Minecraft's book they've managed to make the game feel much more worthwhile. However, I still play the game as my background for podcast time. (Like the freak I am.)


Here's one that you might not have known; 'Mass Effect: Andromeda' was originally supposed to have a procedural generated element to it just like No Man's Sky. Back when Bioware were still figuring out what the game would look like, the choice had been made that the Andromeda Galaxy would be inhabited by completely random planets created on the spot. That's why much of the game's dialogue revolves around your family having the 'hearts of explorers' despite the fact you only see 5 planets and spend most of your time shooting people on them. Bioware wanted to allow players to colonize whichever worlds that they saw fit to, essentially allowing us to decide the future home of humanity.

This would have been the first AAA game to make significant use of procedural generation had the idea made it to inception. Unfortunately, the idea was left on the cutting room floor after it became apparent that 'the randomly generated planets would not meet Bioware's standard of quality'. Given how those same systems worked out for NMS and The Elder Scrolls: Arena, I have to say the logic is sound. However, I still can't help but think that if a big budget studio were to put their weight behind a galaxy generator we could get something worthwhile; heck, Bioware must have thought the same thing if the idea made it to a pitch room. I think the real reason it was scrapped it because the publishers got cold feet. You can never be sure of how a computer-run development would turn out so EA likely thought it was better not to take the risk. Either way, it's a darn shame that we won't see a space game push the boundaries of tech in such a cool way for a while, if ever.

As I have said a few times in this blog, procedural generation is a risk. When you leave the shape of your creative endeavour to be decided by fate, you either end up simulating the chaos of nature or the soullessness of a computer. Few are willing to put their work on the line like that, but those that are can sometimes change the way we look at games. Minecraft was originally conceptualized as one prebuilt world that players would mess around in, allowing the players some degree of freedom but nothing close to what they have today. With procedural generation in Minecraft, every world feels unique to the player that inhabits it; they don't just become their world's architect, they become it's arbiter. It's a subtle difference but one that completely shifts the player's personal relationship to that world. Now, of course, not all procedural generation systems have that exact effect, but they all lend a touch of uncertainty that cannot be captured in any other way. As we move into the age of the Scarlett and PlayStation 5, I find myself optimistic for the future of computer generated content in games. The better the tech, the better the scope to create something bigger and more diverse than any human brain could ever envision. Who knows, maybe one day we'll get an AI advanced enough to create an entire game by itself. True, at that point the thing will have likely transcended human scope and will hence become Skynet, but at least we'll get one kick-ass game before we all get annihilated by our robot overlords. 

No comments:

Post a Comment