How would I be able to create a typing speed test game?

I’m trying to make a game like Typeracer. Of course, most of it will involve string manipulation and using some rich text to produce similar effects, shown by images below:

My problem is that I’m not sure how to make the code for this, so that when a player types a word correctly, the word will be turned to green and the next word is underlined.

Any help is appreciated, thanks.

1 Like

I could be way off, but assuming you know the basics, (if not there are tutorials), you may be able to use TextBoxFocused to check when they’re typing and then check until the Text = the target text and time it.

Yes, that’s the idea I had in mind. But I’m not sure how to change the text above so that the highlight moves to the next word.

What was the reason you gave up? Is there anything in particular that was too complex?

I think words can be defined as a combination of letters without spaces.

you would split the string you want to type in the text box by every character, and you would check to see if the characters match. if they do, make it green, and add + 1 to words typed. if they don’t, make it red and maybe you could add + 1 to a mistake counter?

To calculate the formula, you can do: take the number of entries (characters) and divide by five to get the number of words typed. examples: if you typed 200 characters in 1 minute, your speed would be (200 characters / 5) / 1 min = **40 . if you typed 200 characters in 30 seconds your net speed would be (200/5) / 0.5 = 80

hope this helps!

1 Like

But that would be characters per minute and not words per minute?