How do I make coherent structures?

Get help using Construct 2

Post » Wed Mar 16, 2016 11:50 pm

So, I'm working on a grid based movement game where nothing will be the same. I want random structures and such but idk what to do. Also it needs to be coherent. Can't have castle wall going down one path, then suddenly, cyborg carcasses outta nowhwere
B
25
S
6
G
4
Posts: 173
Reputation: 3,928

Post » Thu Mar 17, 2016 9:48 pm

Hello???
B
25
S
6
G
4
Posts: 173
Reputation: 3,928

Post » Fri Mar 18, 2016 2:27 am

How would you do it if you did it on paper? Can you write out the steps you would take and what rules you want?

Do that and you're most of the way there, and we can give suggestions about what features and events could be used to do each step.
B
91
S
31
G
103
Posts: 5,235
Reputation: 67,756

Post » Sat Mar 19, 2016 6:20 pm

@R0J0hound, well what I mean is (i said grid based movement, but I meant platformer) I want things like trees and mountains and floating islands and the underground caverns and caves to spawn. But like in a place that makes sense i.e. a floating island underground. I'm trying to make a world that operates like those of Terraria.
B
25
S
6
G
4
Posts: 173
Reputation: 3,928

Post » Sat Mar 19, 2016 7:40 pm

The basic gist of terrain in terraria is something like perlin noise is used to generate the terrain. The third party noise plugin can be used to do perlin noise. You can also generate the terrain in many different ways. Here's a link with some of them:
viewtopic.php?f=180&t=97645&p=866343&hilit=Terraria#p866343

You can also search for terraria or generating terrain or things like that with the forum search and get some more info here and there.

That should give the basics for generating terrain. Anything more complex is just a creative mixing of them to give something pleasing. It's basically a lot of tweaking.

For example the mountains and hills could be a 1d perlin noise curve, and the caves could be some 2d perlin noise overlaid on that. Different materials could be done with some more 2d perlin noise as well. Trees and grass just would be on dirt with air above it. RookieDev made a recent question on how to detect that. Otherwise that's just a rough start.
B
91
S
31
G
103
Posts: 5,235
Reputation: 67,756

Post » Sat Mar 19, 2016 9:58 pm

@R0J0hound, so how do I make multiple of these in one world?
B
25
S
6
G
4
Posts: 173
Reputation: 3,928

Post » Sat Mar 19, 2016 11:32 pm

I don't understand. If one can be made, just add another.
B
91
S
31
G
103
Posts: 5,235
Reputation: 67,756

Post » Sun Mar 20, 2016 12:37 am

I think he's wanting something akin to 2d perlin noise at xy = n do fo.
If it's 3 create a tree, 4 zombie.
He's just not sure what xy to compare.
This sort of falls into a weighted probability.
Image ImageImage
B
168
S
50
G
164
Posts: 8,229
Reputation: 105,577

Post » Sun Mar 20, 2016 9:03 pm

@R0J0hound The way the example is working is that you choose from a series of options to be spawned. I want to know how to make multiple of those options to be spawned at once.
B
25
S
6
G
4
Posts: 173
Reputation: 3,928

Post » Mon Mar 21, 2016 8:14 pm

There are many different ways. Here's one:
https://dl.dropboxusercontent.com/u/542 ... ample.capx

It's divided into multiple passes over the grid
The first pass creates a hill using basically a sine wave,
Then in that hill it creates a rock layer using a sine wave, a parabola, and some random noise with a falloff with y.
It also speckles some gold below a certain depth with some random noise with low probability.

The second pass digs out caves using bilinear interpolation over a smaller array of random values.

The third pass removes single tile wide edges, and changes dirt to grass if on top, and gives it a chance to grown down further.


This doesn't even scratch the surface of things you can do, and you can even get entirely different terrains by just tweaking numbers.
B
91
S
31
G
103
Posts: 5,235
Reputation: 67,756

Next

Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Casimir, tarek2 and 11 guests