endless run

hi guys, am trying to make an endless 2d runner game...
i have searched the forum but dint find any results that i could understand..
am stuck with basic need of making an endless scene...the character is moving from left to right....
any help would b gladly appreciated....

Comments

  • BoomshackBarryBoomshackBarry Member Posts: 712
    The basic logic is that generally your player isn't moving at all. The player character tends to stand still (at least on the x axis, they can still jump) and the background and scenery move toward them to give the appearance of running.

    The level isn't really endless either. The trick is that once the scenery has gone off the left side of the screen you move it back to the right side, usually at a different height, to give the impression of an endless randomly generated level.

    Hopefully that'll steer you in the right direction :)
  • djdeedjdee Member Posts: 180
    hey boomshackbarry,
    thanks, that really help me understand.... i have few more doubts but would try to work on them myself. thanks... cheers
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    @djdee, attached is a little file I did awhile ago to answer a question just like yours. It's not a template or finished file by any means, it's just a demo to show how to create endless platforms. It will need a lot of work to turn into a full game, but it should show you the basic concept of the platform spawning.
  • djdeedjdee Member Posts: 180
    hey jamie_c,
    thank u.... :)
  • ericzingelerericzingeler Member Posts: 334
    @djdee

    I've made a couple endless side scrollers and my recommendation is to use a very large set scene size with static objects and moving player instead of static player with moving objects. Two reasons:

    1. Performance becomes worse as more objects move on scene.

    2. Its much easier to control static actors than it is moving actors.

    Technically speaking, a set scene size is not endless; however, I doubt your intention is to make a truly endless scroller ;)

    Gamesalad is capable of very large scene sizes... 1 million +

    I've run a stress test with a mock-up platform generator and a 900,000 px wide scene. The generator was traveling at 100 pixels per second creating 50 px wide actors at various heights one after another. It made it all the to the end without a single glitch. Math time and actual time were within a hundredth of a second after the 2.5 hours sprint.

    Just my two cents... and remember to destroy your actors once they're out of sight.
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    Just to clairify, the demo file provided does destroy the platforms as they move off the left side of the screen so the game shouldn't slow down due to too many actors/objects.
  • BoomshackBarryBoomshackBarry Member Posts: 712
    @ericzingeler that's crazy! You created a level so long that it takes 2.5 hours to scroll through it? I guess that would do the job, I can't see most people lasting more than a few minutes on an endles runner anyway, it's just surprising to hear of somebody doing it this way. I'll have to have an experiement with that :)
  • djdeedjdee Member Posts: 180
    @ericzingeler,
    thank u for the suggestion, but am gonna go with moving the actors way. i will still try the big screen idea. wanna see which works best...
    thank you... :)
  • ericzingelerericzingeler Member Posts: 334
    edited August 2013
    @ericzingeler that's crazy! You created a level so long that it takes 2.5 hours to scroll through it? I guess that would do the job, I can't see most people lasting more than a few minutes on an endles runner anyway, it's just surprising to hear of somebody doing it this way. I'll have to have an experiement with that :)
    It was strictly for testing purposes... ya, I wouldn't expect a player to play more than few minutes per go on an endless runner.

    also,

    @djdee

    I've since made a demo project. Check it out here:

    http://ezinterweb.com/gamesalad/platform-spawner
  • noxullnoxull Member Posts: 1

    @jamie_c said:
    djdee, attached is a little file I did awhile ago to answer a question just like yours. It's not a template or finished file by any means, it's just a demo to show how to create endless platforms. It will need a lot of work to turn into a full game, but it should show you the basic concept of the platform spawning.

    I dont know if this will still be active but I was looking at that file and am trying to replicate it with slightly different variables but when I tried to I cannot find the 'self.spawned' attribute it is there when I open your document but when I started mine it just wasn't there

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

    Since posting that file I've done a more detailed tutorial, if you want to check it out its here:

    That self.spawned attribute is a custom attribute. I added that manually to the actor, if you are starting a new file from scratch you would need to add it to your actor as well.

  • BBEnkBBEnk Member Posts: 1,764

    A better way to make endless runner is to create a scene say 12000px long or even much less and then move the camera and player, and have a rule when you get to 10000px you set everything back to 2000 or so. That way you get a true endless runner and all of your ground and platforms ETC can be set to non-movable and way less spawning.

    It can be complicated so beware.

Sign In or Register to comment.