Sign In Register

How can we help you today?

Start a new topic

Simultaneous turns

Hello,

I'm learning how to work with your product and try to make a small game. I found some tutorials online on turn based games, but in my case I would like to have a challenge where:


1. All players do their action (all players in a challenge play simultaneously) and then end turn, which sends data to server.

2. Server gets data from all players, process it and returns response.


And my question is:

If in step 1, player goes AFK or looses connection, All other players wait for him forever. So i red about SparkScheduler, it can schedule an event, but it cant schedule a periodic event, which would send EndTurn message lets say every minute. So every player will have 1 minute to make his move. Then server process input from all players and sends players the outcome. They again have another minute to make their moves in the next turn... And this repeats untill win condition is met.

Also if all players end their turn earlier, the scheduled event will be cancelled and new event will be scheduled again after 1 minute.


So basically I would like to know, how to schedule periodic events or if there is some "hack" to go around it if this is not possible?


Thank you

Login to post a comment