Asteroid Field Generator

Above, you can see an asteroid belt around a space station. The cool thing about this, though, is that the asteroids are all placed randomly, and are created at runtime, rather than being placed in the scene and randomizing the position.

The script has a lower bounds and an upper bounds for the area it can reach. If one was so inclined, you could you have a thin asteroid belt placed far away from your center object, or a thick asteroid belt placed close to your center object.

You can also make some pretty cool effects, such as:

Mind, this is not the best use of resources for a star, but it’s a neat little thing that I couldn’t resist sharing.

This asteroid field generator will be used for small dogfighter game that I am creating with a group for the Oculus Rift. As our setting is in space, asteroids are a valuable asset, and this tool makes it easy to generate a field in a short amount of time.

About Karl Thompson

I am a game developer who has worked in C++, Unity3D, and C#. I am also a software developer, with work done in Java and C#.

Leave a comment