Awesome! The calculator on A&A.org has limitations as you point out. The Triple-A one doesn’t give info like the one and two standard deviation results.
Axis & Allies XML
-
Are there any techie types like me on the forum?
If so, I’d like to create an XML format to represent
-
The current status of the game board
-
Game actions as transformations - the idea here would be you could take a map apply actions and get a new map as a result
The purpose is for Play by Forum and Play by Email games. There is a variety of software to use, if eventually they all use this format, then you could use whatever software pleases you (including something text based).
It would not be hard to do it all myself but I’d like some input to make it a community thing.
-
-
Hello Dave, glad you could join my A&A XML committee. <– see, already talking to myself
This should be easy but my dilema is the following: should the XML be specific and typesafe or generic and expandable. For those partially-techie types.
Typesafe example
<aar-gameboard><countries><germany></germany></countries> <map><karelia></karelia></map></aar-gameboard>
In this example, anything that is not valid (included in the DTD) will cause an error immediately by the XML parser (you basically get validation for free)
Generic and expandable version
<gameboard game="AAR"><map><area name="karelia"></map></gameboard>
The later one you could re-use for any A&A game but there is no guarantee that you have valid markup or that everything that you need is actually there.
-
Dave,
I really like where you are going with this. Tonez and I discussed this as well about a month ago, and arrived at the following observations:
ABattlemap: not open source, and no development seems to be happening with this right now, so not sure how we could integrate anything with this map util
Mapview: looks like development is a possibility with this tool, since it seems as though current development work is underway. Not open source however, so we would be limited by others as to what we could do
TripleA: open source. Graphics are pretty good already, and the game engine is really nice too. We could integrate this to use whatever xml you wanted. TripleA already has game actions as transformations, and it remembers previous states of the map, including production and cash on hand values. It also enforces A&A movement rules.
Other Mapping Utils: dunno, haven’t tried any others.Conclusion: creating an xml format would be great, but realistically we only see tripleA being able to use the format. If other mapping utils come along, or existing one are developed further, they might also adopt the xml format. But I don’t know how likely this is to happen anytime soon.
As a result, we decided against the option of an xml format in favour of improved readability. Check out our beta test game threads for actual turn summaries generated by TripleA.
http://www.axisandallies.org/forums/index.php?topic=8259.0
http://www.axisandallies.org/forums/index.php?topic=8142.0
http://www.axisandallies.org/forums/index.php?topic=8331.0Compatibility between different mapping utils is still an issue, and to be honest I don’t know how to get around that if development is not happening on those various mapping utils. Thoughts?
Rob
-
My programming is barely good enough to get by, but I’ll take a shot at answering your question.
I’d recommend going with the Generic and Expandable version of XML tags over the Strict version. No need to lose flexibility at this point, and you can always build the validation into the map util.
Just my opinion.
-
rjclayton, I don’t remember that conversation… maybe it was before I started really hacking triplea.
I posted this to the general development thread in response to a reference to this thread:
Hey djensen,
Before you endeavor to create Yet Another Data Format, you should check out the underbelly of TripleA. It uses xml files already to specify map layouts and starting unit locations for all games (Classic, AAR, pacific, etc) in a very generic way.
I can post a sample AAR R1 xml file if you want so you can see what the format is like. Currently, savegame files are saved as a gzipped serialized java object, but there is discussion on the dev list to also support the xml format for savegame files in TripleA (probably with some form of digital signature).
I’m also interested in hearing your plans for this data format. Lots of forum users currently use ABattleMap, for instance. Are you thinking of replacing that tool with a more modern, open version? As far as I can tell ABattleMap is closed source and will probably never be interoperable with anything.I’m attaching the sample AAR R1 xml file here as referenced in my comments above.
[attachment deleted by admin]
-
If your not gonna be using scans of the original boards for this project Id gladly offer my map file to help out. I could help you find suitable icons for the units.
-
The idea here is to promote the XML format for future use. XML is human readable for consumption by machines but not for consumption by humans. The idea would be to post your xml as an attachment and it is up to the software package to output something human consummable for email or the forums.
I’m just worried about compatibility by not going strict. Let me review the DTD specification for XML files. If we can use generic tags and have both a strict and loose DTD, that would be the best.
-
As suspected, this is somewhat specific to TripleA. The issue I see here is that the XML seems to contain everything about the game. Both the rules, the map, where the units are, and what java classes to use. I would like to decouple this into game/gamerules, game status, transformations. I expect the game rules would always be a part of the client.
I don’t want to create “yet another” XML format but instead I would like to create “the definitive” XML format for Axis & Allies. Given the Google page rank of this site for Axis & Allies, I think we can do that here. (And PR is finally growing on Live.com too).
rjclayton, I don’t remember that conversation… maybe it was before I started really hacking triplea.
I posted this to the general development thread in response to a reference to this thread:
Hey djensen,
Before you endeavor to create Yet Another Data Format, you should check out the underbelly of TripleA. It uses xml files already to specify map layouts and starting unit locations for all games (Classic, AAR, pacific, etc) in a very generic way.
I can post a sample AAR R1 xml file if you want so you can see what the format is like. Currently, savegame files are saved as a gzipped serialized java object, but there is discussion on the dev list to also support the xml format for savegame files in TripleA (probably with some form of digital signature).
I’m also interested in hearing your plans for this data format. Lots of forum users currently use ABattleMap, for instance. Are you thinking of replacing that tool with a more modern, open version? As far as I can tell ABattleMap is closed source and will probably never be interoperable with anything.I’m attaching the sample AAR R1 xml file here as referenced in my comments above.
-
What would it take to get TripleA development on board with this? I know a lot of open source projects have egos about their projects. Do you think the TripleA team would be cooperative with outside ideas?
-
Hello, I’m the main developer of TripleA. I guess I have a bit of an ego, but tonez is also a developer, and he seems quite reasonable.
You want to do,
<territtory name=“England”>Rather than
<england>One reason is dtd, schema validation. Another reason is that if you try to encode names like
<finland norway=“”></finland>
It doesn’t work using the tag name as the country name.Â
A lot of the xml format can be taken directly from TripleA. The dtd is here,
I’m quite supportive of an open xml format, but there are serious technical issues.
TripleA will be able to write to the xml format very easily, but TripleA will have a lot of problems trying to read this xml format.
TripleA uses it’s own xml format (an example was posted abvove) only for initializing games. When TripleA saves a game in progress, a more complicated binary format is used because TripleA’s xml format does not contain enough information. When a game is underway, TripleA tracks things such as:
how many territories a unit has moved this round
what transports are carrying which units
what territories did units invade a country from (you can only retreat to territories where units came from)
is the bomber in germany fighting a land battle, or doing a strat bomb raid
did the strat bomb raid in germany already happen
did the battleship already shore bombard this combat phase?
did the battle ship shore bombard in the combat phase (this means it can’t move in non combat)
if you save after rolling in a battle, TripleA tracks who just fired, what the dice were, and who moves next
is this a low luck game?
…The list goes on. The problem is that none of the utilities store this information. So when TripleA loads a game stored by AABattleMap, it will have to guess (in the case of which transport is carrying which troops) unless there is enough information in the games history to infer this information.</england></territtory>
-
Hello, I’m the main developer of TripleA. I guess I have a bit of an ego, but tonez is also a developer, and he seems quite reasonable.
My ego resents that comment! lol
There is certainly some stuff in the TripleA xml that is specific to triplea, but maybe not as much as you might think. All of the javaClass=“…” attributes could simply be removed.
The only remaining section that has TripleA-specific information is the <gameplay>section. This section could probably be removed in its entirety, as much of this information is implicit to all A&A games, as far as I can tell, with the exception of the players and player turn-order. The player turn order could instead be captured in the existing PlayerList section, like so:
<playerlist><player name=“Russians” optional=“false” turnnumber=“1”><player name=“Germans” optional=“false” turnnumber=“2”>…Notice that the revised.xml file defined map layout, the initial state of the game, any game options, and the gameplay sequence.
I think these are all good things for an open format to describe (except perhaps the last one, for reasons stated above), so it can support all different flavours of A&A.However, you’ll also want new sections for the current state of the game. Or, perhaps you’ll want to keep that as a separate XML file.
This is where you’ll need to make tough decisions, like whether it will reflect the current state only, or enumerate all state transitions (ie: unitA moved from terrA to terrB on r3…, etc) that occur in a turn.
Also, will it track only one turn (or Round) at a time or will it track the progress of an entire game?
TripleA does the latter in its saveGame file, and it is extremely useful, and one of the many reasons that I find the tripleA interface far superior to any other I’ve seen. If you take the easy route and only support the current board state in your open format, you will likely not win over many TripleA users.I am currently working on features to TripleA that make it easy to play against a non-triplea player, by enabling the TripleA player to play out the opponents turn in a special “Edit” mode that allows for fixed outcomes of battles, etc. I think this will be more user-friendly than an open format that loses turn history.
I think a good place to start is a more in-depth discussion on the revised.xml format I posted from tripleA, and how it does or doesn’t meet general requirements. I guess I’ve just started that discussion ;)</player></player></playerlist></gameplay>
-
Maybe I didn’t mean ego as much as dogmatic, i.e., “Linux is the best and only operating system, Microsoft is evil, everything should be linux!”
You guys seem very reasonable to me. :-)
I’ll post my comments about XML stuff later.
-
Just thought I could throw in a good resource. Mapview uses XML files to generate a user customizable file to make modules. Mot has used a Visual basic program to create a compiler. You make your xml text and drag the file onto the compiler. Works quite well actually and I’ve made a bunch of modules. Mot has been kinda out of the scene since having a kid. I guess I have been too. He might be a good source of ideas or info so you might check on www.motcreations.com
Here is an example of the A&A revised xml text I used.<module_def format_version=“1”><game_info><title>Axis & Allies Revised Edition</title>
<author>Der Panzinator</author>
<url>www.axisdomain.0catch.com</url>
<copyright>n/a</copyright>
<min_mv_version>1.2.0</min_mv_version></game_info>
<game_id><unique_id>AA_Revised</unique_id>
<version>1</version></game_id>
<board_settings><board_image>AArevisedMap.gif</board_image>
<label_font_name>Arial</label_font_name>
<label_font_size>10</label_font_size>
<label_is_transparent>False</label_is_transparent></board_settings>
<image_settings>
<mask_html_color>#FFFFCC</mask_html_color>
<pallet_img_width>44</pallet_img_width>
<pallet_img_height>24</pallet_img_height>
<map_image_width>44</map_image_width>
<map_image_height>24</map_image_height>
</image_settings>
<tabs><category name=“Russia”><token token_id=“russian_flag” token_type=“Image”><pallet_image>rus_flag.gif</pallet_image>
<drag_image>drag_drop.bmp</drag_image>
<map_image>rus_flag.gif</map_image>
Flag
<click_region_x>0</click_region_x>
<click_region_y>0</click_region_y>
<click_region_w>44</click_region_w>
<click_region_h>24</click_region_h></token>
<token token_id=“russian_inf” token_type=“Quantity”><pallet_image>rus_inf.gif</pallet_image>
<drag_image>drag_drop.bmp</drag_image>
<map_image>rus_inf.gif</map_image>
Infantry
<click_region_x>0</click_region_x>
<click_region_y>0</click_region_y>
<click_region_w>44</click_region_w>
<click_region_h>24</click_region_h></token>
<token token_id=“russian_arm” token_type=“Quantity”><pallet_image>rus_arm.gif</pallet_image>
<drag_image>drag_drop.bmp</drag_image>
<map_image>rus_arm.gif</map_image>
Armor
<click_region_x>10</click_region_x>
<click_region_y>4</click_region_y>
<click_region_w>20</click_region_w>
<click_region_h>20</click_region_h></token>
<token token_id=“russian_ftr” token_type=“Quantity”><pallet_image>rus_ftr.gif</pallet_image>
<drag_image>drag_drop.bmp</drag_image>
<map_image>rus_ftr.gif</map_image>
Fighter
<click_region_x>0</click_region_x>
<click_region_y>0</click_region_y>
<click_region_w>44</click_region_w>
<click_region_h>24</click_region_h></token>
<token token_id=“russian_bb” token_type=“Quantity”><pallet_image>rus_bb.gif</pallet_image>
<drag_image>drag_drop.bmp</drag_image>
<map_image>rus_bb.gif</map_image>
Battleship
<click_region_x>0</click_region_x>
<click_region_y>0</click_region_y>
<click_region_w>44</click_region_w>
<click_region_h>24</click_region_h></token></category>
<category name=“Misc”><token token_id=“misc_remarks” token_type=“Text”><pallet_image>misc_remarks.gif</pallet_image>
<drag_image>drag_drop.bmp</drag_image>
<map_image>misc_remarks.gif</map_image>
Comments
<click_region_x>10</click_region_x>
<click_region_y>0</click_region_y>
<click_region_w>20</click_region_w>
<click_region_h>28</click_region_h>
<default_text>Special Orders</default_text></token>
<token token_id=“misc_complex” token_type=“Image”><pallet_image>misc_complex.gif</pallet_image>
<drag_image>drag_drop.bmp</drag_image>
<map_image>misc_complex.gif</map_image>
Complex
<click_region_x>10</click_region_x>
<click_region_y>4</click_region_y>
<click_region_w>20</click_region_w>
<click_region_h>20</click_region_h></token>
<token token_id=“misc_production” token_type=“Numeric”><pallet_image>misc_production.gif</pallet_image>
<drag_image>drag_drop.bmp</drag_image>
<map_image>misc_production.gif</map_image>
Production
<click_region_x>10</click_region_x>
<click_region_y>4</click_region_y>
<click_region_w>20</click_region_w>
<click_region_h>20</click_region_h></token>
<token token_id=“misc_money” token_type=“Numeric”><pallet_image>misc_money.gif</pallet_image>
<drag_image>drag_drop.bmp</drag_image>
<map_image>misc_money.gif</map_image>
Income
<click_region_x>10</click_region_x>
<click_region_y>4</click_region_y>
<click_region_w>20</click_region_w>
<click_region_h>20</click_region_h></token>
<token token_id=“misc_red_arrow” token_type=“Arrow”><pallet_image>misc_red_arr_pal.gif</pallet_image>
<drag_image>misc_red_arr_drag.gif</drag_image>
<map_image>clear.gif</map_image>
Attack
<click_region_x>10</click_region_x>
<click_region_y>4</click_region_y>
<click_region_w>20</click_region_w>
<click_region_h>20</click_region_h>
<line_html_color>#CC3300</line_html_color></token></category></tabs>
<initial_setup_cmf>AARevised_Initial_Setup.cmf</initial_setup_cmf></module_def> -
Der Panzinator, can you do me a big favor and invite Mot to this conversation? I’d do it myself but I’m getting tired of creating new accouts everywhere. ;-) It shouldn’t comsume much of his time at all.
-
Hi guys, just poking my head in here. It was suggested that I stop by to possibly add my two cents.
Here it goes:
First, I suggest that the A&A XML file (henceforth called AAX file in this post to save me some typing :) ) be used in an “export/import” format as opposed to the native game storage for currenet and future programs. This will increase adoption and remove any burden an “outside” format may have on future developement. (Imagine not being able to add a feature because it might break the AAX format. That won’t go over well).
Second, I suggest identifying the common/required pieces of data. These should be the basis of your format.Â
Additionally, we must make allowances for additional game-specific data to ride along in the document. So if there is an XML element for a particular infantry unit that contains just a “location” as a territory, games like TripleA can include extensions such as number-of-spaces-moved and TripleA and MapView both can attach things like X/Y coordinates. This data should be maintained through the import/export process. An example: For MapView, a game id is required because MapView supports many types of games. So if a MapView game is exported into an AAX file and then imported into a TripleA game, that game id should be re-outputed when the game exported.Â
(It’s worth noting that the “game id” mebtioned above might not actually be needed since other header information in the “generic/common” sections of the AAX are likely to be enough to identify the game as an A&A game. But it illustrates the concept).
Feedback to these ideas?
Mot
-
Hey at the very least we could supply you with a much better map file for triple A to use than the current one.
-
Sound good.
My thoughts were to have two XML formats. The first, main format, saves the current state of the game. Turn number, game number, current country’s turn, where the units are on the map, how much money each country has, how many IPCs, etc.
The next format would come later, it would be the actual turn that was performed. Units purchased, units moved where, the combat that took place, the results of combat etc. The idea here is that you can apply the actions XML file on the game state XML file and “replay” the actions that your opponent took.
None of the formats “enforce” rules, they simply explain what was done and the results.
Mot, is there any mroe work being done on MapView? Do you have a way to figure out if units are in a territory? OR is it just X,Y coordinates?
-
I’ll pop in here too. I had thoughts about building a web-based game engine to work with my dicey so it would be like DAAK on steroids - eg. not only would it save the player’s e-mail addresses and game ID #, but also how many units/IPCs each country has in each territory etc.
Needless to say, it would get very complicated, and I likely wouldn’t be able to do a visual representation of the game board, at least not without help. But I was also thinking of using some kind of XML file to store the game data.
I was thinking of a structure like this below (ignore any bad syntax). This shows:
- Ukraine controlled by Germany with Ger: 4 INf 2 Arm and Jap: 2 Jet Fighters, and
- Caucasus controlled by Russia with 1 IC 1 AA.
I think in addition to IPC value each territory should list the “native” owner but I’m too lazy now to type that in yet too…
<map><territory name="Ukraine"><ipc_value>3</ipc_value> <owner name="Germany">(or <owner>Germany</owner>?) <units_present><player name="Germany><quantity>4</quantity> <unit name="Tanks"><quantity>2</quantity></unit><br /><unit name=" infantry"=""></player> <player name="Japan"><unit name="Jet Fighter"><quantity>2</quantity></unit></player></units_present></owner></territory> <territory name="Caucasus"><ipc_value>4</ipc_value> <owner name="Russia"><units_present><player name="Russia"><unit name="AA"><quantity>1</quantity></unit> <unit name="IC"><quantity>1</quantity></unit></player></units_present></owner></territory></map>
Alternately you could make each unit an individual object with attributes such as just_unloaded_from_transport, num_moves_made, submerged, participated_in_combat, just_built or whatever. Just brainstorming.
-
I’d actually like the main XML file to represent the state of the game between turns. Purely a representation of the map after you finish your turn and before your opponent begins their turn.
I’m going to gather all of these suggestions and formulate an example.
-
I’m going to gather all of these suggestions and formulate an example.
If you build it, they will come! Bring on the prototype, wise leader.