Procedural Generation Intro

Ever since I started to really get interested in game development, I’ve always been interested in procedural generation.  Procedurally generating content is a great way to improve replayability in your game.  Many games already take advantage of this by generating things like: dungeons, random item drops, and terrain.  Basically, anything that is not scripted directly by a human, has been generated through the clever use and combination of repeatable formulas, building blocks or whatever other method you’re using (I’m going to try to invent new ones, I’m that cool).

The idea that whole worlds can be created from just lines of code and some seed input (random values, user movements, keywords, we’ll explore this later as well) is fascinating.  In a future post about game design, I’ll touch on aspects of what makes a game fun (especially in a competitive setting).  One thing required is variation.  If players always have perfect information then finding optimal moves is simply just an exercise in optimization.  You pick a target outcome (winning, collecting all the gold, finding the BlahBlah, etc) and then you figure out the best way to do that.  But once you’ve figured that out, you can’t… figure it out again.  This can become stale.

But lets say you start up a 1 on 1 match of your favorite tournament FPS.  You want to b-line for the upgrades, the best weapons, then stalk your enemy.  Once you both know where those are all the time, you need to play different maps.  Once you have memorized all the maps, the challenge is removed and its entirely a dexterity challenge.  Some do like this.  Now imagine if the entire level was procedurally generated (not random, but with a purpose) to create a level that needed to be explored to be fully exploited.  Part of every match would be exploring as efficiently as possible, while still racking up your kills to maintain a lead or prevent the other player from exploring.  I feel like this makes the gameplay much more rich.

Lets take dexterity out of the equation.  Lets say you’re playing a game of Civilizations with your friends, you find the iron before everyone else and launch an early offensive to try to take an early victory.  If it works, you look like a genius. Now imagine that it’s the same map every time, and the iron is always in the same place.  Lets make it worse, players always spawn in the same places too.  Now someone is always going to start near that iron and always knows exactly where it is.  This would take almost 100% of the fun out of the game.

My posts on this topic are going to be mainly focused around my education, trying to figure out from scratch how some of these conventional methods are employed and possibly try to figure out ways to improve upon them.  I’ll use lots of fake math, make my own assumptions, and probably write some less than optimal code.  The goal is to try to figure out the way this works on my own, and then apply what I’ve learned to procedurally generate unconventional content.

How would I procedurally generate story content or quests?  How could you procedurally generate or modify a set of rules as a game progresses?  How do you write an AI that can react to these things, or use these types of uncertainty against a player to increase challenge.  How would you procedurally generate game end conditions to be fair for all players (auto handicap, player interaction incentives, etc).  Some of these might be crazy and never work, but there’s only one way I’m going to find out.

Feel free to suggest any areas you’d like to see me work on, and I’ll try to incorporate them into my experiments.  I look forward to finishing up a post about my warm-up exercise:  Procedural FPS map generation (version 1), and the lessons I learned.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>