Looking for a more efficient way to implement quiz results

0 favourites
  • 3 posts
From the Asset Store
Logo quiz
$9.99 USD
Template for a logo quiz game, fully documented in comments and video
  • Hi,

    About a year ago I made a simple 'what character are you' style quiz with

    16 possible results. Every now and again I got some feedback and found people always got the same result. I've tested it multiple times and have found you can potentially get other results, but it's almost impossible due to the clunky method I was using.

    The quiz consisted of eight questions, each with two possible answers. Every time a question is answered, the answer is stored in sequence as a global string, for example if the person answered 'A' for the first six questions and 'B' for the last two the string would look like 'AAAAAABB'.

    There's also a global number that increases by one every time a question is answered, moving to the results layout when the eighth question is answered.

    The results were determined by the global string sequence. The problem is only one or two string sequences give one of the 15 results, with the 16th result being the one the player gets if the string doesn't match any of the sequences for the others.

    What could I change so that players stand a better chance of getting more varied results, other than manually adding loads of separate answer sequences? I can upload the C3 file if it makes things easier.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I think the problem you have is logical. For 16 unique answers, you can only have 4 different questions if each of them have only 2 answers, that would be 2 * 2 * 2 * 2 = 16.

    With 4 questions you guarantee to get a unique answer each time.

    Right now with 8 questions you have 256 possible results. That's 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 = 256. So if you have a catch all case, it makes sense that most people are getting the same result, only 16 combinations out of 256 have something! The probability is 16 / 256 = 0.0625 which is 6.25%. I think i got the math right... in any case, it's a pretty low chance.

    If you want more questions there are a couple of things I can think about that you can do.

    1) More unique answers. So for 5 questions with two possible answers, you would need 32 unique answers. 2 * 2 * 2 * 2 * 2 = 32. That might be a lot of work, but the results are guaranteed to be unique.

    2) You can have questions that decide the main result and questions that only wedge the main result a little bit. This will allow you to keep the answers you have and potentially have an infinite number of questions. This approach requires additional logic to decide exactly what it means to "wedge" the final result, and once that is decided, how big each wedge should be? The good thing is that you don't need to produce more unique results.

  • Hi DiegoM,

    Thanks for the advice. I'll go with the first option as I doubt I'd be able to get the second option working (maths and logic were never my strong points, though I have an analytical streak).

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)