I need some help. I want to make one tree using procedural random dichotomic C# script.
The output: branches , tree, vegetables, fences …
Also I need to take care about running to avoid crash or stress device mobile.
The result will be .apk with Android version 4.1.2.
Any idea ?!
Your title is very confusing to me since procedural implies its calculated with mathematics which is the complete opposite of random.
Procedural can still incorporate randomly generated elements or can work off of random values so I don’t understand the confusion.
Not sure where vegetables and fences fit into this but here’s a thought for trees:
Create a class/object for trees segments that each have a random amount of “nodes”. Nodes could essentially be a collection of Vector3s or simply an object reference depending on how you want to set it up. Like you could make a prefab that has null gameObjects as children that each have a “node” tag to use with “FindWithTag” and pull out data like coordinates and rotations.
For every “tree segment” (first step would always be a tree trunk or something), add a new random tree segment to any of the “nodes” found and spawn it to that specific node’s coordinates and rotation. Repeat the process until the latest tree segment has 0 amount of available “nodes” or you break off the loop.
As for performance and crashes/stress, make it a coroutine and let it return a couple of times during your loop to let it breathe a bit.
Please define “procedural random dichotomic script”.
I’m pretty sure catafest wants to make a script that procedurally generates objects like trees in a dichotomic fashion, so that the tree trunk can get split into random set of branches and that those branches get split into another random set of branches, etc.
googles “procedural tree” finds fairly in depth tutorial (with free source) and free asset store package… something like this?
http://www.wasabimole.com/procedural-tree/how-to-generate-a-procedural-tree-in-unity-3d/
lol, totally missed they are from the same author