Endless runner but always the same

freneticzfreneticz SwedenMember, PRO Posts: 774

I need suggestion on how to make this in a good way

Comments

  • KevinCrossKevinCross London, UKMember Posts: 1,894

    Wouldn't you just spawn certain obstacles and pick ups etc. with timers.

    So every 10 seconds you spawn "x"
    After 30 seconds you spawn "y"
    After 60 seconds you spawn "z"
    Every 5 seconds you spawn "a" (increase the spawn time so that it's every 5, then 4.5, 4, 3.5 etc. to make it harder)
    ... and so on.

    Just have things that spawn at certain times and speed up timers after x amount of time so that it becomes harder and harder.

    A large set of timers spawning everything in your endless runner, that's always the same each time you play.

  • KevinCrossKevinCross London, UKMember Posts: 1,894

    The other way, and this is just a thought would be to create a table with a full list of all of your spawns and what time they should each happen. Then check the first row regularly to see if the time has passed, and if it has spawn the obstacle, power up, or coin etc. and then delete the first row.

    You would need to copy the table before you start the game so that everytime they replay it's reading from a full table.

    This would require a lot of thought on timings and you'd have to consider what happens when they reach the end of the table. Recopy the table again but play it faster?

  • freneticzfreneticz SwedenMember, PRO Posts: 774

    i will try with timer and loop in some way

  • imjustmikeimjustmike Member Posts: 450

    Could always just have the actors recycle. When the obstacles move too far left, move them 1000 (or whatever distance) to the right. Very easy to create a looping scene that way - the main downside to this approach is that it's always the same, but in this case that sounds exactly what you want.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    You could build a "static" runner like I do in this tutorial:

    And warp the player back to the beginning when they reach the end of the static level. That is what I do in the Endless Runner Game Construction Kit I have on my website.

  • freneticzfreneticz SwedenMember, PRO Posts: 774

    @jamie_c said:
    You could build a "static" runner like I do in this tutorial:

    And warp the player back to the beginning when they reach the end of the static level. That is what I do in the Endless Runner Game Construction Kit I have on my website.

    This is kind of how i made it so far

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    edited September 2016

    If you're already going that route, I'd try adding an invisible actor at the end of your level so when the player touches that actor it's sent back to the start of the level. You'll probably need to play around with the placement of the 'warp' actor and the start and end of the level so there is no visual jump in the background and action but it's do able.

  • freneticzfreneticz SwedenMember, PRO Posts: 774

    @jamie_c said:
    If you're already going that route, I'd try adding an invisible actor at the end of your level so when the player touches that actor it's sent back to the start of the level. You'll probably need to play around with the placement of the 'warp' actor and the start and end of the level so there is no visual jump in the background and action but it's do able.

    Also what i have done :) was the best i could Think of

Sign In or Register to comment.