Conquer Club

[XML] Add an XML version tag

Have any bright ideas? Share and discuss them with the community

Moderator: Community Team

Forum rules
Please read the Community Guidelines before posting.

And don't forget to search for previously suggested ideas first!

[XML] Add an XML version tag

Postby degaston on Mon Jan 27, 2014 12:16 am

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.
User avatar
Brigadier degaston
 
Posts: 989
Joined: Fri Apr 01, 2011 10:12 am

Re: [XML] Add an XML version tag

Postby Metsfanmax on Mon Jan 27, 2014 12:28 am

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.
User avatar
Sergeant 1st Class Metsfanmax
 
Posts: 6722
Joined: Wed Apr 11, 2007 11:01 pm

Re: [XML] Add an XML version tag

Postby koontz1973 on Mon Jan 27, 2014 1:11 am

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?
Image
User avatar
Lieutenant koontz1973
 
Posts: 6960
Joined: Thu Jan 01, 2009 10:57 am

Re: [XML] Add an XML version tag

Postby degaston on Mon Jan 27, 2014 7:10 am

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.
User avatar
Brigadier degaston
 
Posts: 989
Joined: Fri Apr 01, 2011 10:12 am


Return to Suggestions

Who is online

Users browsing this forum: No registered users