I need help with the logics of my word game.
In short it is a game to teach small kids to spell. Letters tiles will fall out of the sky and a word will appear at the bottom. The child must click a falling letter tile to correspond to the first letter (e.g. the letter “e”) of the word displayed (e.g elephant), then click on the the next tile to correspond with the second letter (e.g. the letter “l”) and so on.
This question concerns the word that appears and has to be spelled.
- I have an array of 10 words for each level
e.g. public var wordsL1:Array = ["elephant","has","of","off","on","not","got","in","is","it"];
2. I will display one word at a time on the stage (for the loop, I will remove the first word from the list (e.g. “elephant”)and display the new first word (e.g. “has”). If all of them are done the level will be complete)
e.g. wordsL1[elephant]
3. This word must be broken down into letters for the game to work. It will look like one word, but it will be individual characters. How do I break the first string (“elephant”) up into an array with separate elements
e.g. activeWordArray:Array =[“e”,”I”,”e”,”p”,”h”,”a”,”n”,”t”]
The player must see the correctly clicked letter clearly and the rest of the (yet unclicked letters) with an alpha or white. To do this I thought to use identical two text fields, one over the other and both centered to the left margin. (not sure it this will work with seperate elements from a string)
The top word will be colored with a white alpha and will loose a letter everytime the letter was guessed correctly (hope the left align will make the remaining letters stay in place). The bottom array of letters will be normal and stay that way until the entire word was spelled correctly.
Will this work? Is it possible to code?
e.g. below is a mockup where the child already clicked the first 3 letters correctly.