Endless Platform

Hello guys,
I am trying to create an endless platform game. I have created a platform with 2880x100 pixels and I want it to generate itself endlessly during gameplay but it appears only ones on the screen than it disappears.
What should I do to generate it endlessly?

Comments

  • BluemoonstudiosBluemoonstudios Member Posts: 156
    you can wrap the x position under scenes
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    keep track of the platforms X location, and when it's right edge is at the right edge of the scene, spawn a new platform that starts at the 'old' platforms right edge (assuming your platform is moving right to left). That's how I've done it for the endless runner tutorial I'm working on.
  • kinzuakinzua Member Posts: 554
    @ahmetyuce if you want to do an endless.. u would not want to build up on RAM usage. So avoid spawn.. and reuse your actors. For e.g... have two of them and make them keep coming in a loop.
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    Perhaps I'm mistaken but I could swear I read here several times that spawning was 'fixed' and it's not really an issue to use that anymore vs recycling actors? I've never had a problem with it yet...
  • SolarPepperStudiosSolarPepperStudios Member Posts: 754
    @jamie_c I made an endless runner game and put it in the App Store. I used spawners like a crazy man and have no problems whatsoever. It runs nice and smooth on iPod 2 and above with no lag!
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    Thanks for the info @Utveckla_Games, nice to hear!
  • OskarDeveloperOskarDeveloper Member Posts: 533
    Make it un-scrollable ;)
  • selectsoftselectsoft Member, PRO Posts: 38
    keep track of the platforms X location, and when it's right edge is at the right edge of the scene, spawn a new platform that starts at the 'old' platforms right edge (assuming your platform is moving right to left). That's how I've done it for the endless runner tutorial I'm working on.
    As long as you destroy actors that are no longer in use, spawning isn't all that much of a problem.
Sign In or Register to comment.