Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Random Terrain Maker (like minecraft)

Author
Message
Help Me Please168
11
Years of Service
User Offline
Joined: 23rd Apr 2013
Location:
Posted: 24th Jul 2013 05:29
How would you make a 3D random terrain generater (like how minecraft is like). And how could you make it like there are different biomes (like minecraft). Please tell by blocks / cubes (like how minecraft is like). Thank you.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 24th Jul 2013 13:48
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 24th Jul 2013 19:34
I made a procedural island generator in DBC: http://forum.thegamecreators.com/?m=forum_view&t=203206&b=10
The code should work in DBP, you can use it to generate heightmap data.
It's very barebones and limited — no overhanging cliffs or flora or fauna — but it should help.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 24th Jul 2013 23:28
As to biomes... How does MineCraft so seamlessly splice them together? I'm guessing each biome has different parameters for the generator, and is combined with a lot of blurring/smoothing of some sort?

TheComet

Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 16th Sep 2013 18:10
Quote: "How does MineCraft so seamlessly splice them together? "


The answer is... they don't. You'll get desert next to snow next to swamp. They are working on it though, the next update promises new biomes, more smoothing, and better logic (so you DON'T get so much snow next to desert)

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 17th Sep 2013 11:54
Quote: "The answer is... they don't. You'll get desert next to snow next to swamp."


I was referring more to how the height difference is matched perfectly between each biome, so you don't get huge walls when walking from one to the other.

TheComet

horses
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 17th Sep 2013 17:58 Edited at: 17th Sep 2013 17:58
Not that I've ever played minecraft but...
Quote: "I was referring more to how the height difference is matched perfectly between each biome, so you don't get huge walls when walking from one to the other."

Couldn't you just interpolate between the adjacent "biome"'s (whatever that now is) over an appropriately sized area?


"Why do programmers get Halloween and Christmas mixed up?"
Help Me Please168
11
Years of Service
User Offline
Joined: 23rd Apr 2013
Location:
Posted: 17th Sep 2013 22:52
So does anyone of you know though how do use it without using height maps (because I do not know how to use height maps) and also making it have cubes (for a 3D game)? I just really need to know because I want to make a game that creates random terrains.
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 18th Sep 2013 15:38
@Help Me Please168

Something randomly could be this quick example made with a matrix and some boxes...



I'm not a grumpy grandpa
Help Me Please168
11
Years of Service
User Offline
Joined: 23rd Apr 2013
Location:
Posted: 19th Sep 2013 02:13
Thanks I will try it out when I can.
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 19th Sep 2013 14:34
One option, is to use some brute force.

It's not the same as perlin noise calculations, but I honestly prefer the results, I think they give more usable terrains for example.

By brute force, I mean you'd start with a blank, flat terrain, and have a function that raises and lowers the terrain with a given position, strength, radius etc. Then, you might do 1000 iterations of raising and lowering random parts of the terrain. Run a smoothing algo through it, even just averaging the neighboring heights can be enough.

This tends to result in smooth terrain with hills, I've used a similar method in a snowboarding game, and it does a reasonably good job. It's also worth pointing out that it would also be good for things like rivers. Rather than hoping that the perlin noise gives you a river, or lake, or whatever - you can say, start at any point in the terrain, and just dig - moving the dig location each time, like digging a trench. It's more like generating a terrain, the way your game needs it to be - rather than a standard fractal terrain that we see all the time. A raise and lower function, and a smoothing function can produce really interesting terrains that you'll want to explore.

I am the one who knocks...
Derek Darkly
13
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 21st Sep 2013 23:50 Edited at: 23rd Jan 2014 01:41
Here's a cheap method for Perlin noise.
There are countless modifiers that could be added to this.



Login to post a reply

Server time is: 2024-11-23 15:12:23
Your offset time is: 2024-11-23 15:12:23