Vertical endless game with random tiling

Get help using Construct 2

Post » Mon Feb 10, 2014 5:21 pm

Hi there guys!

I came here humbly asking for help. As I can't properly translate to Construct what I am thinking

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!
B
13
S
6
G
3
Posts: 102
Reputation: 3,962

Post » Mon Feb 10, 2014 7:36 pm

There are a few threads about this type of game/level creation. Just search for procedural or terrain generation.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583


Return to How do I....?

Who is online

Users browsing this forum: Microbex and 20 guests