How do I join endless runner scenes?

  • Hi,

    Hope someone can advise me! Been trying to work out how to create an endless runner game

    which jumps to another scene as though it is scrolling across one continuous scene but with

    say 10 scenes combined ( one scene after the other in one continuous motion).

    Not sure if its possible with construct 2 but hope it is!

    Thanks,

    Lee

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just make a trigger at the end of every scene and set the event "go to layout"

    Maybe even randomize the order of the layouts and make it with go to layout by name: "choose(layout1,layout2,layout3)"

    If you know what I mean. It's really simple to do.

  • I understand what you mean.

    Yes that sounds brilliant.

    Still unsure though how to make it smooth so that the movement looks continuous!

    What I mean is when a new layout is loaded ( say layout 2 ) i would have to put the scenes elements just off

    to the right of the screen so it would slowly scroll into view but then layout 1 would have disapeared off screen

    so it would be partially blank !!

    Hope this makes sense to you.

    Lee

  • I usually make the player move from left to right and build every layout stationary. Then the player just runs left to right and everything is always where it should be It's much easier when the only moving part is the player and not every single level component. And then the camera follows the player.

  • what position do you set your 'layout 2' onscreen position to ?

  • I made an quick example for you <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> You can of course make it so the same level doesn't occur two times in a row.

    Live Demo

    https://dl.dropboxusercontent.com/u/100 ... index.html

    CapX

    https://dl.dropboxusercontent.com/u/100 ... unner.capx

  • Thankyou so much for your time in making this example for me.

    I understand what you mean now.

    Better get to bed, the wife will be complaining !!

    Kind Regards,

    Lee

  • No problem. Crazy what you can do with just 3 events

    Good luck with your project and your wife

  • cheers.

  • why don't you create a big layout let say about 20000 wide or so and make a small window about 500 depending on your runner and that would simulate an endless ruing mode.

  • Anonnymitet What condition can I use so that the layouts don't repeat two or more times in a row?

  • whoisda The best practice for that is to use arrays and delete the level from the array when played and when the array is empty build it again and restart.

    If you don't need them to be picked in random and your levels are named "level1, level2, level3" etc. Then you can use a string like:

    Go to level by name: "level"&levelnumber+1

    So create a variable and set it to the levelnumber on start of each level. So on layout1 set variable to 1 and then the string "level"&levelnumber+1 will take you to level2.

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