Trying not to break games ... ideas?
Posted: 25 June 2020, 09:19
Hello everyone,
sometimes, you want to change stuff in the game logic that influences the game interface. Like changing the "protocol" of the notifications or whatever, calculating scores earlier in the games, etc. etc.
When I do that, I try hard not to break games by providing compatibility and afterwards removing kludges when all affected games has been removed. The ifficult part is to know which games are to be "patched". I recently saw that the 300 entry of the globals seems to contain a version number, but which one is this? The version of the game that was started? The game version for the current player last time they loaded the game? Is is reliable?
Because if there is a way to know both informations (initial version of the game and current javascript version), we can find a way not to break games even for intrusive changes:
Benj
sometimes, you want to change stuff in the game logic that influences the game interface. Like changing the "protocol" of the notifications or whatever, calculating scores earlier in the games, etc. etc.
When I do that, I try hard not to break games by providing compatibility and afterwards removing kludges when all affected games has been removed. The ifficult part is to know which games are to be "patched". I recently saw that the 300 entry of the globals seems to contain a version number, but which one is this? The version of the game that was started? The game version for the current player last time they loaded the game? Is is reliable?
Because if there is a way to know both informations (initial version of the game and current javascript version), we can find a way not to break games even for intrusive changes:
- by sending a "reload page" notification to players whenever needed (think: the game logic asks the interface to be at least version 2020xxxxxxxx)
- by adding conditionals in the game logic (like "do not use this stat if game version is <= 2020xxxxxx")
Benj