Replayability is a huge factor for a lot of gamers and one of the best ways to make a game replayable is to design it so that the game itself creates content. There are two philosophies that are used -- Randomly generated and procedurally generated. However these two terms tend to be used interchangeably even though they have very different functionality. For today's post we're going to examine these two concepts and what they mean for game developers.
Rolling the Dice:
Randomly generated is the simpler of the two and its functionality is that the game creates content based on set values and design. What this means is the game will build the content on predefined elements that the developers hard coded.
For instance in the Binding of Isaac, each stage of the game is generated by combining rooms that were developed and created previously and then essentially "stitched" together to create the level. While the levels are different each time, the rooms that you're going to explore have been hard coded in terms of obstacles and enemies which are then categorized by their environment. The items that can be found have their position randomly generated based on all available items that the player has unlocked through play.
We see the same thing in Diablo 3 with its level designs and how the levels despite being different do adhere to certain set elements in their design. For example, the lead in to the boss of the spider caves will always require you to walk up a staircase and then follow a long corridor that is predefined; this will happen every time no matter what.
The same can also be said about the equipment that can be created. Each piece of loot in Diablo 3 has hardcoded elements to it that are used to define the range of values that can be associated to it.
In this way the developers are able to give the game replayability and variety while still controlling the overall experience.
But when the developer wants to create something truly different each time, this is where procedurally generated content comes in.
Procedurally generated content is where the game itself will create original content for the player to explore or use. What happens is that the game developer creates an algorithm or set of detailed instructions to tell the game how the content should be generated. From there, the game will create something entirely original based on the initial instructions and rules.
An excellent example of this would be the hit game Spelunky which designer Derek Yu created and he talked about on his blog. He created a system that defines what the game space should have in it, created some set elements and random ones and then let the game put it all together to create each level.
Another example would be Minecraft and how each time you generate a world, you get a completely different environment with set elements such as enemies, resources and the day/night cycle. Everything else was set up entirely by the game itself without any further input from the developer.
Rogue-likes use procedurally generated content a lot as when you are dealing with a game that the player is going to constantly restart, it's important to have the experience be fresh each time.
Now I know what some of you are thinking, that randomly and procedurally generated sound very similar to each other and they are close, which is why their termonology is often used interchangably. But the key difference is that randomly generated content is based on hard values and rules without any further input or control from the game while procedural lets the game create content.
Here's a good way to describe the distinction: In a rogue-like, every level is procedurally generated by the game based on a set of instructions that the game developer programmed in. These instructions include where and what enemies should be on the level, what set of items to put in, traps, events, start and end point, etc.
After the level is built and the game has to add elements in like enemies and items, the game will decide randomly from a list of content that is already created. In that way, most rogue-likes are built with randomly and procedurally generated content.
Which is Better?
In terms of design and quality, deciding between random or procedural based content comes down to the amount of time you have. Creating an algorhythm to generate new content on demand is sure to give your game replayability, but creating a great one takes time. With random content, you get to have your cake and eat it too in the sense that there will be hard coded elements that are then shuffled around to create a randomized experience.
It's important to note that regardless of being random or procedural, your game will have hard coded parts to it as again, both systems rely on a set of hard rules to then extroplate out an experience from.
There needs to be some set of control by the developer for either system to work, or all you'll get is a jumbled mess.
Derek Yu talked about creating rules for the algorhtyhm to work in Spelunky and you can see how every level has in some sense a basic blueprint. When coming up with your game, you need to decide just how much of the experience is going to be the same each time.
Keeping it Fresh:
Random and procedurally generated content are the cornerstones of replayability and a must have for any game with rogue-like elements. Figuring out what's best for your game and experience is an important part of the design process.