animation: cards moving mutliple times

Game development with Board Game Arena Studio
Post Reply
User avatar
__wiz__
Posts: 14
Joined: 22 September 2020, 18:15

animation: cards moving mutliple times

Post by __wiz__ »

Hi!

During a player's action, a card may move multiple times (first to a played area, causing other cards to move, then to a discard).
The backend goes through this step by step, sending move notifications to the frontend for each card moved.
The js frontend then calls appropriate addToStockWithId or removeFromStockById for each card move notification.

What I noticed is that when card is moved multiple times, for example from hand to table to discard, only the effective move is animated, that is, I see the card moving from hand to discard. I'd like to see all the steps, to make it clearer for non-active players what happens.

Am I doing something wrong?
How did you solve this in your implementations?

Thanks!
Thomas
User avatar
vurtan
Posts: 57
Joined: 13 June 2020, 19:54

Re: animation: cards moving mutliple times

Post by vurtan »

Hi Thomas,

I'm relatively new on the developer side of BGA, but I came across the Synchronous notifications in the documentation.
This looks like it could solve your issue. Here is the link and just search for "Synchronous notifications"
https://boardgamearena.com/doc/Game_int ... amename.js

Maybe an alternative way would be the simplePause also mentioned on the same page.

Helmut
User avatar
Victoria_La
Posts: 665
Joined: 28 December 2015, 20:55

Re: animation: cards moving mutliple times

Post by Victoria_La »

Yes you have to make notification syncronious and make it waif for duration of animation until next one is processed
Post Reply

Return to “Developers”