Sign In Register

How can we help you today?

Start a new topic
Answered

Can I start the Challenge manually?

Hi.


In my game player should be able to create a Challenge and make 1st turn immediately after that, even if another player hasn't accepted invite yet.

So I'd like my challenge to start immediately after it's created.

Is it possible?


Thanks.

Best regards,

Anatolii


Best Answer
Hi Anatolii

Asynchronous Challenges are what we recommend for turn based games.A player can be playing more than one challenge.
If you are using Unity SetDurable can be used to deal with players disconnecting. Sending a request with .SetDurable(true) will store your request in a queue until the connection has been restored. 

You can set up an event to check if the players turn is successful and if it is you can use consumeTurn to take the turn of the other player.

Thanks

Katie


Hi Anatolii
Gamesparks provides Asynchronous Challenges so players can check in and play their turn when it’s convenient.
The tutorial for setting up a Asynchronous Challenge can be found here
Thanks
Katie

 

Hi Katie.


Thanks for your response.
I'm not sure that this approach is the best fit for my game.
My game is turnbased. 2 players play vs each other. They take turns one by one. While 1st player is taking turn the 2nd one is waiting. While waiting he can take turns in other challenges, or he can disconnect and connect again later. Even if both players disconnect they should be able to continue later.

The only reason why player who creates a challenge should be able to take turn immediately is not to wait for another player to accept the challenge. In all the other attributes it's similar to default turnbased challenge of GameSparks.

And what's the default Gamesparks solution for turnbased games? The player who joins the game should make the 1st move?

And one more thing...
I said that players take turns one by one. But I forgot to mention that in some cases if player's turn is successful he can take second turn right after that.

Is it possible to implement such behavior using default turnbased challenge? Or should I turn off the Turnbased switch and implement logic of taking turns on my own?


Thanks.

Best regards,

Anatolii

Answer
Hi Anatolii

Asynchronous Challenges are what we recommend for turn based games.A player can be playing more than one challenge.
If you are using Unity SetDurable can be used to deal with players disconnecting. Sending a request with .SetDurable(true) will store your request in a queue until the connection has been restored. 

You can set up an event to check if the players turn is successful and if it is you can use consumeTurn to take the turn of the other player.

Thanks

Katie

Login to post a comment