From: Rick W. <wes...@pu...> - 2010-01-11 01:54:24
|
This may another one of those "I should not go there" type of questions. If so apologies in advance. Or I may be missing something obvious. At the moment I am learning the source of Rails via experimentation rather than intensive reading of the code. ============= A tile for a given game is defined in three places: The per-game TileSet.xml seems reasonable as it has a list of the tiles in the given game, quantity of tiles, upgrade path, and which SVG picture to use. The per-game Tiles.xml has the same list of tiles but this time with the colour of the tile (not the actual color on the time but the color phase), how many cities and towns and their positions; values of the cities/towns and a list of how the track is laid out (e.g., from side 0 to side 2, from side 1 to side 5). The whole-rails SVG files have the graphics for each of the tiles. Now for a given tile the relationship of the tile's SVG file and the tile's entry in Tiles.xml is fixed. In other words I can not a take a tile in the Tiles.xml file and change its track layout from 'side 0 to side 2' to 'side 0 to side 3' and expect that the tile will show up properly. Instead it will retain it's SVG representation. Ditto if I try to change the number of cities or their position. So ... why not have a global Tiles.xml file with three items in it and reduce the duplication across the games? That would make the per-game Tiles.xml smaller and more readable (and thus easier to debug). And/or combine the reduced per-game Tiles.xml file into the TileSet.xml file thus reducing another source of duplication and error. As I said this may have been hashed out before and there may be good reasons for the above files. In any case I will deal with what is current. ============= BTW#1: Is there any routine to display all of the SVG files? BTW#2: The README in the 'tiles' directory says that the XML files in said directory are not important. IMHO it should also say that the svg sub-directory is critically important. As you can imagine by my comment it took me a while to realize the importance of said directory. -- Rick |