randomly generated reasonable world

0 favourites
  • 2 posts
From the Asset Store
Unique magic world sound effects you have to use in your game.
  • Hello,

    I know there are several tries on this topic, but all of these are only usable for some kind of endless runner game, at least I think so.

    I need a modified version and I do not know how to accomplish it.

    I want a nicely reasonable generated surface terrain combined with detached reasonable caves in the underground to generate a nice adventure world.

    A major problem maybe is that I want it to be generated only at the first start of the game. The randomly generated world should be saved and loaded, when you restart the game.

    I thought about this whole thing and came up with an idea, but I am not sure if it is doable because it could cause some kind of lag:

    Could you actually make the world to be 1 array? Let's say the world is 1 big grid. The height is 15 squares of this grid and the width is 20.000.

    Now on every square of this grid, which is actually filled with a block of the terrain, the value is 1. When there is no block on the square, the value is 0.

    So you could save and load this array to keep the randomly generated world. When the players destroy or creates a new block on the grid, the array is changed and saved when the game is closing.

    Then you could have a second array, which is holding the different materials like earth, stone etc.

    Let's say 0 for earth, 1 for stone etc.

    Is this doable or do you know a better way of achieving it?

    I would really appreciate your help, whether it is in form of a tip, idea or even a example capx.

    Best Regards,

    Astrosus.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 3.000.000 elements to cycle thru every time you loop thru the Array ,

    With that , I can say all what your array will do is crash the game

    Also . Procedural's hard , to get to a pretty good generation , you'll need a modified version of perlin noise, and coding that bad boy isn't easy AT all , while you could use easier algorithms like diamond-square or midpoint displacement ( There's an example running around but I'll let you do the search ) but it's not your level AT ALL.

    A lot of people went for gold and falled short , I'm telling you , try something at your level , and when you'll understand C2 better , tackle those subjects .

    Cheers !

    Edit:

    My blow-hard answer ;

    Generate a 1D curve using midpoint displacement and fill all the bottom with minerals and such

    and then , for cave generation ...

    "Mine" the generated terrain using this technique

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