Cards spread on refresh

Game development with Board Game Arena Studio
Post Reply
User avatar
DargorX
Posts: 33
Joined: 10 September 2012, 20:16

Cards spread on refresh

Post by DargorX »

Hi guys,

I am developing a card game using Stock objects.
On refreshing the game all cards spread over his respective stocks like an accordion. How can I avoid this behavior? This is very annoying!!
I want the cards fixed on his "final" position.

Thanks.
User avatar
robinzig
Posts: 461
Joined: 11 February 2021, 18:23

Re: Cards spread on refresh

Post by robinzig »

If the layout is going wrong on refresh, it suggests something is wrong with your Javascript "setup" method.

Without seeing the relevant code that you have for setting up this Stock, and ideally a screenshot of the problem as well, it's hard to say any more...
User avatar
DargorX
Posts: 33
Joined: 10 September 2012, 20:16

Re: Cards spread on refresh

Post by DargorX »

DargorX wrote: 07 October 2021, 16:09 Hi guys,

I am developing a card game using Stock objects.
On refreshing the game all cards spread over his respective stocks like an accordion. How can I avoid this behavior? This is very annoying!!
I want the cards fixed on his "final" position.

Thanks.
It's a game on alpha, you can see what I'm talking about by loading (or refreshing) this table: https://boardgamearena.com/2/castlesofc ... =206250775
User avatar
ShaPhi7
Posts: 37
Joined: 22 April 2020, 20:44

Re: Cards spread on refresh

Post by ShaPhi7 »

Not sure how to fix, but if I've understood correctly, your cards appear spread out initially after a refresh, after a few seconds, they all pile together to their "final" position?

If so, then I have seen the same thing happen on multiple games including Incan Gold and Grand Bazaar. It may a more general bug, rather than something specific to your game. I use an android device.
User avatar
DargorX
Posts: 33
Joined: 10 September 2012, 20:16

Re: Cards spread on refresh

Post by DargorX »

ShaPhi7 wrote: 07 October 2021, 23:31 Not sure how to fix, but if I've understood correctly, your cards appear spread out initially after a refresh, after a few seconds, they all pile together to their "final" position?

If so, then I have seen the same thing happen on multiple games including Incan Gold and Grand Bazaar. It may a more general bug, rather than something specific to your game. I use an android device.
I noticed this behavoir in other games too, but not on Jaipur, and it's referenced on documentation when talking about the stock component.
User avatar
MikeUcc
Posts: 1
Joined: 10 April 2021, 21:54

Re: Cards spread on refresh

Post by MikeUcc »

I had some odd issues like this as well
Have you tried using the updateDisplay() method on the Stock item in question?

You could put this call in the OnEnteringState function if it seems to happen when entering a specific state
User avatar
DargorX
Posts: 33
Joined: 10 September 2012, 20:16

Re: Cards spread on refresh

Post by DargorX »

MikeUcc wrote: 09 October 2021, 16:30 I had some odd issues like this as well
Have you tried using the updateDisplay() method on the Stock item in question?

You could put this call in the OnEnteringState function if it seems to happen when entering a specific state
updateDisplay doesn't do the trick, but removing centerItems = true does!

Thanks for the suggestions.
Post Reply

Return to “Developers”