Hi I'm Sam and want to make a quiz game

Hi Guys, I’m a newbie  :slight_smile:

I’m completely new to programming/coding.  Recently I downloaded a plethora of quiz/definition games, and while they were fun for five minutes or so, I felt they didn’t have much content to them.  The developers have not made paid versions, and so it got me thinking.  I would love to make a quiz game, like the kind of one where you have a question followed by four boxes with different words/phrases and to click the correct one.  I’d want my game to have the following variables:

  1. Can select the number of questions

  2. Can select the speed difficulty

  3. Can choose between audio only, read-only or both.

There are many games like it that already exist, but for me, the problem is the limited content.  I wish to put my own questions in.  Is this a big task?

I wouldn’t need fancy logos or brilliant animations, just simple one slide to the next slide would be fine.  I’ve downloaded Corona to my Mac, but mostly I would want the program to run on my android tablet.  Can anyone direct me to any forums/videos or any other advice on where to start?  I’ve seen videos on YouTube on how to make simple Flash game quizzes, but from what I can see, Flash is somewhat difficult to run on Android. 

I just have no idea where to start.  Any help would be highly appreciated. 

I actually published a Corona-based trivia game with Corona back in 2012 or so.  Quiztix is currently building various quiz games with pretty good success.

For your three bullet point questions, 1 and 2 are going to be fully under your control.  For 3, it becomes a little more tricky because one way to do it is with pre-recorded voice-overs. But those are dedicated individual sound files that will bloat your app size in a staggering hurry.  There are some text to voice plugins in our Marketplace, but I’ve never used them so I don’t know how much control over voice types and how accurate they are.

As for the number of questions, writing trivia questions can be a full-time job. And you need a lot. I inherited around 200,000 questions, but many are dated, still good for trivia, but “Who won the last winter Olympics Men’s Hockey Gold Medal game”, not so much, so I spend a lot of time rewriting those questions to be more timely (who won the 1980 Olympics Men’s Hockey Gold Medal game".  I also scoured the internet looking for free question resources, but it’s a lot of work to massage them into a usable format.  6 years later are still sitting in my todo list.

I don’t want to discourage you, in fact hopefully inspire you.

As for the code, the is a great place to ask specific questions (including code), but unless there is a quiz template in the Marketplace (https://marketplace.coronalabs.com) unless you’re paying or willing to collaborate, few developers will want to write a bulk of your game for you.

Rob 

@sammylpt,

Welcome.  I think that making such a game would be very straight-forward with Corona.

You still need to learn the basics of using Corona first of course, but such a game could be made in Corona in very little code and quite quickly assuming you are trained up on the SDK.

Some challenges/questions I see are:

  • How would you get the data/questions into your app?  I would suggest hosting them on an AWS S3 bucket.  If you are very new to this kind of thing, you might want to get help setting that up by paying someone a one time fee, or by getting a friend to help.
  • Would the app be paid? - Going free sounds sexy, but I think you’d want to support it with Ads and/or IAP.  Ads would be the simplest since then you wouldn’t have to manage IAP settings and track what ‘question packs’ folks have purchased.  IAP would probably provide a more direct ratio of earnings to cost.
  • Cost? - If your app is popular, you’ll quickly use over the free monthly bandwidth of the bucket and have to pay for it.  So, be sure to consider this before starting.

PS - Looks like Rob and I were typing at the same time.

I want to say, my post may seem like it is disagreeing with Rob.  It is not.  He is entirely right about the difficulty of handling a large question pool.  In the beginning with a hundred questions, this app would be pretty easy to manage, but eventually it will be a big mess if you don’t start with and adhere to a strict organization method.  The bad news is you won’t know what that should be till you’ve done it for a while.  So, you’ll probably have to go back and re-work and re-factor.

Cheers!

@romminggamer, I don’t think we are disagreeing at all, we are talking about different aspects. You provided @sammylpt with some very good things to think about.  With my game, I have my questions in a MySQL database hosted at my webhost and wrote some PHP scripts to make a simple API to fetch questions, report bad questions, send scores and stats back to the server etc.  I also setup a web-based interface for editing questions with the idea of making it easier to get people’s help editing them (for a small fee of course, if I ever made money with the game) or to make my life easier editing reported bad questions. I still find I have to go into phpMySQL to do a lot of my fixes though…

I also have a JSON based version of the starter questions in my resource directory so the game can be played offline.  My problem is when I fix questions in MySQL I’ve been very bad about patching the JSON files to keep them consistent.

The other problem I have is with a database that size, I’ve not been able to run through every question and there are still formatting errors that will crash my app :frowning:

Rob

Hi Rob and RoamingGamer

Thank you to you both for your in-depth replies.  I’m going to give it a shot I think and still, keep trying with the concept I have in my head.  The questions for the trivia isn’t so much a challenge for me because ultimately I want to design the game for myself.  I seriously doubt I would ever publish it for others to use unless of course, it had a massive success for me.  It’s really for self-learning.  Therefore I don’t need to initially think of monetisation. 

It’s not that I want to use someone else’s code, far from it.  I had hoped that I will eventually learn the code needed.  It’s more like when I go to YouTube and search “Corona Labs Tutorials” and I get 2,900 results and yet it looks like results for mainstream games that people would actually play.  Mind you, perhaps I’m being naive in thinking many people don’t like quiz games.  My concept is for languages.  There are many language apps out there, but I think they are all miss something, or at least they miss it for me. 

What I didn’t want to be doing was to learn how to code for a game like “flappy bird” or “Angry Birds” or something else unrelated and then spend all that time and still not be closer to figuring out a basic game concept with very little physics involved.  Regrettably, I can’t really reply specifically to what both of you wrote because even things like MySQL, API, JSON, PHP I need to spend a long time figuring out what they actually mean. 

I am happy though you both see a potential using Corona, so my dreams are not completely shattered.  I guess I need to trawl through the entire 2,900 videos on YouTube and see if my idea is there and then if I can build off that.  I even downloaded Keynote as I saw a lot of Quiz style videos on that, but I downloaded Corona because I got in touch with the developer whose app I saw and played but was far too short to properly enjoy and they said they used Corona.  So here I am.

But seriously, thank you both for your assistance, while I still feel in complete darkness, I guess at least I have a little direction, or at least I hope.  The journey begins…  

You don’t really need a tutorial specifically for this type of game, although there probably is one out there. Just build it up one small step at a time, using the API docs under documentation and google to look for snippets on these forums.

The first step (and an easy, tangible win) is getting things up on screen in the place you want them, then making them react to user input.

Then there are basic programming concepts that you’ll need whether you’re making a quiz game in Lua or a 3D engine in C, such as variables, control structures (i.e. if/then), loops, data structures etc. And in the case of lua programming, scope is an important concept.

Another important concept to nail down early on (and I certainly didn’t when I first started) is DRY - Don’t Repeat Yourself. If you’re drawing four buttons, there should be one block of code that draws a button, and this should take inputs in terms of the required size, position and text for the button. Then you just loop through this code for however many buttons you need. You’ll see lots of codes on here where people will have eight identical enemies in their game, and will just copy and paste the code eight times.

Your basic goal is to:

Display a random question from some form of database. This could be a lua table, SQLLite database etc.

Draw four buttons and populate them randomly with the four possible answers for that question.

Make the buttons interactable and so that they know whether they relate to the correct answer or not.

If the right button is pushed, give the player a point and some sort of visual/audio feedback.

If the incorrect, give visual/audio feedback.

Clear the old question and repeat.

Work out each small, logical step in plain English and then investigate how to achieve that small, isolated goal in Corona. Initially, forget the database side. Just get some buttons working with a set question and answers. When the time comes, you replace those placeholders with real data.

It won’t help this time, but in the future, be aware I have answered a ton of questions here and made many examples for other things (ex: now stopped Corona Geek hangouts, among others).  

You can find my source code for all of these things here:

PS - Follow my YouTube channel for regular videos associated with answers to questions here too: https://www.youtube.com/user/roaminggamer

I actually published a Corona-based trivia game with Corona back in 2012 or so.  Quiztix is currently building various quiz games with pretty good success.

Quiztix had some amazing games on iOS.

Sadly they are no longer on the store. Knowing how arbitrary the iOS review process can be, I wouldn’t be surprised if Apple removed them. Quiztix are still on Amazon and Google Play. It’s a shame if their iOS presence has gone for good. Their quizzes were the most polished of all the quizzes I have seen on iOS.

I actually published a Corona-based trivia game with Corona back in 2012 or so.  Quiztix is currently building various quiz games with pretty good success.

For your three bullet point questions, 1 and 2 are going to be fully under your control.  For 3, it becomes a little more tricky because one way to do it is with pre-recorded voice-overs. But those are dedicated individual sound files that will bloat your app size in a staggering hurry.  There are some text to voice plugins in our Marketplace, but I’ve never used them so I don’t know how much control over voice types and how accurate they are.

As for the number of questions, writing trivia questions can be a full-time job. And you need a lot. I inherited around 200,000 questions, but many are dated, still good for trivia, but “Who won the last winter Olympics Men’s Hockey Gold Medal game”, not so much, so I spend a lot of time rewriting those questions to be more timely (who won the 1980 Olympics Men’s Hockey Gold Medal game".  I also scoured the internet looking for free question resources, but it’s a lot of work to massage them into a usable format.  6 years later are still sitting in my todo list.

I don’t want to discourage you, in fact hopefully inspire you.

As for the code, the is a great place to ask specific questions (including code), but unless there is a quiz template in the Marketplace (https://marketplace.coronalabs.com) unless you’re paying or willing to collaborate, few developers will want to write a bulk of your game for you.

Rob 

@sammylpt,

Welcome.  I think that making such a game would be very straight-forward with Corona.

You still need to learn the basics of using Corona first of course, but such a game could be made in Corona in very little code and quite quickly assuming you are trained up on the SDK.

Some challenges/questions I see are:

  • How would you get the data/questions into your app?  I would suggest hosting them on an AWS S3 bucket.  If you are very new to this kind of thing, you might want to get help setting that up by paying someone a one time fee, or by getting a friend to help.
  • Would the app be paid? - Going free sounds sexy, but I think you’d want to support it with Ads and/or IAP.  Ads would be the simplest since then you wouldn’t have to manage IAP settings and track what ‘question packs’ folks have purchased.  IAP would probably provide a more direct ratio of earnings to cost.
  • Cost? - If your app is popular, you’ll quickly use over the free monthly bandwidth of the bucket and have to pay for it.  So, be sure to consider this before starting.

PS - Looks like Rob and I were typing at the same time.

I want to say, my post may seem like it is disagreeing with Rob.  It is not.  He is entirely right about the difficulty of handling a large question pool.  In the beginning with a hundred questions, this app would be pretty easy to manage, but eventually it will be a big mess if you don’t start with and adhere to a strict organization method.  The bad news is you won’t know what that should be till you’ve done it for a while.  So, you’ll probably have to go back and re-work and re-factor.

Cheers!

@romminggamer, I don’t think we are disagreeing at all, we are talking about different aspects. You provided @sammylpt with some very good things to think about.  With my game, I have my questions in a MySQL database hosted at my webhost and wrote some PHP scripts to make a simple API to fetch questions, report bad questions, send scores and stats back to the server etc.  I also setup a web-based interface for editing questions with the idea of making it easier to get people’s help editing them (for a small fee of course, if I ever made money with the game) or to make my life easier editing reported bad questions. I still find I have to go into phpMySQL to do a lot of my fixes though…

I also have a JSON based version of the starter questions in my resource directory so the game can be played offline.  My problem is when I fix questions in MySQL I’ve been very bad about patching the JSON files to keep them consistent.

The other problem I have is with a database that size, I’ve not been able to run through every question and there are still formatting errors that will crash my app :frowning:

Rob

Hi Rob and RoamingGamer

Thank you to you both for your in-depth replies.  I’m going to give it a shot I think and still, keep trying with the concept I have in my head.  The questions for the trivia isn’t so much a challenge for me because ultimately I want to design the game for myself.  I seriously doubt I would ever publish it for others to use unless of course, it had a massive success for me.  It’s really for self-learning.  Therefore I don’t need to initially think of monetisation. 

It’s not that I want to use someone else’s code, far from it.  I had hoped that I will eventually learn the code needed.  It’s more like when I go to YouTube and search “Corona Labs Tutorials” and I get 2,900 results and yet it looks like results for mainstream games that people would actually play.  Mind you, perhaps I’m being naive in thinking many people don’t like quiz games.  My concept is for languages.  There are many language apps out there, but I think they are all miss something, or at least they miss it for me. 

What I didn’t want to be doing was to learn how to code for a game like “flappy bird” or “Angry Birds” or something else unrelated and then spend all that time and still not be closer to figuring out a basic game concept with very little physics involved.  Regrettably, I can’t really reply specifically to what both of you wrote because even things like MySQL, API, JSON, PHP I need to spend a long time figuring out what they actually mean. 

I am happy though you both see a potential using Corona, so my dreams are not completely shattered.  I guess I need to trawl through the entire 2,900 videos on YouTube and see if my idea is there and then if I can build off that.  I even downloaded Keynote as I saw a lot of Quiz style videos on that, but I downloaded Corona because I got in touch with the developer whose app I saw and played but was far too short to properly enjoy and they said they used Corona.  So here I am.

But seriously, thank you both for your assistance, while I still feel in complete darkness, I guess at least I have a little direction, or at least I hope.  The journey begins…  

You don’t really need a tutorial specifically for this type of game, although there probably is one out there. Just build it up one small step at a time, using the API docs under documentation and google to look for snippets on these forums.

The first step (and an easy, tangible win) is getting things up on screen in the place you want them, then making them react to user input.

Then there are basic programming concepts that you’ll need whether you’re making a quiz game in Lua or a 3D engine in C, such as variables, control structures (i.e. if/then), loops, data structures etc. And in the case of lua programming, scope is an important concept.

Another important concept to nail down early on (and I certainly didn’t when I first started) is DRY - Don’t Repeat Yourself. If you’re drawing four buttons, there should be one block of code that draws a button, and this should take inputs in terms of the required size, position and text for the button. Then you just loop through this code for however many buttons you need. You’ll see lots of codes on here where people will have eight identical enemies in their game, and will just copy and paste the code eight times.

Your basic goal is to:

Display a random question from some form of database. This could be a lua table, SQLLite database etc.

Draw four buttons and populate them randomly with the four possible answers for that question.

Make the buttons interactable and so that they know whether they relate to the correct answer or not.

If the right button is pushed, give the player a point and some sort of visual/audio feedback.

If the incorrect, give visual/audio feedback.

Clear the old question and repeat.

Work out each small, logical step in plain English and then investigate how to achieve that small, isolated goal in Corona. Initially, forget the database side. Just get some buttons working with a set question and answers. When the time comes, you replace those placeholders with real data.

It won’t help this time, but in the future, be aware I have answered a ton of questions here and made many examples for other things (ex: now stopped Corona Geek hangouts, among others).  

You can find my source code for all of these things here:

PS - Follow my YouTube channel for regular videos associated with answers to questions here too: https://www.youtube.com/user/roaminggamer

I actually published a Corona-based trivia game with Corona back in 2012 or so.  Quiztix is currently building various quiz games with pretty good success.

Quiztix had some amazing games on iOS.

Sadly they are no longer on the store. Knowing how arbitrary the iOS review process can be, I wouldn’t be surprised if Apple removed them. Quiztix are still on Amazon and Google Play. It’s a shame if their iOS presence has gone for good. Their quizzes were the most polished of all the quizzes I have seen on iOS.