Does anyone know how to make a platformer that spawns platforms infinitely?

Like this :

1 Like

Well, one way to do this is once a platformer leaves the screen, it moves back to the top with a new random x value, or another way is to create a new clone of a platform at the top

(Let me know if you need an example project)

1 Like

well im a beginner, so i might need an example project

That is what I would do, or clone them once the bottom one is removed.

1 Like

Are you making a game about that for fun or do you have an assignment or something…?

1 Like

im thinking of posting it in my itch.io

1 Like

with all my other rubbish games lol

1 Like

Use the forum search and search for platform. You will see a post related to platform engine developed by awc95014. That should be a good way to start.

1 Like

I made a basic example, here:
My Project1-13-2021_19-49-46.wick (2.7 KB)

What I did was send the platformer back to the top after it leaves the screen
The example is endless

2 Likes

That is definitely a good start @Andeer. You should adjust the frame per second a little bit.

1 Like

how do i make a death screen???

1 Like

You can create the death screen in a new frame, and know when the player falls off the screen by using the following code:

if(player.y>project.height){ // If player falls off screen
    gotoAndStop(#); // replace # with number of the frame
}

There are other ways a player can die, falling off the screen is just an example

2 Likes

where do i put this code???

1 Like

i posted it on itch io, no death screens and i cant seem to rotate the characters head.

1 Like

Also some bugs but i posted it here : https://4ndeer.itch.io/2dplat-endless

1 Like

you should put the code where it says the character died

Ummmmm…

Change the word, “player,” with the name of your player, and put it in an update script inside of the frame that your player is in.

in your online version you already check for death
you can switch frame when you verify your player is dead

Ok i managed to add a death screen, how do i add touch controls for mobile?