how do i make an endless runner?

CodeMonsterCodeMonster ACT, AustraliaMember Posts: 1,078
so i was wondering how do i make a 2d platform endless runner? iv made many platform games but dont know how to make an endless runner, iv had theory's but they were wrong.
iv searched on youtube yet i cant seem to find anything? :(
any help would be appreciated thanks!

Comments

  • CodeMonsterCodeMonster ACT, AustraliaMember Posts: 1,078
    @singleSparq is that the only way though? making an actor run on the spot while objects move towards him
  • natzuurnatzuur Member Posts: 304
    Well if you make the main actor move then hes gonna cover a large amount of pixels going on the X axis. That means for it to truly be endless the scene needs to be endless in terms of width, which isn't possible, however you could make it "virtually endless" with a very large scene, but I would think this would be not even close to memory efficient.

    Another option is the actor doesn't move, but neither do the backgrounds, they just animate in a perfect loop.

    You could also probably spawn pieces of the ground and make them push each other via physics so it appears to be moving, or use another inventive way of doing somethin similar.

    But the moving of the ground pieces and recycling them to the other side of the screen when they have gone too far is honestly the simplest and most efficient way I can think of.
  • SingleSparqSingleSparq Member Posts: 1,339
    Yes the recycling of backgrounds (aka Flintstones style) is effective and you can parallax that to make the background move slower and the foreground objects more faster for Better effect.

    Search parallax scrolling to get you started. Once you have that working you can do things like switch out the background image at certain times before it come into frame for the illusion of more of the world your in. It's just tricky to get things seamless between scene actors.
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    Here is a thread about the same thing where I posted a little demo file showing an endless scrolling background, maybe that will help get you going.

    http://forums.gamesalad.com/discussion/comment/416250#Comment_416250
Sign In or Register to comment.