When it came time to really make some interesting levels it became all too apparent that procedural generation can speed up the process of development up substantially while minimizing time needed for an artist. When looking around for examples and code I found most of them way too hard make just a basic shape. Then I came across a simple L- System script from here. It was perfect for getting started and making a simple tree shape. But I wanted way more settings and features. So now I have sliders galore and I also learned a lot from a simple system like this and plenty of Unity tricks along the way. I am really impressed how much variation can be achieved with such little tweaking. I now notice I look at trees and grass stems totally different. If the maxAngle is set to about 5 deg it looks like grass reeds but if set 30 deg it looks like familiar trees. If you want a copy of the scripts there are 4 of them.

Shapes, ShapeSettings, ShapeBase, ShapesEditor. Most of the scripts are pretty short and easy to understand except for ShapeBase which is where all the work is done. Add Shapes to an empty game object and press create. Have a play with the settings and sliders and see what it makes. Warning: Depending on the settings you can hang your system..Start low.

Next Part 2. Lets expand on this a bit. Coming Soon.