How to make a simple platformer

Isn’t creating a platformer at least one of a game coder’s ambitions? I know it was one of mine.

2 Likes
My creativity and inspiration have no limits. —Crosbyman64 2020
2 Likes

Yay I’m excited to see it! I love your platformers

3 Likes

Failure is a pathway to success

3 Likes

Can you teach me how to make an object collide?

1 Like

I am a noob
Gbot

1 Like

If you want real advice and help, then ask Spy_Guy_96. He has more knowledge on platformers than I do.

1 Like

Oh wow this is great now I have a good way to make a platformer

1 Like

Interesting…

Platformer template anyone? :thinking:

Hmmm will try to make one but will have to wait

Yesss I can make a Halloween themed one and do that for the hhc

1 Like

That’s good btw, anyone know how to jump?

1 Like

When is tapped. Set vertical velocity to (however High your jump is)

1 Like

The only problem is that when collide it will go up.

2 Likes

If the object collides with the platform, set y scroll to 0 (bottom or top), or set x scroll to 0 (sides).

@creationsofavillager, In your case, “vertical velocity”

I don’t understand… @Crosbyman64

1 Like

Under Tetris line 4 (give it a self collision of 1):

When (self) collision = 1
—Check once if ((abs(cloud x pos - self x pos)) < (((cloud width + self width) ÷ 2) - 1)) and ((abs(Y - self y pos)) < ((cloud height + self height) ÷ 2))
—— Check once if ((cloud y pos) > (self y pos))
——— set (Y) to (self y + ((cloud height + self height) ÷ 2))
——— set (Y speed) to 0
——— set (Air) to 1
—— Else
——— set (Y) to (self y - ((cloud height + self height) ÷ 2))
——— set (Y speed) to 0

For X, replace (cloud x pos) with (X), (Y) with (cloud y pos) (first check once if), and a bunch of y pos and heights with x pos and widths, and don’t include air for x)

Under jump button: when self is tapped, if air = 1, set (Y speed) to 21

Under cloud:
when game is playing, increase (Y speed) by -1
when game is playing, set position to x (x) y (y)
When game is playing, increase (x) by (x speed), increase (y) by (y speed)

Make sure the controls’ code are above the cloud’s code, which should be above the platform’ code (click the list view icon in the top right corner of the main code block (light blue) to reveal multiple objects’ code blocks).

I wish I could make this easier to understand, but I this is as close as I can get to being understandable…

1 Like

You will need to copy it to all platforms, or you can clone them, and it will still do the same thing. Use clone index to deal with the positioning of each platform.

By that, I mean self y pos