How to make a quiz game

Get help using Construct 2

Post » Sat Feb 01, 2014 8:27 am

I'm thinking of making a turn-based endless side scrolling game which you attack by answering multiple choice questions from a question database. So there are endless levels, each level 10 waves of monsters, a boss at the end, and you get to upgrade your items and recover hp and save.

How do I start? There isn't any tutorial involving quiz around. Please teach me, thank you.
B
5
Posts: 11
Reputation: 270

Post » Sat Feb 01, 2014 8:39 am

The basics are pretty simple

create question
create answers

on right answer clicked -Yay! :)
on wrong answer clicked -Booo! :(

So the question is, what do you not know how to do?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Feb 01, 2014 9:00 am

I have questions from 10 different categories. I want to be able to check/uncheck in the options whether to show questions from a certain category. I want to put all the questions into 10 different .txt files, naming them each into the names of their respective subjects, and dumping the 10 files into a folder and just make the folder the questions database. In the .txt files, I want to set the questions in the format
[qn]blah blah blah
[1]correct answer
[2]wrong answer
[3]wrong answer
[4]wrong answer
[5]wrong answer

the catch is, in the file, the correct answer will always be the 1st option, but when playing the game the answer options must be shuffled. And when the wrong option is chosen, the correct 1 is highlighted.

Is this all possible? If so, please emphasize on the details as I'm new to this program, only using it to make a game to facilitate my studies
B
5
Posts: 11
Reputation: 270

Post » Sat Feb 01, 2014 9:24 am

Maybe this topic (I found with the fabulous search-option on the top of this page) will help:

Making a quiz game
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Feb 01, 2014 10:47 am

I've seen that page already, and I did not understand Yann's example at all. The field I'm studying in has no relations to IT at all, so yeah pls be patient with me, I'm sorry.
I understood procrastinator's example though. But he only seemed to use 1 txt file, how do i enable multiple txt file and options to enable/disable them in the game? How do I link answering correctly with the player attacking?
B
5
Posts: 11
Reputation: 270

Post » Sat Feb 01, 2014 11:10 am

It's all about creating conditions and having actions performed when those conditions are met.

want to use another textfile?
on conditions met - use another text file

want the player to attack?
on conditions met (answer answered correctly) - set the actions for attack.

The textfile could be set with a variable changing I guess
if variable is 1 load textfile 1, etcetera.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Feb 01, 2014 11:47 am

uh, as I want to create an options panel where I can check/uncheck certain textfiles to use. Then in the game it will randomly generate questions from those selected textfiles. How do I edit from procrastinator's example to get this result? Thanks man, u've been a great help already
B
5
Posts: 11
Reputation: 270

Post » Sat Feb 01, 2014 1:25 pm

the questions part is easy, make a textfile, format it like this (you can use a different separator than ; ofc)

Question 1?;right answer;wrong answer 1;wrong answer 2; wrong answer 3
Question 2?;right answer;wrong answer 1;wrong answer 2; wrong answer 3


and so on.
Then you import that file as project file, load it in via the AJAX object.
Then parse it into an array.
After that you can easily work with the questions and answers in the array and load them into your game.

example: https://copy.com/6dTNVXTviBkUcjsj
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Sat Feb 01, 2014 1:35 pm

i need multiple textfiles for different subjects and i want to be able to check/uncheck whether the questions from a certain subject shows up in the game. Is it possible? E.g. if I have 10 subjects and I don't feel like revising chemistry today, I can uncheck the 'chemistry' in the game optionsso questions from 'chemistry' textfile wouldnt show up.
B
5
Posts: 11
Reputation: 270

Post » Sat Feb 01, 2014 2:53 pm

Sure, you have different options for separation.

For example tag each question. (a new field for each line)
You could use a different z-index for different text files/subjects. (I think I would prefer that one)
You could use more than one array, one for each subject.
You could use one text file and use another separator to divide subjects and you'll save the info somewhere which x-index-range contains which subject.

Ofc depending on the way you separate the questions in your array(s), you must modify the algorithm that shows the questions.

You can also add a tag to questions for their difficulty level.
So a text file could look like this;
Question 1?;right answer;wrong answer 1;wrong answer 2; wrong answer 3;1
Question 2?;right answer;wrong answer 1;wrong answer 2; wrong answer 3;2
Question 3?;right answer;wrong answer 1;wrong answer 2; wrong answer 3;2
Question 4?;right answer;wrong answer 1;wrong answer 2; wrong answer 3;3

1 would be easiest, 2 easy, 3 normal, and so on...

And then let the game increase the difficulty over time.
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests