Table setup- noob needs help
![dacaam](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
First time user question.
My game needs an extensive database of questions (possibly hundreds) to be fed randomly to the player, and each question can only every be viewed once (otherwise it would skew the player next time they see it). The game would then keep track of responses on a per player basis and load the score next time they play the game. Ideally, the questions will fall into several categories- domestic policy, jobs, defense... it's an election themed game- and I'd like to track the answers categorically as well as in aggregate.
My idea was to
1, create a table of possible questions with a unique number and categories for each question (so I can continue to add to the list without effecting what has happened before)
2. have the engine look to see if the question has been used previously then flag it so it's removed from play permanently.
3. log the answer with the category so it can be tracked and displayed as a graph later
I have some ideas of how to do this, but there is probably a right way and a wrong way to go about it.
Can anyone advise me how to best set this sort of table up?
Many thanks!
Mark
My game needs an extensive database of questions (possibly hundreds) to be fed randomly to the player, and each question can only every be viewed once (otherwise it would skew the player next time they see it). The game would then keep track of responses on a per player basis and load the score next time they play the game. Ideally, the questions will fall into several categories- domestic policy, jobs, defense... it's an election themed game- and I'd like to track the answers categorically as well as in aggregate.
My idea was to
1, create a table of possible questions with a unique number and categories for each question (so I can continue to add to the list without effecting what has happened before)
2. have the engine look to see if the question has been used previously then flag it so it's removed from play permanently.
3. log the answer with the category so it can be tracked and displayed as a graph later
I have some ideas of how to do this, but there is probably a right way and a wrong way to go about it.
Can anyone advise me how to best set this sort of table up?
Many thanks!
Mark
Best Answer
-
MotherHoose Posts: 2,456
@dacaam …you can start now …
as the questions are categories … add a table for each category
then selecting a random question will be more efficient …
row# … serves as question#
columns for display would be: … question … answerRed … answerBlue … answerIndependent
you can track questionsUsed with a gameAttribute … text type … adding qx#s to it
you can then randomize questions and not display those that are in that textAttribute
and you can save/load the content of that gameAttribute
difficult to verify an answer with keyboardInput
… as that is caseSensitive/pluralSensitive and requires correct spelling
think checkBoxes would be less frustrating
for graph … easy if just tracking with category
each answer would add 1 to the correct categoryRed or Blue or Independent
then graphs would just be as a meter for the number in that category
to graph answer for each and every question would require numerous attributes
==
start with 3 questions/tables … see how things work
once functionality is perfect … expanding is easy!
==
I am eagerly awaiting writeable tables!
though tables just store values for attributes …
writing/storing new values will be phenomenal!
… even if the runTime tables are not save/load capable …MH
Answers
I'm a little nervous waiting, since it's timed to the election. Waiting might mean I miss my window, you know?
Any idea when that feature will become available?
So, what is a writeable table? A table that can update based on in game actions?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Does the engine care what format the spreadsheet takes- what information goes where- or is that definable within the engine? (please forgive me if this is a dumb question, but I'm new at this :-)
Thanks a lot for your help, everyone.
M
So, now that writeable tables have arrived (sounds awesome!) how does this change the table setup for my purposes? It seems as if, as tshirtbooth mentioned, it will make things a whole lot easier.
As a noob, I would think I can set a column value as a boolean, and then use the "Change Table Value" attribute to True once the quote has been used.
How would I then track the player's answers- with a different table that sums the value of their answer and displays the sum when asked?
BTW, if anyone wants to take this on I'm willing to compensate you and then make the setup available to the community.
Thanks again.
Tshirtbooth has a great video for going through a list randomly and making sure you cannot get the same question. It should get you started.
Here you go: http://gshelper.com/cycle-through-a-list-at-random-with-out-repeats-gamesalad-tutorials-video/
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
So, NOW the question is "how do you select text from 2 columns in the same random row and display the text from both?" In this case it would be a category like energy policy and the text for the policy itself? If you are calling for a random row, and like in the tutorial for a specific column, how can you also call text from the same row but a different column? You can't use a separate action because that will randomize the row and that might give a different answer (like foreign policy)... right?
Can't figure that out...
Thanks to you all, you've been really helpful to me!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I'll give it a go and thanks again to all.