From: <wak...@ea...> - 2005-07-20 23:15:30
|
This looks like exactly what we need. I like it. ---Brett. -----Original Message----- From: Erik Vos <eri...@hc...> Sent: Jul 20, 2005 12:09 PM To: rai...@li... Subject: [Rails-devel] Tiles Some further thoughts on tiles. I think we need two sets of XML definitions: one that defines which tiles types are available, and in what numbers, and another which defines the properties of each type of tile. So we might get: <TileSets> <TileSet tile="7" amount="4" upgrades="18,26,27,28,29"/> <TileSet tile="8" amount="8" upgrades="16,19,23,24,25,28,29"/> ... </TileSet> <Tiles> <Tile number="7" ...all properties that we need... /> .... </Tiles> (see below why I differentiate between "label" and "number"). <TileSets> would be specific per game. <Tiles> is basically the same for all games, except that to speed up XML parsing we would probably create a subset per game. This way we have nicely separated the common and the game-specific aspects of tiles. Preprinted tiles would not need to be specified in <TileSets>, but are allocated by virtue of their linkage to a MapHex, like in <MapHex label="H16" tile="-10" .../> where tile is the <Tile> number. Occasionally we also have to deal with two different identifiers per tile, similar to what we have just discussed for map hexes. This is so because the same tile number is sometimes used in different games for different tiles. E.g. tile #69 in 1853 is different from tile #69 in 1830. In most tile databases (like those of Marco Rocci) such duplicates have got a number above 1000 (the 1853 variant if #69 is numbered 1069). But IMO we should *display* 69 in both cases. So for 1853 we would have an additional (optional) attribute: <TileSet tile="1069" label="69" .../> , the default being that the label is equal to the tile number (which is usually the case), and <Tile number="1069" .... /> Erik. ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Rails-devel mailing list Rai...@li... https://lists.sourceforge.net/lists/listinfo/rails-devel |