Page 1 of 1

Replay problem

Posted: 04 June 2021, 21:58
by Badguizmo
Hello.

While replaying my game (Riftforce, in development : https://studio.boardgamearena.com/table?table=288301) I face 2 strange problems :
- the cards played from the hand do not desappear from the player hand (deck component), move #9.
- sometimes there is a JS error

Is there someting specific to do with the replay ?

Edit : and is there some more explanation about the replay (when a new code is placed on FTP, does the replay takes it into account ? ==> maybe stupid question).

Re: Replay problem

Posted: 05 June 2021, 03:21
by paramesis
Glad to see everything's coming together quite nicely in this project :)

End-game replays are made up of entirely of notifications played against the initial game state. The database and deck component are no longer part of the picture. When you're playing through the game, the steps you take in the interface are removing items from the stock, but in the replay you aren't taking those same steps, just seeing the notifications.

As a result, you'll need to make sure the card is removed from your hand stock during the notification, even if you're already removing it during your interface sequence.

The second question is definitely a good one to ask, because it can lead to confusion once a release is available on a production server (Alpha, Beta, or Stable). The end-game replay is based on whatever version of the project is deployed when the table was started. This means that if you deploy a fix for a display bug in the middle of a turn based game, the bug will appear to be fixed for the remainder of that game, then appear broken again in the end-game replay.

Re: Replay problem

Posted: 05 June 2021, 10:51
by Badguizmo
Hello.
paramesis wrote: 05 June 2021, 03:21 Glad to see everything's coming together quite nicely in this project :)
;) there are still some rocks on the road to alpha, but they will be removed soon (some strange behavior that "move" cards randomly ... )
paramesis wrote: 05 June 2021, 03:21 As a result, you'll need to make sure the card is removed from your hand stock during the notification, even if you're already removing it during your interface sequence.
I will check on that, even if for now I don't see what I have to do :oops:
paramesis wrote: 05 June 2021, 03:21 The second question is definitely a good one to ask, because it can lead to confusion once a release is available on a production server (Alpha, Beta, or Stable). The end-game replay is based on whatever version of the project is deployed when the table was started. This means that if you deploy a fix for a display bug in the middle of a turn based game, the bug will appear to be fixed for the remainder of that game, then appear broken again in the end-game replay.
Thank you for the precision.

Re: Replay problem

Posted: 13 December 2021, 22:28
by Badguizmo
Hello again.

It is time for bug chasing :D

I still don't get this one.
In my code I have this sequence (JS) :

Code: Select all

dojo.subscribe('notifPlayElemental', this, "notif_PlayElemental");
this.notifqueue.setSynchronous('notifPlayElemental', 500);
notif_PlayElemental( notif )
{
	if (...)
	{
		this.playElemental(someargs);
	}
}
...
playElemental(someargs)
{
	if (sometest)
	{
		//We destroy the object before moving the new one to have more "smooth" ==> Only if it is not the first turn
		this.playerHand.removeFromStockById(this.cardIdSelected);
	}
}
Does this mean that I have to include my "playelemental code" directly in the "notif_playelemental code" ?