Game with levels

Hello,

So I’m working on a game where users watch videos and answer a few questions, which unlocks more videos. We have a gameboard page with the levels and i’m thinking about the best way to program it so users unlock levels as they goes.

My idea is when a user completes one level, a point is added to their score. As the score increases, more levels are unlocked. Each level has a set number of points necessary to access.

Any ideas or advice for making this a reality?

Thank you in advance.

Chris

Hi Chris,

ok so the first question is what will you need lots of?
My answer would probably be a) levels b) questions c) answer choices d) user answers e) videos

You would then create these as data types. Here some suggestions of the fields each datatype could have
Levels could have a level number (type number), a list of questions for that level, an amount of points required for that level (e.g. 100 200 300 so a number)
Questions would have a text, a number, a level they belong to (number) a list of answer choices (answer a is a cat answer b is a dolphin), an actual right answer e.g. a b c or d (text) and perhaps a list of user answers (e.g. John said a for qs 1; Bill said b) . Questions could also have points (a number). Eg question 1 gives 10 points, question 2 gives 20 points.
Answer choices have a text (a b c or d) a long text (a cat can be 20 years old, a cat can be 100 years old, a cat can be 1000 years old) and a question they belong to.
User Answers would have the question they belong to and their text
Videos have a text (their URL)

For the logic:
Different questions/videos could be shown depending on how many points the user has
e.g. if current users level = 2 , data source of repeating group: do a search for questions where level =2.

If a user clicks an answer choice in this repeating group showing all questions, and the user answer matches the question’s answer choice text, the users points = users current points + current questions points.
Also a check needs to be made if users points are updated: should the users level increase as 100 points = threshold to level up from level 1 to 2.

Hope this makes sense,
pm me and I can send you some more steps or we can hop on a call if you like.

happy bubbling,
Julius

5 Likes

Thanks Julius! This helps.

One thing i forgot to mention is that the questions are all open-ended, so i set it up so the responses are emailed to us and the user once when a level is completed.

I’m new to Bubble.is so it’s great to get this advice from someone with experience. I’ll message you with the URL to my app.
Best,
Chris

1 Like