Let me first describe you what I'm trying to do with one example:
- Players join a game (it's a web turn-based app/game with firebase/angular)
- When they are ready they have 30 seconds to choose a character
- Then player 1 has 30 sec to end his turn
- Then player 2 has 30 sec to end his turn
- ...
It's a little turn-based game and I'm having difficulties to end a turn. I thought about using cron or setInterval on a cloud function but setInterval isn't recommended (costly) and cron isn't exactly what I'm looking for (I don't want to trigger something everyday...). I saw this informations on two similars topics:
setInterval on firebase instead of using cron && Cloud Functions for Firebase trigger on time?
What should be the right way to do that (end a turn based on a time to increment the "state" of the game) ?