You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
There is no longer any logging for the games play history. The history of all plays is collected, but it is not available for devs to view or for players to send to us if they have problems.
Describe the solution you'd like
We discussed a way of downloading the history in a JSON file so that it could be sent to us by users that encounter a problem, if they want. Or a dev button that can be used to view the history.
The button would be easy to implement, though probably we don't want it to be seen by players, so it may take some thinking to hide it somewhere or force a developer to set a flag in the program to make it visible. All that has to be done for showing the history in the dev console is console.log(this.game.turnHistory) This will display an interactive JSON object that you can look through to inspect all the values in it.
The downloading it as a file is a bit trickier. I have found an npm lib that will make downloading data as a file easy. https://www.npmjs.com/package/js-file-download . However, as some objects store reference to the object that owns them (i.e. PlayField store the Player that it belongs to) it is not possible to stringify them, you get a circular reference error. So it may be necessary to do something like we did with the log, where the playInfo objects are converted to new objects that have no circular references before passing the data to the file download. This should not be too hard, especially if we are only concerned in who took the turn and what card they played. But if a little work could be done, we may be able to preserve a lot of information about each play, which may make it easier to track down bugs.
Once a file can be downloaded we would need an email address for users to send bugs, or a way to upload a file to the bug report system we already have (which may be there already).
Additional context
I am putting this in an issue because it is something we discussed, but I will not get around to implementing now that my summer has run out.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
There is no longer any logging for the games play history. The history of all plays is collected, but it is not available for devs to view or for players to send to us if they have problems.
Describe the solution you'd like
We discussed a way of downloading the history in a JSON file so that it could be sent to us by users that encounter a problem, if they want. Or a dev button that can be used to view the history.
The button would be easy to implement, though probably we don't want it to be seen by players, so it may take some thinking to hide it somewhere or force a developer to set a flag in the program to make it visible. All that has to be done for showing the history in the dev console is
console.log(this.game.turnHistory)
This will display an interactive JSON object that you can look through to inspect all the values in it.The downloading it as a file is a bit trickier. I have found an npm lib that will make downloading data as a file easy. https://www.npmjs.com/package/js-file-download . However, as some objects store reference to the object that owns them (i.e. PlayField store the Player that it belongs to) it is not possible to stringify them, you get a circular reference error. So it may be necessary to do something like we did with the log, where the playInfo objects are converted to new objects that have no circular references before passing the data to the file download. This should not be too hard, especially if we are only concerned in who took the turn and what card they played. But if a little work could be done, we may be able to preserve a lot of information about each play, which may make it easier to track down bugs.
Once a file can be downloaded we would need an email address for users to send bugs, or a way to upload a file to the bug report system we already have (which may be there already).
Additional context
I am putting this in an issue because it is something we discussed, but I will not get around to implementing now that my summer has run out.
The text was updated successfully, but these errors were encountered: