Context: I made an app for company, where 5 teams in parallel should resolve 10 funny puzzles. They have time for each task and if they don’t complete task it skips to the next. After team have complete all tasks result of each team is recorded in the results table and they can see a leaderboard.
Now all in that game doing well, except for the timer.
My timer is created with help of custom state of a page. Every 0 seconds custom state of = date/time of current date/time and all values (like start game, finish game is depends from that)
Problem: It overloads the app and sometimes timer start to slow down. For example, it can freeze and then proceed as if nothing had happened, what is confusing teams.
Queation: Guys, can you advice me a normal way to make a timer, that can start after game started, skip level after time on level is finished and add the result of a team in table after team have complete the game without grabbing current date/time from each user?
Problem: It overloads the app and sometimes timer start to slow down. For example, it can freeze and then proceed as if nothing had happened, what is confusing teams.
Do every 0 seconds!!!??
you mean continuously, non-stop, without any interval between executions!!.. … and you’re trying to update the database?.. every 0 seconds?!..
no wonder it’s not working!!..
Queation: Guys, can you advice me a normal way to make a timer, that can start after game started, skip level after time on level is finished and add the result of a team in table after team have complete the game without grabbing current date/time from each user?
When you say ‘make a timer’ can you clarify exactly what you mean?..
Do you mean you want to display a visual timer on the screen for you users?
Or just that you want to record some time intervals in your database?
Adam, every 0 seconds updates only custom state witch = current date/time of a user. Also every 0 seconds game start time is comparing with that custom state and that helps me to define time that remains for a level
To a database i send only game start time, start level time, finish game time of each team.
I need to display countdown of each level. After team resolve a task or task time is over — team sees the next level and countdown shows how much time remains before level will ends.
I use it and it works well (you can of course do the same thing yourself using standard Bubble functionality, but it might be easier just to use the plugin)…
in my newbe “method” timer don’t update every seconds if I set 1 second. It skips seconds. Time counts right, but it cout like — 13:05, 13:02, 13:01, 12,58 and so on. Only when i set 0 seconds it works as expected (but overloads app)
that is why I asks experienced bubblers how to make more optimised timer )