- Home /
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.
What's the exact problem? Generating procedural meshes or generating procedural "maps" meaning universes, planet systems and planets?
There is no specific issue I was just asking around for some tips and pointers on how to do it.
Answer by xt-xylophone · Jan 20, 2014 at 02:22 AM
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:
Size
Gravity
Weather
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.
Your answer
Follow this Question
Related Questions
Random generating 1 Answer
Quaternion.identity problem at random spawn 1 Answer
Spawn at random? 1 Answer
How to set up a No Mans Sky type of infinite flight ? 1 Answer