SOLVED: How can I make this game harder? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

SOLVED: How can I make this game harder?

EDIT: I did it! it’s taller and more difficult. It increases the gravity every 50 points until 350 points. i’ve tried making it so that instead of resetting the speed to 25 every time you tap, it just slows it down some. but then as time passed with the window open (and the ball idle on the ground) it eventually became impossible to get the ball in the air. i’m not sure i fully understand the code bit that adds gravity. https://code.sololearn.com/WePJvgLzw3lY/?ref=app

30th May 2022, 4:00 AM
Brendan <i follow=“back”>
Brendan <i follow=“back”> - avatar
11 Answers
30th May 2022, 1:31 PM
JaScript
JaScript - avatar
+ 4
Chris Coder increasing gravity as score increases is a good idea, thanks. JaScript thats rad, although probably a bit beyond my experience at this point.
31st May 2022, 12:01 AM
Brendan <i follow=“back”>
Brendan <i follow=“back”> - avatar
+ 3
The difficulty in my game Chris Coder is to balance between the floor and the ceiling. Above and below the score is lost. And that is not so easy.
30th May 2022, 8:55 PM
JaScript
JaScript - avatar
+ 2
Maybe you could make the ball move diagonally and the user has to touch it to keep it up.
30th May 2022, 5:36 AM
Ausgrindtube
Ausgrindtube - avatar
+ 2
You have the screen touch function, just needs to be limited to the size and location of the ball.
30th May 2022, 6:16 PM
Ausgrindtube
Ausgrindtube - avatar
+ 2
Brendan How about increase the gravity the higher your score? Then make the ball vanish and appear at higher scores. Make the ball get bigger or smaller. Etc
30th May 2022, 9:03 PM
Chris Coder
Chris Coder - avatar
+ 2
Chris Coder Try it now!!! It gets harder every 50 points (until like 350)
31st May 2022, 4:08 AM
Brendan <i follow=“back”>
Brendan <i follow=“back”> - avatar
+ 1
Chris Coder congratulations.
30th May 2022, 9:04 PM
JaScript
JaScript - avatar
0
Ausgrindtube: i thought about having to touch the ball but i have no idea how i would code that. thanks for the suggestion! JaScript: nice, i think i could figure this out easily. thanks!
30th May 2022, 6:12 PM
Brendan <i follow=“back”>
Brendan <i follow=“back”> - avatar
0
JaScript You made it even easier. Now all you have to do is tap anywhere on the screen and the ball stays up.
30th May 2022, 7:54 PM
Chris Coder
Chris Coder - avatar
0
JaScript Just got up to 1k was very easy. Only stopped because I didn't want to waste anymore time with it.
30th May 2022, 8:58 PM
Chris Coder
Chris Coder - avatar