FUEL: Defining Procedural

 By Shamus Sep 23, 2009 46 comments

If it were possible to jump off your vehicle, Fuel would have the makings of a fairly thrilling base jumping game.
If it were possible to jump off your vehicle, Fuel would have the makings of a fairly thrilling base jumping game.
Confusion always arises when I throw out the word “procedural”, as there seem to be a lot of different (perfectly valid) definitions bouncing around. In my view, procedural content is about making things using simulation, automation, and approximation.

Some people equate “procedural” with “totally random”. It’s true that it can be random (within the limits of a computer’s ability to generate “randomness”) but it doesn’t have to be. It’s fairly trivial to make the computer generate the same sequence of random numbers, thus having a “random” area appear the same each time you visit. In any case, it’s true that there will be aspects of the world which were created without direct participation of a human being. The placement of objects will in that sense be “unpredictable”. But this unpredictability – this loss of direct control – is one aspect of the tradeoff we’re making when we aim for procedural content. The more specific you want the content, the more it needs to be built by a human being. Do you have a rigid expectation of where each and every tree should stand? No? Then let’s not waste an artist’s time by making them place the things manually.

On one end of the spectrum is the hand-made world: An artist (or a team of them) will use shaping tools to sculpt the topography of the land. Then they paint it in some meaningful way. Grass over here, dirt in this valley, exposed rock on steep surfaces, etc. Then they populate the land with trees, shrubs, rock, grass, and whatever else the game calls for. You can do something like this in an hour or so if you’ve got good tools and you’re only filling in something modest in size. On the other end of the spectrum is the purely random world: Have your world-o-matic moosh a bunch of random noise together to make generic rolling hills, and then randomly sprinkle vegetation around.

Remember this building.  We'll be seeing a lot more of it in a later post. Also: Is anyone thirsty? Me? I could drink.
Remember this building. We'll be seeing a lot more of it in a later post. Also: Is anyone thirsty? Me? I could drink.
The hand-made way is agonizingly time intensive, but will produce compelling scenery. The later is cheap and fast, but produces a big bland soup of scenery where seeing one spot means you’ve basically seen it all. One is stupid expensive, and the other is pointlessly dull. But the thing about the hand-made approach is that the artist spends a lot of time doing very repetitive non-creative stuff. They’re doing tasks which don’t actually require a human brain. The goal of any good procedural system should be to make sure that the artist is directly involved with the artistic decisions and is never bothered with any of the routine grunt-work.

Placing each and every tree is time consuming and needless. Instead, you observe that trees do not grow randomly in the real world, but behave according to observable rules. There are rules about where trees grow, how they’re spaced out, and how big they get in different places. Trees don’t generally grow on steep hills, and if they do they don’t get very big. Dense trees tend to choke out undergrowth. Undergrowth prefers soil to rocky terrain. Grass gets tall anywhere you don’t have tress or undergrowth. Some trees grow denser than others and have different preferences for elevation and moisture. Etc etc etc. A programmer can bang out a few rules like this and add them to the editor. Now instead of the artist saying “I want a tree here, and another here, and here, and here, and I hate my job, and here, and a couple here, and I wonder if McDonald’s is hiring, and now onto the shrubs…” The artist can just say, “Given the rules for trees, I want a forest over this region.” Boom. Forest done. Now instead of planting trees and bushes, the artist is placing forests and grasslands.

fuel3.jpg
Now, artists usually jump in here and insist that you can’t cut them out of the process like this because the resulting data will be sterile and random. But note that what’s really going on is that some of the artistic work has been offloaded onto the programmer who had to implement these rules. This is probably why it’s taken so long for people to get a handle on procedural stuff: It requires a very particular sort of programmer to do this sort of work. You either need an artist who is very good at explaining what she does in concrete terms (as opposed to saying, “I keep adding trees until it looks good”) or a programmer who has an artistic flair. I’m a good example of the latter, which is why I was able to pull of the Procedural City. (With apologies for the excessive ego for the previous statement, but I really do think this is an area of particular capability for me. Too bad I don’t get to use it more often.)

This is where people who love to haggle over definitions will jump in and say that this is no longer art. They argue that once you distill a process down to rules and numbers, you’re no longer expressing or communicating, you’re just imitating. But I see art in making the code that makes the world just as I see art in using the tools that make the world. I see the compiler as simply a very strange paintbrush. But fine. We don’t have to call this art and there’s no reason to derail ourselves by going for another trip around the “how do you define art” mulberry bush. Art or not, the goal is to create a space that feels plausible and aesthetically pleasing.

I think Fuel pulls this off.

20206Feeling chatty? There are 46 comments.


  1. guy says:

    @blurr

    That pun hurts.

    It seems to me the procedural city is more a deep analysis of fixed patterns than a matter of artistic creativity, but I can see it being difficult for people to do that even when they put their minds to it.

  2. Nova says:

    ‘too bed’ you don’t get to use it often? Typo spotted! :’)

    It’s an awesome pun. Puns are severely under appreciated.

    I think the idea of generating landscapes in that way sounds pretty awesome; certainly a lot of sandbox landscapes end up looking exactly the same no matter where you are – the extra work put into defining the characteristics would be well worth it.

  3. Jazmeister says:

    Tress a few typos, but mistakes are all part of the battle of life, I say, what?

    Excellent post, man. This is exactly it; making a computer do something is as hard as understanding how it’s done in the first place. Imagine distilling the “procedure” that a good Dungeon Master uses to craft a compelling dungeon (in terms of layout and encounter makeup).

    I think we’re a billion years from articulating the procedure for creativity, of course. The artists have until then to act all threatened.

  4. MrPyro says:

    If you feel like reading some work on computer-generated art, this is a paper written by a friend of mine who did some work on it during his university days, about getting a computer to emulate certain art forms that the artist had described in almost mathematical form.

  5. Drue says:

    I wonder if the whole “games are/are not art” argument is really about programming. If you admit that code can be used as an artistic tool, then programs and video games can be art. Certainly many other tools can be used both practically and artistically.

  6. Mr_Wizard says:

    @Drue: That reminds me of this TED talk:
    http://www.youtube.com/watch?v=1G0MzlfMPuM

    Coding and art is really something that shouldn’t be kept so separate. There are so many possibilities that are missed as a result.

  7. Sydney says:

    If coding isn’t a form of art, composing isn’t a form of music. It’s one thing to be a good improviser, or have a good sense of what you can do on the spot to make something musical that matches your particular sense, and your particular style. This is the magic of jazz, in my mind. It’s another – neither better nor worse, merely different – thing to be able to write, through iteration, something that should sound good no matter who plays it. And we haven’t entirely beaten the ancients yet, when it comes to this.

  8. RCTrucker7 says:

    “Too bed I don’t get to use it more often.”

    That’s a slip that Freud would be proud of. ;-)

  9. Neko says:

    It’s certainly an art. You’re essentially crafting a gun that shoots forests, or a gun that shoots wall textures, or a gun that shoots other, smaller guns.

  10. Jos Metadi says:

    I think good procedural programming is both art and science; the distilling of ideas and systems down to their pure essence of truth.

  11. paketep says:

    Interesting.

    Too bad that the game is not too good, and doesn’t even come with LAN support.

  12. Galenor says:

    I think that this is art, mainly because I think creating a world is art. You need to be able to be creative and constructive in order to do that. A graphics artist constructing a glorious, huge building, or maybe a run-down, criminal-filled dump requires the same kind of creativity and dedication that a man would use if he decided to paint them on a canvas (“And now, we’re going to mix the Olive Green…with the Dirt Brown…and we’re just gonna put a Super Mutant riiight there, in his little spot in our painting – happily skulking behind a rock waiting for bandits to make a mistake and come too close. But of course, we call those ‘happy accidents‘”).

    So really, while this isn’t a man setting out to create a world, this is a man who is setting out to create an artist, who creates a world. In order for the programmer to create an artist, he, too, needs to be creative in order to have ideas and thoughts on how a world should be made, and then project it as code.

  13. Groboclown says:

    I’ve been studying up on synthesized audio recently, and it’s really similar to what you’re describing here, Shamus. It takes the engineer to create the methods of construction, but it takes an artist to tweak the input parameters to make something eye-catching (or ear-catching, as the case may be).

  14. Too bed I don’t get to use it more often.

    Ha! Sleep less then, eh?

  15. unitled says:

    Hmm, if this gameworld *is* art, who is the artist? Is it the programmer themselves or the computer program that generates a lifelike landscape based on the rules the programmer gives it?

    After all, all the programmer is doing is giving the computer a series of parameters they have observed in real life (where trees grow, what colour their bark is…).

    As a slight aside, I wrote (mostly for academic reasons) a medieval village generator for a roleplaying campaign I was running… I was most proud of the part which generated the name of the local pub. I got some proper corkers out of it!

    EDIT:
    @Galenor: You made pretty much the same point I did… That’ll teach me for not reading the whole comments thread before I try and be philosophical!

  16. Kdansky says:

    If you listen to Dev commentary on WoW, it goes something like this: “First we use the generator and designate certain areas as ‘hills’ or ‘forest’, but then an artist goes over every raw square meter and makes it interesting”. I think that is the best trade-off between art and price. Make the program do a first pass, then have someone prettyfy it.

  17. mark says:

    Shamus, you smug bastard!

    Just kidding, procedural city rules!

  18. Andrew says:

    ” The artist can just say, “Given the rules for trees, I want a forest over this region.” Boom. Forest done. Now instead of planting trees and bushes, the artist is placing forests and grasslands.”

    I really like the concept of this system. Likening world creation to painting, couldn’t you simply consider the procedural engine to be a “large” paintbrush, while the one-piece-at-a-time system is more of a “small” brush? In which case, this method of world creation can still be considered art – a painter typically has brushes of all sizes. In this sense, it’s perfectly reasonable to have a controllable amount of procedural generation. If you’re making, say, the small rustic village your character starts the game at, it would make sense to put considerable effort into the details. On the other hand, for section B-116 of forest that the character will likely only see for a split second as they blaze past on their car/horse/pet dragon, it’s a bit of a waste to do all the details by hand. In this sense, making an entire game one tree at a time is about as sensible as drawing an entire painting with a toothpick.

  19. My definition of “procedural generation” can be summed up as follows:

    You give the computer an explicitly detailed set of instructions for the sort of thing you want it to do, and it does them.

    The difference between “regular” programming/content creation and procedural is that you’re letting the computer determine some or all of the details instead of manually setting all of the specific details yourself (or letting the user edit them). It may have some element or appearance of randomness, but it’s really just giving the computer more flexibility within the precise instructions you give it.

    The creativity still lies with the programmer/artist rather than the computer (just as the creativity of a board game lies with the writer of the rules), but for the first time in history the result of the creativity can vary depending on how much flexibility the computer is given. (As opposed to painting, architecture, and other forms of art and engineering which are completely “static” when they are finished.)

    “User input” has been possible in entertainment mediums such as stage plays (improvisation and audience participation), construction sets, Roleplaying games, and so forth. So for millenia the writers/artists/engineers/actors and the audience have been able to interact. Now we finally have a third element, the computer, to make things really interesting.

    I’m actually working on “something interesting” right now, but it’s a little too early to write about it yet. ;)

  20. Tesh says:

    I’m an artist in the game industry, with a minor programming bent, and I’d love a tool like this. I’ve used a low grade one that let me “paint” in a forest area, and the algorithm would automatically grow trees at varied sizes. There was another brush for shrubbery.

    It’s not unlike Photoshop brushes in that respect. I use a wide variety of brushes in PS to help me achieve certain effects quickly and effectively. If I had to work with Microsoft Paint, I could probably produce the same final products, but it would take a LOT longer.

    I love tools that save me from the mindless repetitive tasks of content generation (or alleviate the pain in endless iteration). They mean that I can spend more time making the overall product better.

    (Now, if only there were a parallel in *playing* games. Tools that save players from mindless repetition tend to be frowned on for some reason. Who is being “threatened” there?)

  21. vede says:

    Oh, come on, Shamus!

    You say that procedurally generating a landscape will result in a huge bland landscape dominated by the same thing over and over again, but it’s definitely possible for a programmer to go one step further up the ladder, and make a program to generate areas which will be forested, mountainous, swampy, or whatever else might come to mind. It is theoretically possible to make a passably realistic world with NO artist interaction (not meaning to stir controversy but, just look around… plate tectonics, wind, water erosion, and weather formed pretty much every land form on the planet, and it’s been seen various times that you can generate cities and man-made structures as well).

    While it’s not easy to actually see the world clearly, I suggest you look into Dwarf Fortress if you’re looking for world generation. It randomly generates a big landmass, then simulates water erosion over huge spans of time, makes mountains, forests, does groundwater, puts veins of ore into mountains, and even generates a history of world events all on the fly, from a random seed. It’s really amazing.

    Of course, it’s extremely difficult for a computer to be able to randomly generate environments that are interesting from a gameplay perspective, so artists are still needed for anything but basic world-gen (and games today STILL need artists for that, because companies just LOOOOVE cramming >10GB of vast, blank forests and mountains into their games).

  22. Mr. Son says:

    For all the complaining I hear sometimes about procedural content being “too sterile”, I wonder if there’s not a very easy fix, somewhere in the middle ground. It would also do to fix my worry of semi-random placement accidentally putting an object in a place where it shouldn’t be — such as halfway stuck in a rock.

    A game creator could have procedural generation create the area (forest, scrubland, etc), then have someone comb through the zone, checking for visual errors, tweaking placement here and there, and other such edits. You get procedural generation to do the legwork, then an artist for fine-tuning. Sounds like a good compromise to me.

    Of course, there’s always the thought that a possible reason few bother with procedural generation is that with companies riding the graphical bleeding edge, they’d have to make a new “forest-shooting gun*” for every game, after tossing the old one out for being “obsolete”. I don’t know how long it would take to make the code for a set of objects that obey similar rules, but depending on how many different kinds of objects are in a game world, it might look like a prohibitive number to some developers.

    *Neko, post 11

  23. Daemian Lucifer says:

    Random doesnt have to be dull.Earth is quite random,but also really not dull.If you provide enough data for the program to vary from,it can also end up breathtaking.Sometimes even more than actual hand made stuff.

    • Shamus says:

      I do not consider natural landscape to be “random”. It operates under numerous systems of incredibly complex rules.

      Random noise (white TV snow) is random, and boring. Nature is like a fractal: There is order arising from unseen rules and emergent effects.

      Vede: You begin with outrage, but then you re-iterate my position. What exactly are you disagreeing with?

  24. Peter H. Coffin says:

    Heh. Shamus make the point I was going to, 15 minutes before I got to the bottom of the page. GOOD procedural generation of stuff is actually closely mimicking the rules that the world itself follows when “placing stuff”. Jackpines grow where they’re finding conditions right for growing and they’re close enough to sufficient older jackpines to have gotten fertilized seed started, and banana trees differ in where they find the right conditions. I care less about “but is it Art?” than how it makes something look more RIGHT than other methods.

  25. vede says:

    Shamus: not outrage, just exclamation. (The internet’s use of the exclamation point is on a strange decline…)

    I’m simply disagreeing with you on the idea that a purely random world is bland and uninteresting. You said that it would be a vast expanse of rolling hills and shrubbery, but I’m sure if any programmer wanted to make a world generator, they would allow for the generator to create mountains, deserts, forests, valleys, and maybe even different climate regions. One could probably make it even look realistic by just recreating basic patterns found in reality, or (possibly) by making extremely basic simulations of real-world processes. If someone was unable to write a generator to create more than a bunch of rolling hills, I doubt they would attempt world-generation in the first place.

  26. Craig says:

    You know, there was a lot of debate over the automated process as art in the Bauhaus movement. In one instance, an artist detailed the colors and design to be used, and had an external company produce the piece. It was supposed to provoke questioning as to who was the real artist, the director or the builder, and if the product was really art.

  27. Dhauzimmer says:

    I am reminded of the ‘Music and Fractal Landscapes’ article from “Dirk Gently’s Holistic Detective Agency” by Douglas Adams. It makes a similar point.

  28. TSED says:

    My definition of art is as follows:

    “An object or act that requires creativity to create.”

    Procedurally generated things took a creative programmer to code it.

    The code is his tool and his application of it. The world is his production. Procedurally generated game-worlds (or anything else, really) are art.

    By my definition, anyways.

  29. Inquisitor says:

    To see awesome (and VAST) procedural terrain generation, check out Dwarf Fortress. It takes into account things like rainfall, rain shadows, soil drainage, erosion, volcanism, and so on to make incredibly detailed and interesting worlds.

    Of course, the game is almost two dimensions so it’s hard to see the terrain without using a third-party applet to render it.

  30. Nick says:

    My definition of art is as follows:

    “An object or act that requires creativity to create.”

    But then you have to define creativity.

  31. Inquisitor says:

    I define “creativity” as “the propensity to create”

    Hnnnnnnng.

  32. Daemian Lucifer says:

    @Shamus(26)

    Ok,so then nothing generated by computer is random since it all follows some rules.Even the random number generator isnt random because it follows a certain algorithm.

  33. Alrenous says:

    You need to add something.
    Ideally, what you do is get a procedural generator with a few dials and knobs that makes variations on a good-enough forest, and then you get the artist to touch it up. Like a sculptor getting the quarry to knock off most of the non-human shaped bits of the marble before they deliver it.

    It avoids blandness, keeps the tedium gains, and it avoids the objection that it ‘isn’t art.’ The only downside is that you can’t run it individually – the only way to get that is your fully integrated artist/programmer. Or, perhaps a programmer, an artist, and tons of iteration.

  34. Zel says:

    It’s been mentioned before, but as I see it, the best compromise between hand-crafted and fully-random is not a perfect procedural forest generator that the artist clicks and *poof*, it’s done. Instead, it would be a procedural generator good enough to avoid the majority of the tedium involved in placing objects one after the other. This generator’s output would then be edited by an artist to his liking to add details, clearings, darker patches, denser areas, etc…, with some convenient tools (not object by object or worse, vertex by vertex).

    I don’t know if the analogy is good, but it would be like creating computer generated pictures. You don’t want to have to create the picture pixel by pixel, but instead be able to draw basic shapes, move, copy and paste part of the picture around, apply filters on specific portions, and finally fix some areas by hand if you really have to. For the forest generator, make it able to create a forest given some basic parameters, then give the artist some tools to locally increase or decrease density, foliage, species variety or whatever, and finally allow him to manually add or remove trees, but this should be his last resort.

    The time saved not trying to write the perfect generator can be better employed creating these tools to make the artist’s life easier, and an artist not struggling to do what he wants is more likely to create a compelling world.

  35. Steve C says:

    Speaking of Procedural City, I think I saw YOUR procedural city on TV the other day. It was a clip on Attack of the Show that was a submission to the Uwe Boll Movie Challenge. I think it was titled “Mario Paint” (if that wasn’t the title it had something to do with Mario Paint.)

    I taped it and rewound to pay close attention to the background city and it certainly looked like yours. If you want, I’ll find out more concrete info by reviewing the tape again.

  36. matticus says:

    Hook us up with some more commentary on Fuel soon man, I’ve been waiting for this article for weeks.

    Also, anyone been checking out love?

    http://news.quelsolaar.com/#post56

    The project is hard to get info on, but if you’re interested in procedural stuff, check out some of the the interviews here.

  37. [...] a world by hand is a daunting prospect.  We can certainly use procedural content generators to fill in the world for us, but even that has technical and artistic limits.  Even the real world [...]

  38. Killey007 says:

    Procedural Content is amazing.
    And speaking of indie games that use procedural content, what about Minecraft? The level generator is procedural as are the tree generator’s. It is also a powerfully addicting game, especially in infinite mode.
    http://www.minecraft.net/

  39. [...] computer-savvy person than myself using words you can understand, look at Shamus Young’s blog here.  The very short version is that, rather than storing the entire map bit-by-bit, the game just [...]

  40. [...] Lords of Midnight and Midwinter through to Derek Yu’s Spelunky and Asobo’s Fuel (which Shamus Young has deconstructed at [...]

  41. Irish says:

    What’s up, I want to subscribe for this webpage to get most recent updates, therefore
    where can i do it please help.

3 Trackbacks

  1. By Chekhov’s Curtains « Tish Tosh Tesh on March 30, 2010 at 8:21 am

    [...] a world by hand is a daunting prospect.  We can certainly use procedural content generators to fill in the world for us, but even that has technical and artistic limits.  Even the real world [...]

  2. By Game Review: FUEL – part 1 of 3 | Rotania on May 4, 2010 at 11:54 pm

    [...] computer-savvy person than myself using words you can understand, look at Shamus Young’s blog here.  The very short version is that, rather than storing the entire map bit-by-bit, the game just [...]

  3. By The Magic Pantry › The Sentinel on September 8, 2010 at 12:35 am

    [...] Lords of Midnight and Midwinter through to Derek Yu’s Spelunky and Asobo’s Fuel (which Shamus Young has deconstructed at [...]

Leave a Reply

Comments are moderated and may not be posted immediately. Required fields are marked *

*
*

Thanks for joining the discussion. Be nice, don't post angry, and enjoy yourself. This is supposed to be fun.

You can enclose spoilers in <strike> tags like so:
<strike>Darth Vader is Luke's father!</strike>

You can make things italics like this:
Can you imagine having Darth Vader as your <i>father</i>?

You can make things bold like this:
I'm <b>very</b> glad Darth Vader isn't my father.

You can make links like this:
I'm reading about <a href="http://en.wikipedia.org/wiki/Darth_Vader">Darth Vader</a> on Wikipedia!