From: <wak...@ea...> - 2005-07-16 01:22:29
|
Here's a look at a portion of the file, to explain my reasoning and syntax: <pre> <Row Number="9" Hexes="12"> <Hex Type="red" Name="Gulf" Exit="E" Mod="False" Value="30,60" /> <Hex Type="plains" /> <Hex Type="plains" /> <Hex Type="plains" /> <Hex Type="plains" /> <Hex Type="mountain" Cost="120" /> <Hex Type="plains" /> <Hex Type="town" Value="30" Exit="SW,E" Tile="yellow"> <Company Name="B&O" Start="True" /> </Hex> <Hex Type="river" Cost="80" /> <Hex Type="curve" Mod="False" Exit="W,NW" Whistlestop="1" /> <Hex Type="water" /> <Hex Type="water" /> </Row> </pre> So... I'm defining each row of hexes. Just to be paranoid and plan for non-square(ish) boards, I've included explicit values for row number and number of hexes. I suppose we should add a Padding="N" value for offsetting the row left or right. Next, each Hex is defined based on its contents. So far I've got plains, water, mountain, town, ootown, curve, and red as valid values. I suspect there's something slightly more meaningful than 'red' we can use for the long-distance route destinations, but I haven't thought of it yet. Each hex has these attributes that may be set: Name Exit - List of which hexsides have tracks exits on them. This uses NE, NW, E, W, SE, SW notation. Mod - Whether the hex can be modified with additional tile placements. This is assumed to be true and only needs setting if explicitly false. Value - Pay out value Cost - Cost for first tile placement Whistlestop - Number of whistlestops on the hex. Tile - color of the tile on the hex, if one exists. Lastly, we have the Company tag for marking any influence a Company has on the hex. The primary attribute is just the Name of the Company. If the hex is the starting (or destination, for games like 1856 and 1870), those are marked with a Start or Destination true/false attribute. I think that covers the majority of cases. I'm sure there's a bunch of things not covered by this syntax. Thoughts? ---Brett -----Original Message----- From: wak...@ea... Sent: Jul 15, 2005 5:23 AM To: rai...@li... Subject: Re: [Rails-devel] Update I've just committed an initial XML map file for 1830 into CVS. The XML syntax is still fairly rudimentary at this point, but it's a starting point. Please check it out of CVS and let me know what you think. ---Brett. -----Original Message----- From: wak...@ea... Sent: Jul 13, 2005 11:28 PM To: rai...@li... Subject: [Rails-devel] Update It's been a while since we've seen much traffic on the list. I've been slowly poking and prodding the Hex code into submission. Right now, I've got a working test class for it in CVS. Essentially it's just a stripped down version of the Colossus code. I've stripped out all of the Colosssus-specific bits. So, now it's ready for us to extend it to fit our own needs. The todo list I've got so far for the HexMap looks something like this: # Define map XML specification # Generate map XML files # Need to create classes for loading the map files. # Decide whether to draw hexes using Drawing2D or use loaded graphics overlayed on top of the hex panel. # Decide on tile XML specification # Generate tile XML files # Create code for placing tiles ------------------------------------------------------- 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 |