I want to create an auto-runner
that uses real words to influence terrain generation. My idea is to create pieces of the environment using only ONE Sprite that has 26 frames (representing the entire pool of the English alphabet).Example:
The word "CARS" is selected and stored in an Array. The game will loop through the array spawning instances of "Sprite" and setting the frame to the equivalent number in alphabet (-1).
For 1 to TotalLettersInWord
-> Spawn Sprite at XY
-> Set Frame to WordArray[CurrentLetter]
-> Add 1 to CurrentLetter
All sprites will be moving to the Left with behaviour "Destroy outside of layout"
Once the last letter has been spawned it goes back to the first letter, looping indefinitely (another part of the game will change the word).
I am using this method because I think it will be an interesting way to create patterns within the game's landscapes based on the patterns in word construction in the English language, i.e., vowels are only used after certain letters, and certain combinations NEVER come up, such as X followed by R.
SO MY QUESTION IS - What is the best method of creating a list / table of words that the game chooses from? I want to be able to sort them by character length, but other than that I could practically include a whole dictionary as long as it wouldn't slow the game down to a crawl. Any ideas?