How to select words from a list randomly, shuffle them, display them as buttons and check
kazuo1231
Member Posts: 2
I am trying out GameSalad, by starting with an easy game similar to Text Twist. I have finished creating my User Interface from menus to high scores to options, but I am stuck at the game logic part.
My game goes like this:
> select 6-letter word.
> ready answers for the word
> shuffle 6-letter word
> display letters as buttons
> user inputs possible words that can be formed
> if answer is 3 letters, give 10 points,
> if 4 then 15, 5 is 20, and 6 is 25.
> answering half of the words correctly or getting the longest word enables the user to go to the next level
> 6-letter words stored somewhere so user will not repeat same word.
I have created these attributes:
> answers - stores all possible words for 6-letter word
> word - the original 6-letter word
> answered - should contain all the words user has answered
But I ran into these problems:
1. Where do I put my dictionary of words? I am limiting my dictionary to be like this so the answers are not needed to be searched for in a huge dictionary:
{
"words": {
"dollar": ["ado", "all", "lad", "oar", "old", "rod", "doll", "lard", "load", "lord", "oral", "road", "roll", "droll", "dollar"],
"encore": ["con", "eon", "ere", "nee", "nor", "one", "ore", "roc", "roe", "cone", "core", "corn", "once", "crone", "encore"]
}
}
I take I have to use tables for this one?
2. Sow do I shuffle the word I selected?
3. How do you make the letters into buttons?
Thanks for the help. Once I find out how to do this, I think I'll be on my way.
~Kaz
My game goes like this:
> select 6-letter word.
> ready answers for the word
> shuffle 6-letter word
> display letters as buttons
> user inputs possible words that can be formed
> if answer is 3 letters, give 10 points,
> if 4 then 15, 5 is 20, and 6 is 25.
> answering half of the words correctly or getting the longest word enables the user to go to the next level
> 6-letter words stored somewhere so user will not repeat same word.
I have created these attributes:
> answers - stores all possible words for 6-letter word
> word - the original 6-letter word
> answered - should contain all the words user has answered
But I ran into these problems:
1. Where do I put my dictionary of words? I am limiting my dictionary to be like this so the answers are not needed to be searched for in a huge dictionary:
{
"words": {
"dollar": ["ado", "all", "lad", "oar", "old", "rod", "doll", "lard", "load", "lord", "oral", "road", "roll", "droll", "dollar"],
"encore": ["con", "eon", "ere", "nee", "nor", "one", "ore", "roc", "roe", "cone", "core", "corn", "once", "crone", "encore"]
}
}
I take I have to use tables for this one?
2. Sow do I shuffle the word I selected?
3. How do you make the letters into buttons?
Thanks for the help. Once I find out how to do this, I think I'll be on my way.
~Kaz
Answers
Not sure if it'd be the best way to answer everyones problems with a:
"I'll answer that for $300" or "For $200 I'll make a template...."
For $199 he could get GameSalad to help with the problem?
....Anyways, there are a few Videos and tutorials which might help on this:
Tshirt has a free template which may point you in the right direction too:
http://gshelper.com/600000-word-checker-free-demo/
Wayne
The problem with the word checker and the game I am trying to make is that the word checker checks on demand, whereas the game I am trying to make needs the possible answers listed down and with the letters replaced so the player knows how many words he has left out.