Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » I need help with my typing game.
- Tommy100
-
100+ posts
I need help with my typing game.
I just shared my Typer Shark game but unfortunately, after I share it, there seems to be a ton of issues. Here are a few of them.
1. High scores list
- Usually cloud comes easy to me, but I'm banging my head against a wall because I have no idea why it is glitching. Sometimes it posts a user 2 or 3 times on the leaderboard after the game is over. Or sometimes it only shows the score or level or words per minute or something on it. Sometimes it gets really weird and the score might show up as “E392B” or the wpm might show up as “900%”. I just reset the cloud variables so it'll probably show few or no users on the list.
2. Typing glitches
- Sometimes when typing a word, it thinks to move on to a different word and glitches the game. And sometimes the game will not even let you type a word.
——————————————————-
Here are some reports of the glitches:
“WOULDN'T LET ME TYPE”
“it giltched on level 11 when i typed it in it would not do anything!”
“Really nice project! Only one problem. I forget what level it was (Around level 12), but I had to type ”zoo“ and ”jog“. When I typed in the third ”o“ in ”zoo“, the code recognized it as the ”o“ in ”jog“, and after that the code wouldn't recognize any other letters I typed in. Besides that really nice game!”
“I got to level 17 on hard and nothing was appearing, the bar was filling but nothing..? And on Easy I got to Level 31 and the typing was not registering and i got killed..?”
—————————————————
I'm really frustrated that this is glitching, because I think it could be an extremely fun game if it were not glitchy.
Also, keep in mind that the glitches have to do with cloud lists and confusing scripts with a few hack blocks. I might need an advanced scratcher to help me with this.
I would really appreciate some help! Thanks!
1. High scores list
- Usually cloud comes easy to me, but I'm banging my head against a wall because I have no idea why it is glitching. Sometimes it posts a user 2 or 3 times on the leaderboard after the game is over. Or sometimes it only shows the score or level or words per minute or something on it. Sometimes it gets really weird and the score might show up as “E392B” or the wpm might show up as “900%”. I just reset the cloud variables so it'll probably show few or no users on the list.
2. Typing glitches
- Sometimes when typing a word, it thinks to move on to a different word and glitches the game. And sometimes the game will not even let you type a word.
——————————————————-
Here are some reports of the glitches:
“WOULDN'T LET ME TYPE”
“it giltched on level 11 when i typed it in it would not do anything!”
“Really nice project! Only one problem. I forget what level it was (Around level 12), but I had to type ”zoo“ and ”jog“. When I typed in the third ”o“ in ”zoo“, the code recognized it as the ”o“ in ”jog“, and after that the code wouldn't recognize any other letters I typed in. Besides that really nice game!”
“I got to level 17 on hard and nothing was appearing, the bar was filling but nothing..? And on Easy I got to Level 31 and the typing was not registering and i got killed..?”
—————————————————
I'm really frustrated that this is glitching, because I think it could be an extremely fun game if it were not glitchy.

Also, keep in mind that the glitches have to do with cloud lists and confusing scripts with a few hack blocks. I might need an advanced scratcher to help me with this.

I would really appreciate some help! Thanks!

- Laddie12
-
100+ posts
I need help with my typing game.
The cloud part makes me feel sick. I have no idea what it is doing (if you could comment it or something, that would help). It is typical for people to have different methods to do complex things and I always follow a set pattern when doing passive cloud storage. Honestly, I have no idea why it takes so much scripting to do a very simple task (it took me longer to do sorting and visualizing than the cloud part). Some context would be nice for that.
And for the typing glitches, again, I have no idea what anything in your scripting does (and I don't have the time to look through it all). If you could isolate the sprite or potentially certain scripts where the problems are occurring, that would be a big help to anyone looking at this question.
I would honestly love to help you, but you have a large project on your hands. I (and probably others) don't have time to go through all of your sprites and all of your scripts and figure out what they do. When facing glitches, it is always important to have good documentation. That is something you just have to learn through bad experiences
I am not trying to be hard on you, just requesting a little more specific information about the problems at hand! Good Luck!
And for the typing glitches, again, I have no idea what anything in your scripting does (and I don't have the time to look through it all). If you could isolate the sprite or potentially certain scripts where the problems are occurring, that would be a big help to anyone looking at this question.
I would honestly love to help you, but you have a large project on your hands. I (and probably others) don't have time to go through all of your sprites and all of your scripts and figure out what they do. When facing glitches, it is always important to have good documentation. That is something you just have to learn through bad experiences

I am not trying to be hard on you, just requesting a little more specific information about the problems at hand! Good Luck!
- DadOfMrLog
-
1000+ posts
I need help with my typing game.
Wow, that's a lot to try to work through…
One thing that was easy to see, though, was the wrong variable in your encoder. Take a look at your use of “length of (counter2)”…
As for the typing problems, I'd say that it's way too convoluted to try to work through. You're using clones with different costumes, and doing forever loops in each clone, waiting for the appropriate (costume's) key to be pressed at the appropriate time, and it gets very messy indeed trying to figure out what's happening when!
I'd really recommend totally rethinking how you go about this, and rewrite it to make it much easier to follow what's happening with the typing by putting in a single centralised place, rather than have things running scattered across clones. I'd probably use a separate sprite that has a list of ‘words’ currently on-screen, and check for the first letter of one of those words to get typed. When it does then just wait for the subsequent letters (unless that word disappears, in which case go back to the start).
Does that make sense?
One thing that was easy to see, though, was the wrong variable in your encoder. Take a look at your use of “length of (counter2)”…
As for the typing problems, I'd say that it's way too convoluted to try to work through. You're using clones with different costumes, and doing forever loops in each clone, waiting for the appropriate (costume's) key to be pressed at the appropriate time, and it gets very messy indeed trying to figure out what's happening when!
I'd really recommend totally rethinking how you go about this, and rewrite it to make it much easier to follow what's happening with the typing by putting in a single centralised place, rather than have things running scattered across clones. I'd probably use a separate sprite that has a list of ‘words’ currently on-screen, and check for the first letter of one of those words to get typed. When it does then just wait for the subsequent letters (unless that word disappears, in which case go back to the start).
Does that make sense?
Last edited by DadOfMrLog (June 17, 2016 08:34:52)
- yclee0206
-
100+ posts
I need help with my typing game.
I'm still looking through your project, but I found something that might be creating an error. take a look on your text sprite. in the define script letter word…. block, there are a lot of undefined block
- DadOfMrLog
-
1000+ posts
I need help with my typing game.
Those are ‘hacked’ “costume name” blocks. They are doing exactly what they are intended to do, even though they show up as “undefined”. I'm still looking through your project, but I found something that might be creating an error. take a look on your text sprite. in the define script letter word…. block, there are a lot of undefined block
See here for a demo project: https://scratch.mit.edu/projects/23639677/
Also, see this post where I mention a bit about it.
Last edited by DadOfMrLog (June 17, 2016 12:04:35)
- 300141
-
25 posts
I need help with my typing game.
I have noticed a glich where when the meter is full. It won't let you type.
- Tommy100
-
100+ posts
I need help with my typing game.
OMG, I'm so sorry. I'm just not the person that puts comments in my projects. I should've done that before I posted this. I completely understand what you're saying. I would have said the same thing. I now realize how overwhelming all those scripts must be to you. It would take ages to get a clear mind of all that stuff. Thanks anyways! The cloud part makes me feel sick. I have no idea what it is doing (if you could comment it or something, that would help). It is typical for people to have different methods to do complex things and I always follow a set pattern when doing passive cloud storage. Honestly, I have no idea why it takes so much scripting to do a very simple task (it took me longer to do sorting and visualizing than the cloud part). Some context would be nice for that.
And for the typing glitches, again, I have no idea what anything in your scripting does (and I don't have the time to look through it all). If you could isolate the sprite or potentially certain scripts where the problems are occurring, that would be a big help to anyone looking at this question.
I would honestly love to help you, but you have a large project on your hands. I (and probably others) don't have time to go through all of your sprites and all of your scripts and figure out what they do. When facing glitches, it is always important to have good documentation. That is something you just have to learn through bad experiences
I am not trying to be hard on you, just requesting a little more specific information about the problems at hand! Good Luck!

- Tommy100
-
100+ posts
I need help with my typing game.
Yes, that completely makes sense! I'm so sorry about my messy project. I understand. It would take ages to look through all those scripts. Wow, that's a lot to try to work through…
One thing that was easy to see, though, was the wrong variable in your encoder. Take a look at your use of “length of (counter2)”…
As for the typing problems, I'd say that it's way too convoluted to try to work through. You're using clones with different costumes, and doing forever loops in each clone, waiting for the appropriate (costume's) key to be pressed at the appropriate time, and it gets very messy indeed trying to figure out what's happening when!
I'd really recommend totally rethinking how you go about this, and rewrite it to make it much easier to follow what's happening with the typing by putting in a single centralised place, rather than have things running scattered across clones. I'd probably use a separate sprite that has a list of ‘words’ currently on-screen, and check for the first letter of one of those words to get typed. When it does then just wait for the subsequent letters (unless that word disappears, in which case go back to the start).
Does that make sense?
Also thanks for pointing out that in my cloud. I think it just might have fixed the glitches in the high scores list! Thanks so much! I can't thank you enough!

- DadOfMrLog
-
1000+ posts
I need help with my typing game.
Sorry, I wasn't really referring to the scripting in general when I said ‘messy’ – it's certainly laid out loads better than my jumbled-up projects tend to be. I'm so sorry about my messy project. I understand. It would take ages to look through all those scripts.
Also thanks for pointing out that in my cloud. I think it just might have fixed the glitches in the high scores list! Thanks so much! I can't thank you enough!
I was really thinking about the methodology of the key-presses, and in terms of trying to keep together in your head the way that the scripts from different clones will interact. It wasn't clear to me how it's meant to work (though it obviously does, up until a certain point).
I think having all the key-detection in a separate sprite, with a list of currently visible words, and an index var that points to ‘the current word being typed’, which is zero if no word has yet been started (so you'd then look through first letter of all words looking for a matching keypress), would make it easier to keep track of it all.
Last edited by DadOfMrLog (June 18, 2016 07:11:21)
- Tommy100
-
100+ posts
I need help with my typing game.
Good idea! There's one problem with that though. It's hard to explain but I'll try to make it clear. Making it in a separate sprite would mean that the sprite would have to check constantly to see if the player is typing the first letter of each word. But putting all that in 1 forever loop can cause a glitch. Because if it has to go through a long forever loop of all the first letter of the words then it might not detect that I typed something fast enough. Cuz there is no block that isSorry, I wasn't really referring to the scripting in general when I said ‘messy’ – it's certainly laid out loads better than my jumbled-up projects tend to be. I'm so sorry about my messy project. I understand. It would take ages to look through all those scripts.
Also thanks for pointing out that in my cloud. I think it just might have fixed the glitches in the high scores list! Thanks so much! I can't thank you enough!
I was really thinking about the methodology of the key-presses, and in terms of trying to keep together in your head the way that the scripts from different clones will interact. It wasn't clear to me how it's meant to work (though it obviously does, up until a certain point).
I think having all the key-detection in a separate sprite, with a list of currently visible words, and an index var that points to ‘the current word being typed’, which is zero if no word has yet been started (so you'd then look through first letter of all words looking for a matching keypress), would make it easier to keep track of it all.
Does that make sense? Sorry it's kind of hard to explain.
- DadOfMrLog
-
1000+ posts
I need help with my typing game.
Not a problem: it'll be fine if you use a non-refresh custom block for each check of the loop – you only have a handful of first letters to check each time. Good idea! There's one problem with that though. It's hard to explain but I'll try to make it clear. Making it in a separate sprite would mean that the sprite would have to check constantly to see if the player is typing the first letter of each word. But putting all that in 1 forever loop can cause a glitch. Because if it has to go through a long forever loop of all the first letter of the words then it might not detect that I typed something fast enough.
Something like this:
Last edited by DadOfMrLog (June 18, 2016 16:54:51)
- Tommy100
-
100+ posts
I need help with my typing game.
Brilliant! Thanks so much!Not a problem: it'll be fine if you use a non-refresh custom block for each check of the loop – you only have a handful of first letters to check each time. Good idea! There's one problem with that though. It's hard to explain but I'll try to make it clear. Making it in a separate sprite would mean that the sprite would have to check constantly to see if the player is typing the first letter of each word. But putting all that in 1 forever loop can cause a glitch. Because if it has to go through a long forever loop of all the first letter of the words then it might not detect that I typed something fast enough.
Something like this:

- Discussion Forums
- » Help with Scripts
-
» I need help with my typing game.