Bug: client performs game action twice

Game development with Board Game Arena Studio
Post Reply
User avatar
bmcfluff
Posts: 1
Joined: 02 June 2015, 21:13

Bug: client performs game action twice

Post by bmcfluff »

Hi, I'm one of the devs for Lost Cities. I'm trying to track down some bugs which all seem to involve the client performing an action twice that it should only perform once. For example, in this image https://imgur.com/gallery/NAwZOIe, you can see that some cards were played twice (yellow 10, white 7) and also that one extra card was drawn from the deck (so the game ends with -1 cards in deck). Importantly, these appear to be entirely client-side display bugs: they don't show up on replay, refreshing the page seems to fix them, the final scores are correct (as if the action had only been performed once), etc. Does anyone have experience tracking down things like this? Is it an issue with my game in particular, or is it a known issue with the larger framework (e.g. sometimes a notification gets sent twice in any game?)
User avatar
RicardoRix
Posts: 2548
Joined: 29 April 2012, 23:43

Re: Bug: client performs game action twice

Post by RicardoRix »

certainly seems like a doubling of the notification.

it maybe the connection drops may be the cause.
server doesn't think the client received the message so sends it again.

You would think that inside the framework there would be check with a unique id or something to make sure this doesn't happen.
User avatar
Victoria_La
Posts: 665
Joined: 28 December 2015, 20:55

Re: Bug: client performs game action twice

Post by Victoria_La »

Check that when client sends ajax action it is locked (lock: true) in args parameters. If action is not locked the client may do something else before server reply is received (it may not necessary work but it will appear as such)
vincentt
Posts: 254
Joined: 01 September 2017, 17:25

Re: Bug: client performs game action twice

Post by vincentt »

Hi

maybe you have two connect on the same components and therefore the connect action is done twice?
Post Reply

Return to “Developers”