GameSalad

How to make an Infinite Platformer?

Triangularity+GamesTriangularity Games Posts: 123Member, PRO
edited August 4 in Working with GS (Mac)

I am trying to make an infinite platformer that is randomly generated. What would be the best way of accomplishing this? I have tried moving the player across the scene, but that proves difficult if you have to keep extending the scene. I feel the best way to accomplish this is to make the player still and move everything else within the screen (no scene size changes). However, after trying this I can't come up with a way for the ground to be infinite, either by spawning itself, or having two that move across the screen and then back to their original starting point (off screen). Essentially I am trying to make an infinite conveyor belt for which I can put obstacles and enemies on, but the important part is creating this infinite conveyor belt. Any help/advice would be greatly appreciated. Thanks in advance!

Best Answers

Answers

  • Triangularity+GamesTriangularity Games Posts: 123Member, PRO
    edited August 4

    @pHghost said:
    You can easily also make the scene so wide that it is pretty much impossible for the player to reach the end, so then you can move the player character. I've done that as well and it works. Actually, in my last game I used both methods, a veeery long scene and constantly moving actors for the background.

    I feel like at some point though, this would cause the game to be very large and laggy. Was this the case? Just curious...the first solution (for me) works much better thanks, but I would like to know the full potential of HUGE levels in Gamesalad.

  • jamie_cjamie_c ImagineLabs.rocks Posts: 5,314Member, BASIC
    edited August 4

    Here are a couple tutorials I made a long time ago, but still apply, if you're interested:

  • Triangularity+GamesTriangularity Games Posts: 123Member, PRO

    @jamie_c

    I'm making more of an infinite platformer than an infinite runner. The biggest problem I'm facing is the player being able to walk backwards when the ground is no longer there (has repositioned at the end of the line farther in the scene). How can I make it so the player can only walk backwards to a point before the left end of the platform he's currently on?

  • Triangularity+GamesTriangularity Games Posts: 123Member, PRO

    @pHghost
    Thank you so much for your help and support. I got it working exactly the way I wanted it too. :smile:

Sign In or Register to comment.