Removing Map XML Game Version
The version attribute in the info tag:
<info version=... />, (1) is used only for display purposes. This leaves it up to the user to determine if versions are compatible or not.
(2) Considering that each map maker can interpret the version number how they want, there is no defined consistency for when two versions would be compatible.
(3) Next, this version value is defined at a 'map xml' (or a game) level, when the incompatibility could be at the map level. This makes it an extra burden that you have to be sure all map XMLs are kept in sync and all updated if there are incompatible changes to a map.
(4) With the map XML version, it's confusing how that is different from the 'download' version that is in the 'triplea_maps.yaml' file.
Largely because of issue (1), the map XML attribute tag is being removed. Map XMLs may contain to have it, but it will no longer even be displayed.
To deal with the absence of the user-enforced version compatibility, instead we'll need to do things:
(1) as has been the case, try to keep map changes compatible and if releasing incompatible changes, do so with a new XML or a new map.
(2) we can increase the 'out-of-date' map frequency check to encourage player to consistently get on the latest map version.
A fundamental problem we have is the game engine was never designed to be able to handle multiple map versions. One day it would be nice to see this happen, until then the engine essentially assumes players will always be on the latest version of any given map and that there will only be a single version.
The new maps.yml descriptor file (described in this thread) would be the place to plop a version number if we were to want this "feature."
I 'quote' feature because the game engine did not do anything with the version value other than display it. I don't think it's come up enough times where incompatible versions are worth the overhead of a versioning system. Without guaranteeing that users are on the same version of a map, there is a whole lot of missing logic that would make such a feature useful. For example, the engine does effectively nothing with the map version. Worse yet, a save-game encodes some of the map data and version, which would make a version value very confusing for both users and the engine if a map were incompatible but the save game encoded data that makes it compatible.
We'd also have to define a versioning system that all map makers would have to understand and consistently use. I do not like how that adds yet another level of burden and one more thing to learn in order to make a map.
So while in principle I support the concept of a map version, if it all is just a display number that is summarily ignored and not used for anything else other than display, it's therefore not useful in its current form. If we were to make it useful, we'd have to rebuild it in a different way, which makes the existing code around it still not useful.
yea having it so you can't join a bot with a different version and thus crashing it would be nice. I just use the version to basically keep track of changes.
Maybe a notification that one has wrong version when they try and join/play a game ? Or maybe I'm misunderstanding here
@beelee you're referring to engine version?
There are three operative versions:
- engine version, eg 2.5
- game XML version
- map download version (found in maps.yaml)
@LaFayette I met map version. I join a bot with map/game version 1.93 and I have 1.94 and it crashes the game. So would be game xml version.
Which map are you referring to? That is an interesting example on its own.
Though, the game engine today is not handling that. Furthermore, presumably the map maker should have incremented the version to
2.xto indicate it is not compatible. So even if the engine were set up to disallow incompatible versions, in that case it would not have disallowed the connection anyways since 1.93 ought to be compatible with 1.94. (and if not, this goes back to the point that the version number is not well defined).
Hence, for now the version number of game XMLs is being removed.
I'm a bit surprised you managed to isolate that example to a map version. How did you know it was map version causing the problem? @beelee
@LaFayette yea, sorry I wasn't very clear. So the map is "Oztea 1939 Global" and it was on the latest "engine stable" 2.5 ??? and I updated game xml from 1.93 to 1.94 at git.
The bots in the lobby were still running 1.93. I saw a game being played and tried to join and it would just show it trying to join. After a minute, I tried again. Same result.
Went back to the lobby and the two guys playing said I screwed up their game and that I had wrong version. I didn't notice the bot was on 1.93 and not 1.94.
It'd been a couple weeks I think since the update, so it didn't occur to me the bot would still have the older version.
At any rate, I was wondering if this will prevent crashing peoples games in bots if you have different xml version numbers and try to join.