Before getting around to my question, I’ve done some research on this topic but haven’t been able to find an appropriate response. Also I’m fairly new to Unity, so I do apologize if this is a silly question. But now to my question.
I’m kicking around an idea for a island based survivial game. But I would like the player to have the ability to choose the Island and it’s geographical features to some extent before jumping into gameplay.
So my question is, would it be possible for the player to procedurally generate islands at the press of a button during runtime? Then perhaps use scalable sliders to add more hills/mountains, rivers, or trees? I’m mainly looking to see if this is even possible in Unity. But if someone wanted to share links to examples or tutorials I would also greatly appreciate it.
Depending on your real time constraints that should be totally feasible in unity. You can create Meshes at runtime (the docs even explain how to set the vertices and indices), add materials and have them in the game. The downside, however is that there are a few limitations:
upload of mesh data to the GPU can take some time. Not ages, but, depending on the size, much longer than you have time in a frame. I.e. uploading a new mesh every frame is not the way to go. Updating it every once in a while however and waiting a few more ms is fine though.
The number of vertices in a mesh is limited by Unity. You would have to split the mesh manually then.
Generating good terrain is challeging on its own, but from the technical side it should (R) ™ (C) work in Unity.
Unity supports procedural meshes and you can do almost anything you want. However it’s not easy. For procgen you should also consider manual multithreading.
I know this is an old post, but if someone comes across it for reference…
There are a few editor extensions that allow you to build items or maps using multiple sections, then generate permutations of them at runtime. ProcMod is one of them.