Vertical endless game with random tiling

0 favourites
  • 2 posts
From the Asset Store
Each tile 64 by 64 pixels - Ultimate Tile Set for your awesome games
  • Hi there guys!

    I came here humbly asking for help. As I can't properly translate to Construct what I am thinking <img src="smileys/smiley19.gif" border="0" align="middle" />

    I want to develop a vertical oriented endless runner, with randomly generated blocks through the screen.

    I thought in something like this:

    1) assuming that we have a basic horizontal piece divided into 3 as a base for the background, like this:

        [ ][ ][ ]

    So the screen would be composed by 2 of them.

        [ ][ ][ ]

        [ ][ ][ ]

    As one background piece goes out of the layout, it is moved backwards, and it goes on. (as the endless runner .capx example does)

    2) as a piece goes out of screen, i would like to randomly change the 3 parts that compose it before it appears on screen again. For example:

        1st moment

        [ ][ ][ ](piece A)

        [ ][ ][ ](piece B)

        2nd moment

        [ ][X][ ](piece B)

        [ ][ ][ ](piece A)

        3rd moment

        [X][X][ ](piece A)

        [ ][X][ ](piece B)

    Now I'm stuck. What would be the best way to implement this?

    I have serious difficulties with working with arrays. I know its importance and I am more than willing to learn it, but it is hard to figure out how I would use it.

    Other thing I thought is creating 3 global variables. they would store numbers (equal the number of different tiles). As soon as one background piece goes out of the screen, their numbers would change randomly, and then depending of the new numbers, a different set of sprites would compose the background piece.

    Do you guys have any suggestions/tips for me?

    Thanks in advance!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are a few threads about this type of game/level creation. Just search for procedural or terrain generation.

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