Post Release / Best approach for new feature (involving new user preference, gamestates or dbupgrade)
Posted: 19 September 2021, 13:29
I'm working on adding a "highlight last move" feature to one game. The information about the last move is only available in the notifications sofar and I believe that is not possible to extract the data from there without much effort (otherwise please tell me).
My idea is to store the relevant information (three integer values for the last move, six if I go for the last two moves) on my own and update them accordingly. In addition if the highlighting should be active or not, and how many moves should be highlighted should be player specific.
For the user specific setting I need one new setting in the gameoptions.inc.php. That is quite simple and I believe will not break running games (since there is a default value settable).
For storing the information I found two possible ways:
1. Adding new global game states (using self::initGameStateLabels(...) )
2. Extending one of the existing tables (player or deck-component)
I implemented it currently using the first option with new global game states, and in Studio it worked like a charm. The not existing game states got at the beginning a 0 (which is ok for me).
In addition I checked the Post-Release information (https://en.doc.boardgamearena.com/Post-release_phase and wondered if that might break any running games if I would deploy the version, or should I go using the second way?
Also if I missed a possibility to implemented that, please let me know.
Best regards
Helmut
My idea is to store the relevant information (three integer values for the last move, six if I go for the last two moves) on my own and update them accordingly. In addition if the highlighting should be active or not, and how many moves should be highlighted should be player specific.
For the user specific setting I need one new setting in the gameoptions.inc.php. That is quite simple and I believe will not break running games (since there is a default value settable).
For storing the information I found two possible ways:
1. Adding new global game states (using self::initGameStateLabels(...) )
2. Extending one of the existing tables (player or deck-component)
I implemented it currently using the first option with new global game states, and in Studio it worked like a charm. The not existing game states got at the beginning a 0 (which is ok for me).
In addition I checked the Post-Release information (https://en.doc.boardgamearena.com/Post-release_phase and wondered if that might break any running games if I would deploy the version, or should I go using the second way?
Also if I missed a possibility to implemented that, please let me know.
Best regards
Helmut