Hi guys, I'm relatively new to untiy, I know some of the basics and I have barely begun to learn java (but I am, its a work in progress), and I was wondering if any of you knew how I could make randomly generated terrain, like in minecraft. Now I know what your thinking, I want to make a minecraft clone, but no, I just want a randomly generated world. I dont even want it to be cubes, just normal unity terrain, but created randomly. Thanks guys Tom
Have a look at the "Terrain Toolkit" Unity offers as add-on.
It contains the standard algorithms (Perlin noise, etc) to build terrains. It comes with full source code and is a good way to start experimenting. The way the toolkit manipulates terrain objects in the editor can easily be used when the game is running.
Once you have one terrain up and running, you just have to create terrain objects on the fly, position them and then connect them with their neighbouring terrains. If you make a large world, then you will have to destroy terrains that are out of scope, or you run out of memory pretty soon.
This paper gives you a great overview on how to produce a terrain, the techniques and what is working and what is not working. In combination with the terrain toolkit sources, you can't go wrong.
answered Apr 04 '12 at 11:22 PM