Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

131
Views
How to implement a distributed countdown timer with Firebase

So basically I'm running an online game site whereby each "match" would be a certain duration, after said duration the "match" would change in name and details. How do I implement a live countdown which synchronizes with all users, which continues running on the server side even when a user closes the window?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You don't need a distributed counter for this. The timestamp you need is state, and state should be managed by the game server.

In Firebase (or Firestore) you can implement this functionality with a snapshot listener. Each client would then subscribe to this listener. See this question for an example: How to implement a distributed countdown timer in Firebase.

Also, you might find useful this thread on Reddit. https://www.reddit.com/r/Firebase/comments/mnitde/making_a_timer_for_a_tabletop_game_in_firebase/

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!