Procedural content generation and me

Published November 21, 2012
Advertisement
I love procedural content generation, but I have to admit, that it is not as powerful as I once hoped. Procedural generation in games is quite old reaching back to the days of elite and rogue-like game. Today, atleast two decades later, processing power has increased incredible, but what about procedural generated content ?

When I was a child, I got the idea to write a tool to generate 16x16 , 4 color sprites by randomly generating pixel heaps, reviewing and rejecting sprites manually, which did not look good. The idea is basicly a procedural content generation tool, thought doing some basic math, it was not a very promising idea.

But it is a good comparision of the situation of procedural generation. Back then I would have seen images in randomly generated pixel heaps, much like your brain is able to see figures in clouds. But today we no longer have 16x16, 4 color sprites, we have artistically crafted, huge paintings. Even realistic rendering is really stylized, utilizing many tricks to communicate some important emotions and messages in just every possible detail, and here we are at the point where procedural content breaks.

You can compare it with reading a book and watching a movie. While reading a book you use your imagination to build a living world from some fix points, whereas while watching a movie you are confronted with a given vision, not really able to bring in your own imagination.
Now think about something in between book and movie. No idea, me too, I can't see how it should really work, and I'm not seeing how real procedural content should work in a modern game without abstracting the visualisation.

I have experimented with procedural level generation for more than 3 or 4 years in my game now. The major issue was, that it feels, well generated. I think, that people who play an abstract game (rogue-like or minecraft) stepped already over the suspend-of-disbelieve threshold, therefore accepting to live in a procedural world. But removing the abstraction puts the pattern of generated content in the foreground which results in breaking the suspend-of-disbelieve for many people. Much like the uncanny valley, we have the situation that the improvement of a single aspect (visual) change the awareness of the audience, suddenly seeing flaws in details (generated vs design content) which were not previously an issue.

So, I'm the only one having this trouble ? Besides terrain generation, what game should have procedural generated content and the options and budget to archieve it ? At least diablo 3 should have and indeed they have kind of procedural content in a huge, painterly world. But taking a closer look, you will see that they are only really plugging together template created by some artists, which must not be bad, but which is not really what I would have expected, or hoped for. But I'm sure that the people over at blizzard looked for a way to maximize the content generation while keeping an artistically and lovely art style and environment.

Procedural content, much like art, must be consistent with the rest of your game to work properly and the current state of procedural content generation was not able to keep up with the pace of visual content creation making it really hard to incoperate it in a modern (non-abstract) game.

Therefore my final thought is, that you should consider to utilize the human brain to make sense behind procedural, though abstract, content, instead of making procedures which are able to simulate the human brain to create artistically content. The first worked so far, the latter not.
2 likes 8 comments

Comments

riuthamus
Very interesting read. I have thoroughly enjoyed your last two posts. They have invoked much thought into my own projects and the purpose/goals i have attempted to strive for. keep it up.
November 21, 2012 04:18 PM
JTippetts
The biggest hurdle I've run across in my procedural generation experiments is the simple fact that procedural generation is based upon rules, but the real world (especially the world built by people) is based upon exceptions. In procedural generation, exceptions equate to code bloat and vastly inflated generation times. Yet, to achieve a believable simulation, you have to include exceptions. People have a built-in bullshit detector about these things.

Take, for example, the [url="http://procworld.blogspot.com/search/label/Procedural%20Architecture"]architecture[/url] sections at the ProcWorld blog. He generates some pretty cool stuff procedurally. At first glance, it's pretty believable. However, the more you look at them, the more you feel like they're a bit too perfect. A bit too rigid. That's pretty much par for the course for procedural generation. In order to strip away that sense of rigidity, you have to build more layers, go deeper, construct more rulesets and exceptions and just keep digging.

I've sort of come around to a few ways of thinking.

1) If you want to make heavy use of procedural generation in your game, you need to inform the design process with this in mind and steer clear of any of the trickier gotchas. Cities, for example; if much of your game takes place in a city, procedural is going to be very hard to pull off. To make the city interesting, you need to build lots of exceptions, and these exceptions take a lot of time to develop and test. The more time you are willing to spend on edge cases and exceptions to the rules, the better your procedural scheme will be.

2) Outside of that, procedural generation is best used as part of the asset-creation process; as a means to an end, rather than an end in itself. Some tasks in creating a world practically scream for procedural generation. Plenty of studios use PG tools for things like quickly populating an area with terrain, quickly roughing-out a city or town, etc... Rather than hand-build every single terrain feature, house, shed, and cave, they'll build a PG template to start, then work from there.

3) PG is slow. The more exceptions you include, the slower it gets. Simple PG is easy and fast, but beyond the deep abstraction of a roguelike, simple just doesn't cut it anymore. This is another reason for my tendency to use PG primarily as an offline tool. The nested layers of complexity very quickly outpace the player's willingness to sit around and wait. As an example, look at Dwarf Fortress. (Although, to be honest, I haven't played DF in a couple years now, so it may be improved.) I once went through the process of generating a new world. It took something like half an hour, and included a lot of abortive attempts and failures. (This happens a lot in PG, too; topological requirements are hard to enforce in many PG schemes, so you either have to wire in some exceptions to bypass them, or iterate on the generator until a result passes a specific test. Otherwise, you might end up with a dungeon that has no down staircase, or a map where the player starts in a tiny, lush little green valley completely encircled by mountains, cut off from the rest of the world.)

I've built island, continental and planetary generators that have taken upwards of an hour or more to generate a result. They were highly elaborate, with lots of little exceptions and side-rules to avoid the whole "generated by Perlin noise" appearance that so many such projects take on. It's difficult to ask the player to endure that kind of time sink during play-time.
November 22, 2012 04:49 AM
Ashaman73
@Riuthamus:
Yes, it was meant as thought-provoking impulse, good to hear that you like it :D

[quote name='JTippetts' timestamp='1353559795']
The biggest hurdle I've run across in my procedural generation experiments is the simple fact that procedural generation is based upon rules, but the real world (especially the world built by people) is based upon exceptions. In procedural generation, exceptions equate to code bloat and vastly inflated generation times.
[/quote]
I've experienced the same, started with some clear rule-sets, expanding them over time and at a certain point I started to build in exceptions to meet my vision and here the whole system got really complex, because the first exception was just the start.

[quote name='JTippetts' timestamp='1353559795']
Take, for example, the [url="http://procworld.blogspot.com/search/label/Procedural%20Architecture"]architecture[/url] sections at the ProcWorld blog. He generates some pretty cool stuff procedurally. At first glance, it's pretty believable. However, the more you look at them, the more you feel like they're a bit too perfect. A bit too rigid. That's pretty much par for the course for procedural generation. In order to strip away that sense of rigidity, you have to build more layers, go deeper, construct more rulesets and exceptions and just keep digging.
[/quote]
I really like the great results of the ProcWorld blog, but as you said, it is technical and visual impressive, yet it is lifeless. At the moment it is much simpler to design certain content then to write a generator for it.

[quote name='JTippetts' timestamp='1353559795']
Plenty of studios use PG tools for things like quickly populating an area with terrain, quickly roughing-out a city or town, etc... Rather than hand-build every single terrain feature, house, shed, and cave, they'll build a PG template to start, then work from there.
[/quote]
Even this contains more design processes, and which is more important, the structures which are recognised by humans will be more or less designed. E.g. the shape of a forest, the strategical placement of a town or even just a defense tower, the roads, the lake which is an important story element, a mountain pass which needs to be overcome.

IMHO there are really only two aspects which are generated in games at the current state of art: randomized designed content and noise

[quote name='JTippetts' timestamp='1353559795']As an example, look at Dwarf Fortress. (Although, to be honest, I haven't played DF in a couple years now, so it may be improved.)
[/quote]
I think that DF is the best PCG currently available in games. But I fear that DF PCG would never work in an non abstract world. E.g. the story generation lives from the overall game abstraction, it is not really a narrative, it is more like a log file, but the players imagine and tell great stories from this log. This is what I mean by my book-movie comparision.

The funny think about your DF example is, that indeed speed was one of the problems which lead to rethinking my whole generation approach. I want PCG in my game, but at the current state it needs around ~10 minutes to generate a level which can't, and this is the crux, pull it off. I needed to add too many exceptions to get even a basic plot in my level which would be ten minute work for a designer with an editor.
November 22, 2012 06:44 AM
solenoidz
Interesting blog entry. The simplest form of procedural generation I've ever approached was probably terrain generation, populating and texturing. For example I've built simple rules, that took the heightmap height, normal etc features of a point to output for example the texturing and plants preference for that point. For example, points that had steep normals and/or high attitude, need to have more rocky texture because it was assumed that the rain and elements caused the soil to wash down. On areas like moist valeys, grass needs to be placed, grass do not grow on rocky steep slopes, sands etc. Trees avoid extreme places too, grow in groups forming forests, plants needs sun to thrive and other simple rules.
November 22, 2012 07:20 AM
Ashaman73
@solenoidz:
There's something wrong with your account. I can't vote you up or click on your account, though I can find it by using the member search tool. I've observed this in my last journal entry too. Try to contact a moderator or admin to check this.

[quote name='solenoidz' timestamp='1353568827']
Interesting blog entry. The simplest form of procedural generation I've ever approached was probably terrain generation, populating and texturing. For example I've built simple rules, that took the heightmap height, normal etc features of a point to output for example the texturing and plants preference for that point. For example, points that had steep normals and/or high attitude, need to have more rocky texture because it was assumed that the rain and elements caused the soil to wash down. On areas like moist valeys, grass needs to be placed, grass do not grow on rocky steep slopes, sands etc. Trees avoid extreme places too, grow in groups forming forests, plants needs sun to thrive and other simple rules.
[/quote]
That is what I call noise generation to fill up large parts of a level. This is a very important and common tool to help designing terrain, but it is just the tip of the iceberg, the complexity you need to drive PCG forward in your level from this point is nicely hidden beneath the surface.
November 22, 2012 08:20 AM
solenoidz
[quote name='Ashaman73' timestamp='1353572440'] @solenoidz: There's something wrong with your account. I can't vote you up or click on your account, though I can find it by using the member search tool. I've observed this in my last journal entry too. Try to contact a moderator or admin to check this. [/quote]

Hmm, I just noticed I can't click on my account too. Never mind, I'm not here to collect positive votes.
November 22, 2012 08:46 AM
JTippetts
I think the ideal scenario for PCG is someone like me. I am just artistically inclined enough to realize that I'll probably never be a great artist or level designer. Whether it's time or talent I lack is irrelevant; the fact is, I can sit down for a couple hours trying to model, say, a mountain and never really get anywhere, what with the false starts the do-overs, etc... and the final result will be sort of meh. The spirit is willing but the flesh is weak, as they say. However, I can spend the same couple hours (although this is a bit of a misdirection, since it doesn't account for the endless hours I worked on my noise library) throwing some functions together, building a procedural model+texture and achieve a far better mountain using PCG.

Recently for work I've begun doing architectural visualization for a few customers who are home-builders. The first few projects I modeled by hand and it was as tedious as one might expect. But lately I've been using PCG for the task, and it's been going great. I use FreeCAD, which while not finished yet still has pretty decent functionality for boolean operations on primitives. Rather than model each wall of the floor plan, I'll take the plan and construct a set of point or line lists, then feed that data to some custom scripts I wrote to construct the walls, subtract the windows and doors, and so forth. In this way, I utilize the data-amplification aspects of PCG to save myself some modeling. In a similar fashion, I will routinely do the same when i am building isometric wall sets and so forth for Goblinson Crusoe. A few template primitives and some boolean operations go a long way toward providing a base to work from. However, when it comes to the detail work I have to stop relying on PCG, or I end up with something that is obviously PCG.
November 22, 2012 02:55 PM
Ashaman73
[quote name='solenoidz' timestamp='1353573963']
Never mind, I'm not here to collect positive votes.
[/quote]
I wanted to downvote you...

just kidding [img]http://public.gamedev.net//public/style_emoticons/default/happy.png[/img]

[quote name='JTippetts' timestamp='1353596139']
I think the ideal scenario for PCG is someone like me. I am just artistically inclined enough to realize that I'll probably never be a great artist or level designer.
[/quote]
This was my thought too, I build a lot of tools to generate skins or models procedurally with some false assumptions about art (e.g. generating dirt, noise and normal maps do not make a good texture), on the other hand I always tried to push my art [i]skills[/i] and eventually I must say, that my generation attempts did not outmatch my art skills. Art is not magic and with some practise and research you will make decent art which is enough for many people.
When looking at Goblinson Crusoe, I think that you surpass this stage and your art skills are more than sufficient to create an enjoyable game.


[quote name='JTippetts' timestamp='1353596139']
a mountain and never really get anywhere, what with the false starts the do-overs, etc... and the final result will be sort of meh. The spirit is willing but the flesh is weak, as they say.
[/quote]
I think that rock and stones are really hard to do. It is really hard to grasp the shape and texture of rocky surfaces and looking at art forums like polycount, it seems I'm not the only one. In this case I try to went through the art hell and be happy with some sub-decent art and try to get more structured art into the game (wooden/stone constructions etc.) which are much easier for me.

[quote name='JTippetts' timestamp='1353596139']
However,I can spend the same couple hours (although this is a bit of a misdirection, since it doesn't account for the endless hours I worked on my noise library) throwing some functions together, building a procedural model+texture and achieve a far better mountain using PCG.
[/quote]
This is what I mean with noise generation. Everything which is not primary defined by a clear shape (terrain, rock, forest,grass, dirty road) or by a certain architecture and have a high degree of visual noise, is a good candidate for procedural generation (support).

[quote name='JTippetts' timestamp='1353596139']
Recently for work I've begun doing architectural visualization for a few customers who are home-builders. The first few projects I modeled by hand and it was as tedious as one might expect. But lately I've been using PCG for the task, and it's been going great. I use FreeCAD, which while not finished yet still has pretty decent functionality for boolean operations on primitives. Rather than model each wall of the floor plan, I'll take the plan and construct a set of point or line lists, then feed that data to some custom scripts I wrote to construct the walls, subtract the windows and doors, and so forth. In this way, I utilize the data-amplification aspects of PCG to save myself some modeling. In a similar fashion, I will routinely do the same when i am building isometric wall sets and so forth for Goblinson Crusoe. A few template primitives and some boolean operations go a long way toward providing a base to work from. However, when it comes to the detail work I have to stop relying on PCG, or I end up with something that is obviously PCG.
[/quote]
I'm currently experimenting with the torchlight/dialbo 3 approach. I use a tile editor to design templates which will generate 3d templates of my dungeons. Then I will use these templates to plug together a randomized dungeon level at run-time. I hope to introduce some recognisable shapes into the dungeons, some sense, traps and mechanism which are incredible hard with PCG.
November 23, 2012 07:01 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement