Checking a word from a pile of random letters?
wurwag
Member Posts: 16
Hi!
Imagine letters falling from the top of the screen.. forming a pile of random letters to the bottom.
Is it possible to make a word checker that every time when a new letter has fallen down it would check if any actual word was formed (connecting letters would form words)?
I'm pretty sure this can be done somehow but I just can't find any direction where to start from.
I know it can be done if you select the letters manually, but would be great if the checker would check the word situation after every new letter dropped.
Thank you!
Imagine letters falling from the top of the screen.. forming a pile of random letters to the bottom.
Is it possible to make a word checker that every time when a new letter has fallen down it would check if any actual word was formed (connecting letters would form words)?
I'm pretty sure this can be done somehow but I just can't find any direction where to start from.
I know it can be done if you select the letters manually, but would be great if the checker would check the word situation after every new letter dropped.
Thank you!
Comments
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
A
T
O
P
O
T
A
T
O
Let's say you limit the words to 3-letter words or longer. The "pile" above (dropped starting with R and ending with O so that O is at the top of the pile) contains RAT, TOP, POT and POTATO. I may have missed a word, who knows? Is that possible... I think so.
I made a demo just now that works relatively well. The hard part is knowing when to stop checking a word. For example, R-A-T is a word but then the T at the end of RAT is needed for the next word T-O-P so I can't just reset the attribute when I find RAT. And POT is part of POTATO so same problem there. And do I stop when I find POTATO or do I assume that POTATOES is up next? And what about when I find POTATOJ, which isn't a word? If I have a rule that stops when a word isn't found then I'd have to stop checking when I got to POTA and I'd never find POTATO.
I guess I could create a new table row for each possible word and keep adding letters to columns like this:
1. R A T [word; stop]
2. R A T O --> R A T O P --> R A T O P O --> R A T O P O T (stop when out of letters?)
3. A T O --> A T O P --> etc.
4. T O P [word; stop]
5. T O P O --> T O P O T --> etc.
I'm exhausted just thinking about it.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
It would have to pick every word short and long ones, even inside the same word. But all those tiles would be destroyed if they are part of any word.
It reminds me of a game my wife and I like to play: http://www.zimzalagames.com/games/konexi
Make so much more sense now. *quickly moves demo to trash*
I'll think about that. It actually sounds easier than what I had in mind.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Edit: oh wait, so you want the words to be formed in the correct order, A-P-P-L-E? Okay, then no anagrams. Phew.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User