We are about to switch to a new forum software. Until then we have removed the registration on this forum.
i am making a jeopardy game and i want to make a code that creates the categories and the questions, save them, and then open them in the jeopardy game. is this possible? If so, how?
Answers
Save and load
look at saveTable and loadTable OR
saveStrings and loadStrings
https://www.processing.org/reference/
to use different sketches on the same files (like one sketch is creating them and the other sketch is loading them) store in a separate folder and use absolute paths.
Display text in a grid
Then use
text()
to display it in a grid. Use a double for-loopHow to choose the Categories
The harder part is to choose from lots of categories randomly and then choose questions randomly that fit the category. It’s probably easy when you have just 17 categories and just the fixed number of questions for each category.
If you search the reference for the word "save" as @Chrisir suggests:
...you will also see that your save/load options include a file of strings, a csv Table, JSON, and XML. If you are not already familiar with JSON then it sounds like Table might work best for you -- it is fairly simple and also flexible.
One approach is to have a list of six categories, and a table of questions, with the category (1-6) and the price (1-5) each listed in a table column next to each question. Then you can search the table by category/price to fill slots in your grid with specific questions.
thanks, I'm stupid, didn't look too well apparently
Don't worry -- let us know in this thread if you have follow-up questions after you try working with these functions.
still some errors in it but I show you a simple grid