Checking a word from a pile of random letters?

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!

Comments

  • wurwagwurwag Member Posts: 16
    Solved this by changing the whole architecture of my game.
  • ericzingelerericzingeler Member Posts: 334
    In a nutshell, can you explain your method? I just created a word checker for one of my Apps, am interested to see how you went about it.
  • wurwagwurwag Member Posts: 16
    Sorry I may have sounded like I actually solved my problem... what I ment was that I had to change the whole idea of my game or big part of it. I'm going for manual check for now until I come up with some logic to do checker that is working after every move. Problem is that the pile of letters may consist up to 100 or so letters in a same pile. So checking them all over again might just be way too heavy to process. I decided to skip it for now and did some creative thinking how to approach my idea from other perspective and so far the new idea I have might actually work even better. I hope.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2013
    I think the problem is that there are too many possible combinations of words to check all possibilities. This letter string: aeioustrlnaeiousstrln combines to form 1926 words, for example. Add just a few more letters and you're in the tens of thousands of words. :-B

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • wurwagwurwag Member Posts: 16
    It should not solve anagrams but instead check from a pile what letters are connected so that the word is formed.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2013
    So are you saying that if you drop A, P, P, L and then you drop X, Y, Z, E, it should know that APPLE is a word (and also ZAP and PLAY and etc.)? Or are you saying that if you drop the word in order A, P, P, L, E, it should know that's a word?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2013
    R
    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

  • wurwagwurwag Member Posts: 16
    Here's an example ... if the A letter drops where it is about to the connected letters will then form APPLE word Image and video hosting by TinyPic
  • wurwagwurwag Member Posts: 16
    @tatiang sorry missed your above comment. That is about what I was wondering but when I have up to 100 letters with a changing pile and I have to check all letters after every move it just may turn to hell what comes to processing all that.

    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.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2013
    A picture is worth a thousand words!

    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

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2013
    You're still looking at anagrams, though. :P If you drop an A in there, you're going to have AFPFPEELKO connected. I see a potential problem in that not only does the A have to know which letters its connected to, but each of those letters has to know which letters its connected to and since you're using physics (presumably) to move/displace letters, how would letters know they had disconnected from the string of letters? A letter might pop off and collide with another lone letter but not form a word.

    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

  • wurwagwurwag Member Posts: 16
    Yes, no anagrams just pure words in the correct order :) Maybe it just is impossible, there could be situations where one letter has 6 other letters connected to them.. so that 1 letter should start a new table thingy every time it collides with a another letter. And the pile is always changing.. new letters may disconnect other letters etc.. Maybe I should get rid of the physics and stick with a location grid.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Well, you said it. A grid is way, way easier.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.