How do I gamify a survey?

0 favourites
  • 7 posts
  • Hi everyone!

    I am trying to make a survey that looks like a game. A character jumps and selects an answer on each question.

    What I need in return is the data that the players chose for each question. (by question, for example, 35 people chose "A", 33 "B", etc.)

    My report sould look like: Question1, Answer 1, clicked X times, Answer 2, clicked X times, etc.

    Ideally should look in %, but that´s not important.

    I have seen tutorials that deal with ajax, arrays and so on. Sadly, I don´t have the knowledge or resources to dig too much on this.

    So far, I have a sprite for each question and local storage, on each collision with each sprite, adds 1 to a Global number, and records on a localstorage.

    Everything "works" (I know not in the best way, but it works) but the problem I find is when adding questions/layouts, I don´t think that doing 20 questions this way would be reasonable... ¿?

    So far I can see the answers on each question by hiding/showing them. Not ideal, but works

    For consideration:

    The amount of questions will never be more than 20 or 30.

    Wouldn´t mind typing them on construct, since this is for kids in a local hospital, one or two time use only.

    Doesn´t need to go online, storing this information locally will be enough

    Should be able to work with the free edition of construct2

    Any suggestions will be really really highly appreciated! :)

    My capx: drive.google.com/file/d/1xiHqZCV-CuMpRzyvrJc5P0HRt1b9xyJq/view

  • hello!

    Yes I can see why you made this post, that approach would become a little tedious with many questions. This is probably best done with an array. For example, you would have the question at x,0. The answers would be x,1 to x,5.

    So you would have a variable for tracking, it's set to 1. You display the question in the layout that is variable,0 so 1,0 in this case. And the answers always apply to x,1 x,2 x,3 etc so in this case its 1,1 1,2 1,3. When you click on the third answer it always add 1 to x,3 so in this case 1,3 in the array. So your line of the array looks something like this : question | answer 1 total | answer 2 total | answer 3 total etc

    Now when you want to come to the next question all you need to do is change that variable from 1 to 2. This then picks everything that is in the array at 2,0 2,1 2,2 2,3 etc so the question text and the answers all get added to the second line for that question.

    You can then save the array as a json format string, so you are saving only one thing into local storage. You load this string next time you load the game. That should solve everything, that would be my approach to this.

  • plinkie, thanks so much for your answer... sounds really understandable when I read you. However, I have no idea how to implement this. But you gave me a great set of thing to look for in tutorials now :)

    Thank you very much!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • jdejean

    you have a great start going there... so I thought I would add an array to your survey so you can see how it is done... it definitely gets a little confusing!

    my sample has 10 questions, but you can easily add as many as you want. I added a green "selection" indicator so kids will know what they chose, and they can change their answer without negatively affecting the stats (even if they go back to a previous question - as long as it is still the same session).

    I made the "Show values" button a toggle, so you can turn the percentages on or off. The totals are stored in the array, so it would be easy to make a summary screen at the end if needed... or available from a main menu.

    since it is stored in local storage, obviously everyone will have to use the same computer. If you needed multiple computers, then you would have to use AJAX and have a server to save the results on.

    good luck! and make those kids happy :)

    my version: https://www.rieperts.com/games/forum/survey_array.capx

  • AllanR, I can´t thank you enough! I havn´t seen your file yet, but I am sure it will help. Thank you!

    Your last sentence, "Make those kids happy" is the greatest motivator, and I would like to share a little bit, if the rules allow it, about this story.

    I started working with a low resources hospital in Buenos Aires, Argentina in 2011. Although it´s a great hospital, all their resources are destinated to medical and/or infrastructure stuff.

    During a chat with them, we had the chance to talk about how long the waitings are, sometimes people can stay for many hours just waiting their turn. It´s a free hospital, so they can be pretty jammed sometimes.

    I realized that they had the opportunity to educate and/or teach kids and adults during this time and everything started to shape. One of the main "problems" the hospital had was the lack of people donating blood. So we made a trivia game about how easy it was. It was a great sucess, people didn´t know a lot about donating blood (neither did I)

    All these trivias were made in flash, using AS2. Had questions like "How many people can save you throgh a single donation?" If the user got it wrong, we would explain and emphatize the importance of donations.

    We thought the questions in order to encourage people to donate blood, and it was a great sucess. I´ve been doing this every now and then for almost 8 years now. Trust me, it´s a GREAT experience. People have fun wile learning! When they get a question wrong, trust me... They want to know more.

    We made games doing our best to educate people on blood donation, chagas disease, hygene, etc. My work is done for free, that is why sometimes time to learn or calling someone is really hard.

    I am telling this story because I need to thank you and all the people who feel they can help a bit, maybe it´s because they just want to share, maybe it´s for boosting the ego, I don´t know, but what I do know, is that sometimes, this help travels a long way and helps more than you´ll ever know.

    I´s my first time using construct, I am not a programmer, and I´ts my first time in this forum. But, as I did in many other forums, I feel the need of thanking every comment... Because they end in a good cause, and everyone that gives their little thing deserves to know how the story goes :)

    My plan in this occasion is to try to collect information from the kids without forcing them to give answers the same way they do in surveys or chats.

    To make long short... Thank you! Hopefully this will end doing some good! And guys, I encourage you to do this, I am no angel, definitely not an activist, but if you can... do It, trust me, it´s a great experience :)

  • AllanR

    I would like to thank you once again! I have seen your file and works perfect for what I needed. I promise it will be used for good :)

    However, I havn´t been able to entirely understand it, your comments are very well documented, but I am not being able to reproduce a similar project by myself... (Your file works perfect and I can change whatever needed... It´s just that I would love to know how to make it myself)

    I will keep on learning whenever I get the time, this file pointed me in the right direction, now I know what to look for :)

    Just one question before I start digging the wrong way... Is it possible to copy/paste and strech the layer canvas so 10 questions could fit in a platformer kind of game? or maybe I should go with different layouts?

    Thank you!

  • jdejean

    I know the array can be pretty tricky to follow at first...

    There is no reason why you can't stretch the layout to hold as many questions as you want, or to add additional layouts.

    I updated my sample to show you how I would approach it. First I combined all the answer sprites into a single object to simplify the code. Each object has animations a through e, and instance variables that tell the game what question it is for, and what the answer should be if the player collides with it.

    (so, when you add answer objects to the layout, you set the animation, question number, and answer for each object. You also add a QuestionText object for each question and set its question number field as well.)

    Then, instead of having one global variable called CurrentQuestion, all the answer objects know what they belong to. Each instance of the QuestionText object also has a question number. As soon as the question array has been loaded from local storage (or reset), the game updates them with the text from the array.

    so, the player can run around the layout, read the questions and change their answers as often as they like...

    I made the Show/Hide values pop up a text box with all the questions and stats - otherwise you would need instances of the val1a(b,c...) text fields above each answer object... the text box isn't formatted very nicely, but lets you see all the stats from the array. The download button still works the same way as before.

    https://www.rieperts.com/games/forum/survey_platform.capx

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