How do you make a simple platform game?

games
helpwithcode

#1

Hey Hopscotchers! @AHappyCoder and I are collaborating on a game, but we can't figure out how to create the platforms.

The game is where you tilt the iPad and the character slides. When you tap the iPad, you jump.

We don't have much experience in making platform games, so if anyone can help us with the code of a basic platform game, we will greatly appreciate it and we will give you credit!

Thanks!


#2

Hi @CreativeCoder! Have you tried this technique yet?

You could use the same code when the ball hits the line for when you tap the screen as well.


#3

Hm, it does work, but the character will always have to be jumping up and down a small increment..

Oh well. I can fix that later. Thank you, @t1_hopscotch!


#4

I think you can change the numbers and play around with them.

To make it jump a smaller increment, instead of -1 in the Increase Value by -1, try -2 first so it will fall down faster. Then instead of 25 in the second Set Value block, try lowering it to 20 and see how you go.

Or if you mean you want a higher increment, you can increase the 25 to 38 maximum.


#5

try looking in the code of this project https://c.gethopscotch.com/p/xk6q9vw73
and try adding a jump button.(or some balloon like what i did)