Starting a Quiz app

Hi,

I am starting a quiz app and wondering what would be a better approach - a file based approach or a database approach to creating the framework for running the quiz.

I want diff levels of difficulty, random question selection, more than one correct answer option, scoring , posting to Facebook etc. anyone done this before and care to share some experience?

I know peach has a template, but not sure how it is done and what can be reused? Peach - is there a discount code :slight_smile: ? [import]uid: 56163 topic_id: 18820 reply_id: 318820[/import]

Either a database or a table (or file) containing all the questions along with the correct answers would be the way to go [import]uid: 84637 topic_id: 18820 reply_id: 72490[/import]

Depends on what’s easier for you. For such a simple thing file based approach wouldn’t be difficult in any way. (Furthermore, one could also use JSON or XML for this rather then line based input.)

Databases become more useful for more complicated data than this IMO. [import]uid: 58849 topic_id: 18820 reply_id: 72536[/import]

Can someone post code for creating a simple quiz?

On the top of the screen the question will appear which will be an image and after  that the possible answers

Or at least where can i find a tutorial. I want to make a math quiz for my students since they spend more time with their mobile devices than their books.

For my game OmniTrivia, I actually ended up hosting the questions in a MySQL database on my web server and then I select 20 questions from the database based on the category the player selected to play.  When you have lots of records and only want a few at a time, a database makes sense.  Now getting random records from the database is a bit tricky, but given you want to have various difficulties and such using a query to get matching questions a query system makes a lot of sense.   But that said…

To support offline play, a portion of the questions reside in the App builds, that I chose to have as a JSON file, so I could simply read it in an turn it into a Lua table, shuffle the questions and grab questions 1-20.   So either way will work.

Such a nice project but i never develop this type of project you develop this type of app i will help you.

Can someone post code for creating a simple quiz?

On the top of the screen the question will appear which will be an image and after  that the possible answers

Or at least where can i find a tutorial. I want to make a math quiz for my students since they spend more time with their mobile devices than their books.

For my game OmniTrivia, I actually ended up hosting the questions in a MySQL database on my web server and then I select 20 questions from the database based on the category the player selected to play.  When you have lots of records and only want a few at a time, a database makes sense.  Now getting random records from the database is a bit tricky, but given you want to have various difficulties and such using a query to get matching questions a query system makes a lot of sense.   But that said…

To support offline play, a portion of the questions reside in the App builds, that I chose to have as a JSON file, so I could simply read it in an turn it into a Lua table, shuffle the questions and grab questions 1-20.   So either way will work.

Such a nice project but i never develop this type of project you develop this type of app i will help you.