notifyPlayer and setSynchronous

Game development with Board Game Arena Studio
Post Reply
User avatar
A-dam
Posts: 107
Joined: 28 September 2013, 18:15

notifyPlayer and setSynchronous

Post by A-dam »

If I use notify specific player and set delay to this notification with setSynchronous, the mainbar should be showing Updating game situation ... with waiting icon, but it is not. This is particulary unpleasant if I have more than one notif with delay in sequence - in case of first notif all players all is correct and Updating game is showing, then with the next notif specified to player this text is gone showing game state text, but the delay is correct.

Is this expected behaviour? Or can it be set somehow? It is not nice to see Updateing - state action (which is no more actuall) - Updating - next state sequence after do some action.

I can override it setting mainbar description manually, but I think this behaviour should not be correct.
User avatar
DrKarotte
Posts: 279
Joined: 22 September 2015, 23:42

Re: notifyPlayer and setSynchronous

Post by DrKarotte »

Why should a private notif have a delay? The concept seems to be intended for notifications sent to all.
User avatar
A-dam
Posts: 107
Joined: 28 September 2013, 18:15

Re: notifyPlayer and setSynchronous

Post by A-dam »

And why not? Imagine you draw a card no one else should see and you have animation for given draw. You want some delay that the animation is nicely registred and also, if you need for example highligth that card after animation using css selector, you need that animation finished..
User avatar
RicardoRix
Posts: 2110
Joined: 29 April 2012, 23:43

Re: notifyPlayer and setSynchronous

Post by RicardoRix »

not that it solves your exact problem, but for a delay you can hook into the onEnd() event of the animation, or use a setTimeout function.
User avatar
A-dam
Posts: 107
Joined: 28 September 2013, 18:15

Re: notifyPlayer and setSynchronous

Post by A-dam »

RicardoRix wrote: 01 September 2019, 10:55 not that it solves your exact problem, but for a delay you can hook into the onEnd() event of the animation, or use a setTimeout function.
Sorry, but your post is ridiculous, if I wanted to know how to set delay, I would make topic about how to set delay. Im asking why the framework behaves differently for notifyPlayer and for notifyAllPlayers thats all.
User avatar
sourisdudesert
Administrateur
Posts: 4630
Joined: 23 January 2010, 22:02

Re: notifyPlayer and setSynchronous

Post by sourisdudesert »

Hello,
DrKarotte wrote: 31 August 2019, 22:36 Why should a private notif have a delay? The concept seems to be intended for notifications sent to all.
Just a word to say that this is perfectly legitimate to have a private notification with a delay. The typical case is when you want to show a privately a card to a player during few seconds: the interface must be "paused" during few seconds for this player but not for the others.


About the issue: I managed to reproduce the bug. It looks like if the latest notification sent is a synchrounous notification, the status bar is not showing "Updating game situation ...". An immediate workaround may be to send another notification (not synchronous) after the first one. A fix will be deployed (probably next week) to fix this anyway.
User avatar
A-dam
Posts: 107
Joined: 28 September 2013, 18:15

Re: notifyPlayer and setSynchronous

Post by A-dam »

Thank you souris! No rush..
Post Reply

Return to “Developers”