Page 1 of 2
Truncating/Archiving the Notification log
Posted: 29 November 2020, 09:15
by BaronFraser
Hey there,
I'm developing Automobiles and have taken steps to minimize log activity. But players still take 5-10 actions on a given move, and there can be 5 players, and many turns in a race, and multiple races in a season...
Players are asking if it's possible to remove old notifications from the log, because it starts taking a very long time to load a turn-based game.
https://boardgamearena.com/bug?id=27154
I note that other long games have similar complaints, such as The Crew
https://boardgamearena.com/bug?id=24727
There are a few other strategies that I could implement, particular for turn-based games, but it would be FANTASTIC, particularly in multi-race games, to be able to suppress the log for finished races from being loaded at game start, or to allow me to manipulate the older log items and replace multiple messages (which were important at the time, so I still want them sent initially) with shorter summaries.
I haven't found any way to do this. Is there simply no API for this or have I missed something? Has anyone come up with any other strategies?
Re: Truncating/Archiving the Notification log
Posted: 29 November 2020, 13:09
by Tisaac
Have you tried a brute force approach by clearing old logs of the database yourself and see how the framework react ?
Re: Truncating/Archiving the Notification log
Posted: 30 November 2020, 05:16
by BaronFraser
Tisaac wrote: ↑29 November 2020, 13:09
Have you tried a brute force approach by clearing old logs of the database yourself and see how the framework react ?
I haven't, but will dabble if no other option exists. I'm always a little wary of going behind the back of any API as doing so could break things without warning in the future...
Re: Truncating/Archiving the Notification log
Posted: 30 November 2020, 08:54
by Tisaac
BaronFraser wrote: ↑30 November 2020, 05:16
Tisaac wrote: ↑29 November 2020, 13:09
Have you tried a brute force approach by clearing old logs of the database yourself and see how the framework react ?
I haven't, but will dabble if no other option exists. I'm always a little wary of going behind the back of any API as doing so could break things without warning in the future...
Then you will probably face many challenges... So no API currently documented for that.
Re: Truncating/Archiving the Notification log
Posted: 30 November 2020, 09:03
by Een
Tisaac wrote: ↑29 November 2020, 13:09
Have you tried a brute force approach by clearing old logs of the database yourself and see how the framework react ?

Re: Truncating/Archiving the Notification log
Posted: 30 November 2020, 09:07
by Tisaac
Een wrote: ↑30 November 2020, 09:03
Tisaac wrote: ↑29 November 2020, 13:09
Have you tried a brute force approach by clearing old logs of the database yourself and see how the framework react ?
Is it really a bad idea ?
I mean, if you resynch your whole game current status at some points, you don't need the full previous logs/notifications, right ?
I would say it's worth a try

Re: Truncating/Archiving the Notification log
Posted: 30 November 2020, 09:41
by Een
Would break replays. Notifications are dumped at the end of the game to create the game archive...
Re: Truncating/Archiving the Notification log
Posted: 30 November 2020, 09:59
by Tisaac
Een wrote: ↑30 November 2020, 09:41
Would break replays. Notifications are dumped at the end of the game to create the game archive...
What kind of "break" are we talking about ?
I mean, the beggining of the replay would be lost of course, but you should still be able to replay the remeaning notifications, right ?
For game with missions as The Crew, it's not completely absurd to delete old notifications as the missions are independant. I mean, when you are playing a "normal" game, the replay is only available for a limited time. Here, all notifications are stacked because the game is still going on.
So, doing some automatic deleting for old notifications (based on timestamps + state of game) seems reasonable for me, mimicking what is happening on "normal" one shot game.
Re: Truncating/Archiving the Notification log
Posted: 30 November 2020, 10:09
by tchobello
isn't it possible to limit the notifications read back (50 ? 100 ? ) while a real or turn by turn game has not ended ?
Re: Truncating/Archiving the Notification log
Posted: 30 November 2020, 10:12
by Een
Could maybe work if there was a refresh of the whole interface by notification that was failsafe and could apply from the initial state.
Even in that best case, break = "full replay of the game not available". Even for the crew, I don't think that would be a good thing to have a replay for a game lasting 10 missions that would display only the last one.
In general, that would be very hacky. In brute force approach, there is "brute"
Not saying that I have a better solution at the moment (sourisdudesert knows this side of the framework much better than me), but this approach feels wrong.
We have some games where developers added layers on top of the framework. When we did some significant changes to the framework, they broke or were not compatible with some new functionalities (some games cannot be played turn based for example because of this).