Discuss Scratch

capslock_scr
New Scratcher
16 posts

Doodle Jump game does not work after 3rd Gameover Reset

Hello Community

I try to build a doodlejump game.
Right now the game glitches out after I “Gameover Reset” the game for the 3rd time.
See comment in the game sprite.

First reset:
When I click the green flag, I reset every variable to 0, delete all clones and stop every other script.
Then I start the game and it works.

Second reset:
After 10 points I trigger the game over. The game resets, restarts and seem to work.

Third reset:
If I get to 10 points the game glitches out and does not work anymore.
One error I dont know how how to fix, is that the game does not generate new platforms anymore allthough the platform count is under the threshhold of 35.
See comment in the platforms script.

Link to the Game
Ghost Jump

thanks and regards

Capslock

capslock_scr
New Scratcher
16 posts

Doodle Jump game does not work after 3rd Gameover Reset

Update:

I added a start and and a kill screen to the game.
You die if You fall to deep.

I fixed some stuff, but after You die 2 times the platform generation stops and i dont know why.



KoalaKoding
Scratcher
38 posts

Doodle Jump game does not work after 3rd Gameover Reset

Hello Capslock! I see that the clones in your game max out. Please note that Scratch has a feature that doesn't allow you to have more than 300 clones. And at the third reset the clones reach 300 and Scratch cannot make any more clones. Please don't hesitate to reach out if you need any more help with this game! I love the concept and it is very fun!
capslock_scr
New Scratcher
16 posts

Doodle Jump game does not work after 3rd Gameover Reset

Thanks for the answer.
Can someone help me to find where i dont delete the clones ?
Mostlikely it has to be after a reset of the game.
KoalaKoding
Scratcher
38 posts

Doodle Jump game does not work after 3rd Gameover Reset

Ok I'm a little busy now! I can do that later!
KoalaKoding
Scratcher
38 posts

Doodle Jump game does not work after 3rd Gameover Reset

Hello! I just took a look at the code and in fact it has nothing to do with the platforms or gameplay but it is actually the score that causes the clone overload. To fix this just do this in the score sprite
whenIreceivegame overdeletethisclone

Last edited by KoalaKoding (Oct. 18, 2023 15:35:53)

cookieclickerer33
Scratcher
1000+ posts

Doodle Jump game does not work after 3rd Gameover Reset

you could always have the game stop all when you loose and then at the start do this
whenclickedbroadcastdelete all clones
whenIreceivedelete all clonesdeletethisclone
i forget if clones are deleted when the flag is clicked or stop sign is clicked in scratch 3. i know thats how it is in snap tho
capslock_scr
New Scratcher
16 posts

Doodle Jump game does not work after 3rd Gameover Reset

Wow thanks so much…
I delete the clones in all other sprites on reset, but the score somehow slipped to the cracks.

Letting the game stop was my last option. I want to implement some kind of a metaprogression in the game.
So the “evil platforms”, that might kill you or bump you away will become less scary.
Maysome health or jump updates…

It would feel a little chunky without going back and forth into the options menu.

I will remove the game for now until its in a playable state.
KoalaKoding
Scratcher
38 posts

Doodle Jump game does not work after 3rd Gameover Reset

Ok! Sounds great! Glad I could help out! Please let me know when you release the game!

Powered by DjangoBB