eliminatePlayer happens immediately, messes up game log

Game development with Board Game Arena Studio
Post Reply
User avatar
quietmint
Posts: 262
Joined: 31 July 2017, 00:28

eliminatePlayer happens immediately, messes up game log

Post by quietmint »

I consider it a bug that self::eliminatePlayer() occurs immediately, whereas notifications via self::notifyAllPlayers() are batched and occur at the end of the request. This makes the game log very confusing because it's out of order. See attached. The state sequence is: 3 (activeplayer) -> 10 (multipleactiveplayer) -> 60 (game) -> 15 (activeplayer) -> 60 (game) -> 91 (game) -> 98 (game). I am doing the elimination in state 91. The message appears in the log far earlier than it should for some reason.

I want the elimination message in the game log to appear in the correct order with other notifications, or at least I want the ability to suppress anything from printing in the game log (and I will handle this myself). How can this be fixed?
Attachments
Screen Shot 2017-08-14 at 3.53.17 PM.png
Screen Shot 2017-08-14 at 3.53.17 PM.png (73.23 KiB) Viewed 2057 times
User avatar
Victoria_La
Posts: 607
Joined: 28 December 2015, 20:55

Re: eliminatePlayer happens immediately, messes up game log

Post by Victoria_La »

Only admins can actually fix that, but I found that multiple game states does not work well together.
I got multiple weird issues, mixed notifications, unroll affecting all game states (i.e. if something bad happens in last state
it unrolls all game states), so end up re-working state machine not to use chained game states unless absolutely necessary
User avatar
Rudolf
Posts: 557
Joined: 24 December 2011, 23:04

Re: eliminatePlayer happens immediately, messes up game log

Post by Rudolf »

I don t know if it could help, but if you suit several autostep states , you need to send a 'notify' (without anything, if you don t need to do something to the client) on each to synchronise server and client, if not synchro refresh is not done
User avatar
Een
Posts: 3854
Joined: 16 June 2010, 19:52

Re: eliminatePlayer happens immediately, messes up game log

Post by Een »

This incorrect logging order has been fixed in the framework.
Post Reply

Return to “Developers”