Page 1 of 1

[XML] Add an XML version tag

PostPosted: Mon Jan 27, 2014 12:16 am
by degaston
Concise description:
It seems that a recurring problem with suggestions for changes to the XML or game rules is determining if it is going to break any existing maps. If a tag was added to the start of each map XML file specifying which version it was written for, then the game code for that version could be locked, and new features would be guaranteed to have no effect on anything that came before it.

Specifics/Details:
  • Add a tag <version>##.#</version> that appears right after <map>. If it is not there, assume version 1.0.
How this will benefit the site and/or other comments:
  • XML and game engine changes would be easier to implement.
  • Tags could be updated or retired as needed without concern for maintaining backwards compatibility.

Re: [XML] Add an XML version tag

PostPosted: Mon Jan 27, 2014 12:28 am
by Metsfanmax
I highly support this feature. Any experienced software developer knows that version control is absolutely essential when you're working with constantly changing codebases. Not only would this enable backward compatibility and make updates less likely to break things -- but it also allows people to plan their map development knowing that the gameplay they're targeting for is stable. We already have stability now, but it's mostly a result of our fear of breaking old maps rather than because we don't want new features. This way we could have the best of both worlds.

Re: [XML] Add an XML version tag

PostPosted: Mon Jan 27, 2014 1:11 am
by koontz1973
So any new game play options after this point would be classed as version two? Any map that does not have a version 2 tag in the xml would not have this feature included on it?

Re: [XML] Add an XML version tag

PostPosted: Mon Jan 27, 2014 7:10 am
by degaston
koontz1973 wrote:So any new game play options after this point would be classed as version two? Any map that does not have a version 2 tag in the xml would not have this feature included on it?

It would probably need to be decided on a case-by-case basis whether a change could be made to the current XML version without any negative side effects, or if it warranted a new XML version. Adding optional tags or attributes would probably not require a new XML version in most cases, but changing the behavior of an existing feature, or modifying the structure of a tag probably would.

What brought this to my mind was the proposed killer neutral in a continent change. I think that it is logical that if a map developer includes a killer neutral as part of a continent, then the intention is that any bonus or other actions that result from holding that continent should apply at the start of a player's next turn, and only then should the killer revert to its default value. I can understand management not wanting to take a chance that this change would affect some maps in unforeseen ways, but I also felt that my suggestion to add a bonus="yes" attribute to the killer tag was not an ideal solution.

With a version tag, all maps that include <version>2.0</version> could have KN's as part of a continent, and all previous maps would be unaffected. If they want an old map to use a new feature, then there could be a process to test and certify that they are compatible with the feature, and a version tag could be added to their XML.