How to do world generation?

I’ve never done world generation before in any game engine or programming language I’ve only ever loaded levels, So how do i create a world generation script and by that i mean like create hills, mountains, lakes etc out of a 1,1,1 scale block prefab and how is world generation calculated? I’ve never done it before and don’t understand it.

That is an incredibly broad question, and probably not one that can be adequately answered in a forum post. There are so many different techniques and algorithms and each one depends on your specific situation.

For example: Is your world based on Terrain, is it an urban environment, is it Minecraft-style cubes? Is it an open world or a dungeon? Do you expect it to be infinite and generated on demand, or will you generate a set area and that’s the “pen” the user is in? Do you need the world to be able to generate the same world reliably or is it going to be different every time? Will you have certain areas that will be placed on the world or will it be completely random? All of these questions (and dozens more questions along the way) are going to hugely affect the way you choose to generate your world, and even with answers to these questions it’s going to be very difficult to give anything but vague advice.

Hm, well, did you even tried to search for this topic it? Without trying it, I bet there are dozens of tutorials out there. :slight_smile:
This question is way to generic to be answered.

so minecraft style world?

googled “minecraft style world generation”

found loads of pages…

this one looks quite promising (skimmed, but it’s big and has pictures :smile: :p)

http://www.gamedev.net/blog/33/entry-2227887-more-on-minecraft-type-world-gen/

and of course there is the horses mouth (hehe :p)

http://notch.tumblr.com/post/3746989361/terrain-generation-part-1

etc.

I always search before asking a question but unfortunately google is no help a lot of the time.

The world will have to be random every time, its a small map around 50 X 50 X 50 blocks big i just want a flat terrain with random hills around the place basically. it doesn’t sound too hard right, besides the fact that I’ve never done world generation before.

OK i’ve managed to figure it out but how do i combine all the separate block children of the world into one giant mesh when it creates world?