Gamasutra: The Art & Business of Making Gamesspacer
View All     RSS
September 16, 2014
arrowPress Releases
September 16, 2014
PR Newswire
View All





If you enjoy reading this site, you might also want to check out these UBM Tech sites:


5 tips for using procedurally-generated content in your game Exclusive
5 tips for using procedurally-generated content in your game
November 20, 2012 | By Mike Rose

November 20, 2012 | By Mike Rose
Comments
    18 comments
More: Console/PC, Indie, Design, Exclusive



Isn't procedurally-generated content brilliant? Playing the same game over and over again, yet receiving what can be a satisfyingly different experience each time -- and from a development perspective, the prospect of building only a small amount of content, and then being afforded the opportunity to focus more on making your title as enjoyable as possible.

OK, so procedural generation doesn't always work so swimmingly, and there are plenty of mediocre games that have tried and failed to incorporate randomly-placed content. But taking the "less is more" approach, as Eufloria dev Rudolf Kremers recently called it, is a great way for indie studios to free up time to focus on other areas of development -- if done successfully.

Cargo Commander from indie studio Serious Brew manages to ride procedurally-generated content into the sunset, with players zipping through random space containers to grab treasures as quickly as possible. A sort of Spelunky in space, if you will.

"I've always been interested in procedural content creation, from the BASIC programs I wrote when I was little, through fractals and my training in artificial intelligence, to the many hours I spent in games that had any form of procedural generation," says Maarten Brouwer, co-founder of the studio.

Through the creation of Cargo Commander, Brouwer has learnt a great deal about what to aim for -- and what to avoid -- when it comes to level generation. "It didn't always work out as well as I would have liked," he admits, "but had several cool and surprising results that really improved the game."

Here, Brouwer offers his top five tips for other studios considering procedurally-generated content in their games.

1. Pick your battles

"Don't expect to simply pick a section of the game design and make it procedurally-generated. Adapt the game mechanics, theme and the procedural generation to each other to make it work as effectively as possible, and try to focus on high bang for low buck.

In Cargo Commander, we made the uniquely generated levels fit well with the lonely space exploration theme: this time you really go where no man has gone before! At the same time, the theme is not too serious, so that generated levels that are a bit odd don't seem out of place. Also, the generation really impacts the gameplay and is not just a backdrop. The selection of objects (enemies, explosives, burners, items) and features (gravity, layout) differs for each container, creating ingredients that the player can combine in various cool improvised ways.



In other areas, I tried to steer away from features of procedural generation that wouldn't be effective. For instance, a notoriously hard thing with level generation is to ensure that levels can be solved - 'can that ledge with the key be reached, using the items that are available?'. Though there are a few checks to minimize impossible situations, the level destructibility and space navigation make sure that the player almost always can create a route somewhere, and because containers can be skipped, it's not a big problem if one cargo item is unreachable. For the sector pass containers, that are more like a puzzle and do need to be solvable, I kept the randomization to features that wouldn't influence this, and relied on handmade levels for the rest."

2. Remember that randomness is random

"The levels of Cargo Commander are randomly generated. The sector name (that players can pick from a list or type freely) determines the random seed, and all levels in that sector are generated from random values based on that seed. However, it's important to take the attributes of randomness into account when deciding how to use the random values for generation.

The usual way to look at randomness is by using statistics. For instance 'the container size picks a value between 3 and 9, so on average containers have a size of 6', or 'each container has a 25 percent chance to spawn a medkit, so on average they're encountered once each 4 container'. However, unless the population that they say something about is large enough, in reality such numbers are less useful than they seem. Just like rolling 1s in a row may cause a barbarian to be defeated by an angry hobbit cook despite the barbarian's level 10 and Loincloth of Awesomeness, the player may encounter only really tiny containers in a sector, with an average far below 6.

In many cases this is not a problem and may cause nice variation, but when game balance is involved, this can become a problem. If despite the 25 percent, the first 20 generated containers don't have medkits at all, the game gets harder or more unfair than intended. In that case it may be better to use the randomness in a way that can't affect game balance too much, like randomly dividing 5 medkits over the 20 containers, or randomly vary the number of containers between the first medkit and the next."

3. Try anything to add 'life'

"In my opinion, the hardest part of procedural generation is to avoid getting randomly thrown together objects that feel lifeless. When a level designer crafts levels, (s)he adds personality to it with unique features or things with an extra meaning above the mere components. I've tried several things to improve this:

Use introspection. If you quickly draw a map on paper, why do you choose the features that you choose? Even simple things help here; I noticed that I often use symmetry, or base designs on general patterns, and incorporating that in the generation code helped a lot.

some_containers_from_sector_GALLIFREY.gifProcedurally-generated containers from the GALLIFREY sector

Cheat by secretly mixing in handmade level design. I've created a number of tiny pieces of level that get mixed in the rest of the generation process. By only using their functional parts and have the other parts and the appearance be randomized, players won't recognize these reused parts too quickly. Itís almost depressing to see how well these tiny hand-designed pieces work.

Create specialness. If half of the assets are used in everyday levels, but the other half are encountered rarely, each encounter of a rare asset automatically makes the level more special. This also works for parameters; if container size is normally between 3 and 9, a rare encounter of a container of size 15 becomes a memorable event (even/especially when the resulting parameter is outside the bounds for optimal gameplay).

Let assets radiate life. Daniel Ernst, the other half of the dev team, made detailed models that add a lot of character, so that even a simple level has atmosphere. If they hint to something more, a story behind the story, then a random combination of assets can suddenly get an extra meaning."

4. Prepare for tough testing

"When I built the generation system after some first prototypes, I created a rather complex layered system, with the sector randomizing boundaries in which the rest of the generation worked, further influenced by such properties as the selected container theme, the container size and the wave number.

I had no idea if it would work and be balanced, and then I encountered a problem: I couldn't test that either. When I'd try out a sector and encountered five containers that are full with enemies, did that mean that too many enemies get spawned? Or was this sector one of which the enemy count was randomly set very high, combined with the specific container sizes? Or did a few random rolls just came up with a lot of sixes?
For most parameters I tested the average value and a theoretical min and max, but because many parameters influence each other, this was not definitive.

After playing many games, some balance problems can become apparent, but it's easy to conclude some issue based on one playthrough, while a next playthrough shows nothing of the sort at all. Knowing what effect a property adjustment has is even harder. In the end setting/tweaking the properties was mostly done on gut feeling. Having a beta with a lot of people was essential as well.

cargo commander 2.jpgA sector pass container plan

This is also the cool thing with procedural generation, of course: if it's complex enough, even the designer has no idea what might be produced!"

5. Do something with it!

"The use of procedural generation opens up all kinds of possibilities that aren't possible with static level design, much more than merely adding an infinite amount of levels (which quickly gets boring anyway). In Cargo Commander, the simple mechanic of entering a sector name that seeds the generation, with each name having its own online leaderboard, worked surprisingly well.

More interesting possibilities include creating levels based on the status of the player, or what the player has done in previous levels; the whole world can change based on his decisions! Or the player can be given explicit influence, by choosing certain parameters, or perhaps have him make a basic level outline that's further filled in automatically.

Mixed with other game elements, even more exotic options are possible. To me, procedural content generation, artificial intelligence and user generated content are mechanisms that can elevate a game from a static experience to a highly organic, living whole."


Related Jobs

Respawn Entertainment
Respawn Entertainment — San Fernando Valley, California, United States
[09.15.14]

Senior Systems Designer
N-Fusion Interactive
N-Fusion Interactive — Manalapan, New Jersey, United States
[09.15.14]

Unity 3D Game Designer
Retro Studios - Nintendo
Retro Studios - Nintendo — Austin, Texas, United States
[09.15.14]

RETRO STUDIOS - Level 3 Engineer
Nix Hydra
Nix Hydra — Los Angeles, California, United States
[09.12.14]

Game Designer










Comments


Sven Bergstrom
profile image
Also a great read from Dejobaan on procedural content :

http://www.gamasutra.com/view/feature/174311/procedural_content_g
eneration_.php

John Courte
profile image
You can also use procedural generation to do the heavy lifting and the design itself is based on simple, directed things. Like so:

http://www.sidefx.com/index.php?option=com_content&task=view&id=2
252&Itemid=354

k s
profile image
Personally I use procedural generation to build most levels/missions as it saves me a lot of time and effort.

Jesse Tucker
profile image
"Cheat by secretly mixing in handmade level design."
This is indeed a very effective way to add extra quality and get the most out of your precious hard work. Even when a player does recognize a particular area, if it's designed well they could feel excited to get the opportunity to play that one extra fun part again.

Stuart Nicholson
profile image
If this is done with subtlety it's hard to detect. I'm embarrassed that it took me around 12 hours of playing Cargo Commander before I noticed there were definitely repeated handmade containers re-appearing. Spelunky is another good example of this sort of augmented procedural content.

Ian Uniacke
profile image
Nethack thrives on this type of design. In fact it goes one step further and has different randomisation for different sections of the dungeon as well as some completely predesigned levels. It really makes you feel like "oh yes! I made it to the fort again!"

Joshua Darlington
profile image
What is vanguard of procedural generation? Is there one game that uses more of it than any other? Whats the biggest commercial release of an all procedural/dynamic game. Or does such a thing exist? The games listed on Wikipedia seem to be old or abandoned indy projects. The midware seems to suggest that procedural landscaping is common but that's about it.

It seems like the full potential for computer games (deep simulation & improvisational reality) is locked in dynamic/procedural content. Individualized customized content is more appealing than rigid mass produced content.

Jesse Tucker
profile image
Minecraft would most likely be the best example of an extremely popular, completely procedural game.
I think we're still pretty far off from having procedural customized content that's at the same level of quality as mainstream, rigid content.

Alexander Martin
profile image
Roguelikes are all but defined by procedurally generated content: see Rogue, Nethack, ADOM - and some newer examples Dungeon Crawl Stone Soup, Brogue, Zaga-33, etc. Granted, very few of these are commercial *nope, wait, there are a bunch listed at the end

Many games have been inspired by roguelikes. Two large commercial examples are Spelunky (xbla) and Binding of Isaac (steam - probably pc/mac?).

Minecraft (as Jesse Tucker said) takes place across an entirely generated landscape, and is probably the biggest commercial example you'll find --

okay, no, wait. Diablo (plus all the Diablo-likes) utilizes procedural generation to create most of its levels.

There are many more examples.

*There are a ton of commercial roguelikes now that I think about it: the shiren the wanderer series, cave noire, the mystery dungeon series, the Izuna games, tower of druaga, Zaga-33. For completeness of this list even though I don't like them or recommend them whatsoever: Hack Slash Loot, Dungeons of Dredmor

** oh, and then there's FTL (granted, it's stitching together events rather than actually building spaces)

*** also I suppose I'd kick myself later for not mentioning Probability 0 - like Spelunky, it's a platformer that uses procedurally-generated levels and takes inspiration from roguelikes.

conclusion: There are a LOT of games that procedurally generate content, but they're generally not the highest-profile of games. Go digging. "Roguelike" is a good starting point.

Keith Thomson
profile image
Another huge recent release that uses procedural generation is Persona 4 Golden for the Vita.

CHASE DE LANGUILLETTE
profile image
Though not a big commercial release, Dwarf Fortress should probably be mentioned as a game that takes procedural generation to extremes most games don't come close to.

Luis Guimaraes
profile image
SimCity.

Maarten Brouwer
profile image
It also depends what you see as 'generated content'; Left 4 Dead for instance generates enemy encounters on the fly, which is also part of level design. That procedural generation is what keeps the game so fresh and surprising even after so many replays.

Adam Bishop
profile image
Spore. Even the animations were procedurally generated.

Martin Bell
profile image
Elite!

Michael Joseph
profile image
I think there's an important distinction between using procedurally generated content in your game versus making a procedurally generated game that may or may not also use some non procedurally generated content.

The design mentality is completely different betwen the two approaches and I think the latter case is alot easier especially when it comes to resolving design conflicts.

David Navarro
profile image
In addition to long and hard testing, I think consumers need to be educated to expect the occasional weirdness and brokenness of procedural content, maybe by emphasizing the humorous aspects with pre-release blooper reel videos, or something along those lines.

Kevin Gallant
profile image
Well thought out comments. We don't need any more ghost town levels. Each game asset can be parametrically driven but don't forget about [rocedurally-generated random textures and particle effects. Each game genre will require a lot of thought and it will be a challenge for the AI and Pathfinding nodes to find the optimum waypoints!


none
 
Comment: