Page 1 of 1

How to change the information that is notified to players

Posted: 25 December 2020, 04:29
by Insanechairman
How do you notify players of a card played but remove the information after the trick is over? Something like how jaipur allows you to see the most recent trade that has happened, but a new trade will override the information.

Is it possible to have both temporary information and permanent information? I would like some messages to be permanent, but some messages to be temporary.

Re: How to change the information that is notified to players

Posted: 25 December 2020, 08:55
by Tisaac
You cannot remove notifications since they are needed for replay.
My guess is that it's simply hiding old logs by using css and js

Re: How to change the information that is notified to players

Posted: 25 December 2020, 22:49
by XCID
I was thinking about this problem a while ago as well. One of my favorite card games, which I'd love to implement here, also depends on remembering cards that got played. So I couldn't display that information in the logs.

I guess what would be a solution is to come up with a seperate custom log, for example next to the player tables, where only the most recent information is displayed. In my game for example, I could display the last move of each player, so that also round based games are possible.

Re: How to change the information that is notified to players

Posted: 26 December 2020, 00:09
by Tisaac
XCID wrote: 25 December 2020, 22:49 I was thinking about this problem a while ago as well. One of my favorite card games, which I'd love to implement here, also depends on remembering cards that got played. So I couldn't display that information in the logs.

I guess what would be a solution is to come up with a seperate custom log, for example next to the player tables, where only the most recent information is displayed. In my game for example, I could display the last move of each player, so that also round based games are possible.
Hiding old logs seems easier. You can easily add a column to the globalog table to put some notifications as "hidden", and then overwrite the notifications listener on js to not display those.
If you need help on that, I already have similar code for "cancelling" notifs in case of a restart of a turn.

Re: How to change the information that is notified to players

Posted: 26 December 2020, 01:03
by Victoria_La
Not sure if this helps bug when you send notification you don't have to log anything, i.e. can log can be '' (empty string)

Re: How to change the information that is notified to players

Posted: 29 December 2020, 17:43
by XCID
I would also need to come up with a solution to ignore the replay function. Hiding notifications won't help if you just replay the last two moves to see what happened :)

Well, if I should ever work on that game I can start thinking about it.

Re: How to change the information that is notified to players

Posted: 29 December 2020, 18:49
by Tisaac
XCID wrote: 29 December 2020, 17:43 I would also need to come up with a solution to ignore the replay function. Hiding notifications won't help if you just replay the last two moves to see what happened :)

Well, if I should ever work on that game I can start thinking about it.
But how can the user replay if you hide the log on the right ?