How do I Create random terrain for a 2D above view game

  • So I want to make the terrain so some areas are taller than others, each are is made up of blocks whose height is indicated by an instance variable (1-9) But I want all areas to be accessible so I want a block with a height of 9 for example to have at least one 8 block next to it. Any idea how I could make this work?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What i would recommend is to create a "Fake Wall" the whole terrain is the same level, but the side of a cliff would be a sprite that the player cannot pass.

    Otherwise you could do a check for the block next to the player's level and see if it is equal to the current blocks's height +/- 1

  • Well my issue is how to make it random elevation but I figured out a way to do it more or less randomly. I create rows of empty blocks then spawn a real piece of land at a random elevation. If an empty block is next to a piece of land that block will spawn a piece of land with +/- 1 elevation

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