0 Favourites

How do I make coherent structures?

  • 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

  • Hello???

  • 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.

  • 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.

  • 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:

    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.

  • R0J0hound, so how do I make multiple of these in one world?

  • I don't understand. If one can be made, just add another.

  • 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.

  • 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.

  • There are many different ways. Here's one:

    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.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • R0J0hound the problem with this one is that its one object. So if i try to destroy one bloc, the whole thing disappears

  • You don't destroy it, you use the tilemap's erase tile action to remove individual tiles. Another good reason to use the tilemap object instead of individual sprites for the tiles is it runs a lot faster.

  • You don't destroy it, you use the tilemap's erase tile action to remove individual tiles. Another good reason to use the tilemap object instead of individual sprites for the tiles is it runs a lot faster.

    How do i do this i've never used tile maps before

  • Also how do I drag one tile using the drag and drop behavior

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)