Procedural Generation

I have no clue where to start with procedural generation, to be specific I am making a simple space exploration game in which random planets/asteroids spawn. Does anyone have experience with procedural generation and could offer some tips/pointers as to what to do? Maybe point me towards some tutorials.

Thank You for any help you can give.

To get started on procedural generation start by making something that has only a few properties. My first one was random weapons. I defined a weapon as something that has:

  • Damage
  • Fire Rate
  • Bullet Spread
  • Bullet Speed
  • Clip Size
  • Reload Time

Then another script sat somewhere which randomly assigned these values between set ranges I wanted. Such as

weapon.damage = Random.Range(10f, 50f);

I then extended it to different weapon types which had their own set of random ranges as well as a level modifier so that a gun can have a level which can affect how good it can get. Also finally replacing the set random in a range with one that gets a random number from a normal distribution.

So what Im getting at is make something that generates itself then just keep adding to it. Keep making it more complex but leave the generation as its own separate thing to how the entity itself works.

For instance a planet. Some properties could be:

  1. Size
  2. Gravity
  3. Weather
  4. Distance from its Star

Make a planet script which takes care of itself if it is given these 4 things. Another script which handles generating them. Then finally maybe a Solar System script which would hold all those generated planets as well as being procedurally generated itself, like number of planets etc.

Start small and keep adding.

http://www.gamasutra.com/view/authors/322755/Sean_O’Neil.php