Adding points to a real-time leaderboard in a gaming app, please help!

Hello everyone, i’m making a quiz gaming app whereby the players earn 2 Coins on each correct answer and the points add up on both their profile and the real time leaderboard where they can see the scores of their competitors every time they play.

If there’s someone who has knowledge on how i can go about this, please give me a step by step guide. I’m stranded and the game I’m trying to make is useless without this :disappointed_relieved:.

Additional info: My Quiz app UI is ready, i’ve linked the pages, i’ve finished setting up Firebase Auth for user registration, i have created a Google sheets layout where the name , points and realtime ranking of the users will be stored and i know how i will connect both firebase and google sheets.

These are screenshots of the app pages;

This is not only for me, it’s for my country, i’m trying to fight Unemployment in Kenya by putting ads on the app and the scores the players get, that will help me establish how many ads they’ve watched and i’ll pay them at the end of the month. For the leaderboard, i want to finance startup businesses of the top 10 players, that’s why it’s important. This is the only way i know how to bring change to my people. Please help me bring my dream to life🥺.

Thank you for your help in advance :purple_heart:.

Когда пользователь входит в программу, то вам нужно проверить, если в гугл таблице запись с идентификатором такого пользователя, если такой записи нет, то создать.

  1. Отфильтровать таблицу и проверить количество оставшихся строк. 1- такой пользователь есть 0- такого пользователя нет.

When a user enters the program, then you need to check if there is an entry with the identifier of such a user in the Google table, if there is no such entry, then create it.

  1. Filter the table and check the number of remaining rows. 1 - there is such a user 0 - there is no such user.

Действие (когда пользователь вошел)
Action (when the user is logged in)

получить идентификатор авторизованного пользователя
get the id of the authorized user

Фильтрация таблицы гугл
Google spreadsheet filtering

1 Like

Точно так же, как при создании пользователя в первом видео, просто добавьте поле между началом и концом запроса.
Just like creating a user in the first video, just add a field between query begin and query end.

Hello there Vladimir, I received your video and i’ve been working on it since. Thank you by the way. I have one concern though, the score increases only by 1 value and i can’t customize it to increase by 2 or more. And then, the score only increases once and that’s it, when i repeat the process the score doesn’t increase anymore and i want the score to increase every time a player clicks on the right answer even upto 100,000+

Will that be arithmetic? and how can i go about it?

Thank you.

Yes, that’s right, use arithmetic

Hello, i changed the action to Arithmetic and set the Argument value to +2. When i clicked the button, the usercore on google sheets added by 2 which is good but when i repeated clicking on the button nothing changed. I repeated severally and nothing changed so i decided to increase repeats (on actions) to 10,000 and when i clicked the button again, i kept on receiving a 400 Error. Vladimir, i don’t know why the userscore value only increases once then afterwards stops.
What can i do?

Это происходит по тому, что все кнопки после выбора ответа отключаются, что бы пользователь случайно не нажал другой ответ.
Вам нужно в действии таблицы (смена идентификатора), снова включить возможность выбора

This is due to the fact that all buttons are disabled after selecting an answer, so that the user does not accidentally click another answer.
You need in table action (id change), re-enable selectability

No, not disabling input on the other answers, i’m okay with that. What i mean is, in the 1 page app you created, when someone chooses the correct answer the score increases, right? But in my case i have many pages and this is the flow;

Homepage (with quiz categories) >>> go to 1st question >>> go to 2nd question (if quiz 1 is correctly answered) >>> go to third question (if quiz 2 is answered correctly) >>> get directed to congratulations page (if quiz 3 is answered correctly) >>> then back to Homepage

In my case, after completing quiz 3 , 2 coins are added to the total score which is on the Homepage.

I followed your instructions and when i answered the three quizzes correctly, 2 coins added in my google sheets as they should, but when i went back to the Homepage and started the process again, the points did not increase in my google sheets, they remained the same. I have repeated many times and there’s no change. That is my problem.
How can i make the score increase even upto 100,000+ everytime the 3 quizzes are answered correctly?

Пожалуй без проекта я не смогу ответить на этот вопрос
without a project, I won’t be able to answer this question.

How can i share it with you?

Through private messages

Back to Flipabit >
Copyright © 2018. Flipabit Team. All rights reserved.