From: Brett L. <wak...@ea...> - 2005-09-22 23:43:32
|
Ok... with the latest batch of commits... here's a rough overview of the map's status: Things that work: 1. 1830 map lays out completely correctly. 2. Clicking a hex rotates it... sorta. There's an array count bug here so the first click doesn't hit the next array value, but the beginning of the array. Things that need fixing: 1. The rotation values are HIGHLY scale-dependant. There's still quite a bit of work left to do here. 2. We need a few more hex images to represent these things: all water, coastline with some water, rivers. The 1870 map just doesn't look quite right otherwise. ;-) 3. Hex orientation needs to be added to all other game's map.xml Things not yet implemented: 1. Building lists of tiles: allYellow, allGreen, allBrown, validUpgradesFrom(tileNumber), validUpgradesTo(tileNumber) 2. (re)Placing new tiles over existing map tiles. 3. Anything related to track, such as checking track placement validity. Just a reminder for those that lurk on the list here: New contributions are always welcome. There's plenty of work left to do. Check out the code from cvs, and e-mail me your changes (preferably as unified diffs). ---Brett. -----Original Message----- From: Brett Lentz <wak...@ea...> Sent: Sep 22, 2005 3:15 PM To: rai...@li... Subject: RE: [Rails-devel] Tiles are working... sorta. Sure, I'll massage it a bit and see if I can get it working better. ---Brett. -----Original Message----- From: Erik Vos <eri...@hc...> Sent: Sep 22, 2005 3:02 PM To: rai...@li... Subject: RE: [Rails-devel] Tiles are working... sorta. I have added 3 lines to GUIEWHex to use the orientation codes that I have just added: x_adjust = x_adjust_arr[tileOrientation]; y_adjust = y_adjust_arr[tileOrientation]; rotation = rotation_arr[tileOrientation]; af.rotate(rotation); This does not do the job, but you can see in the map that something is happening. I've probably not done the right thing, or maybe the array values are not yet good. Can you sort it out from here? It's bed time for me... Erik. > -----Original Message----- > From: rai...@li... > [mailto:rai...@li...] On Behalf Of Erik Vos > Sent: 22 September 2005 22:54 > To: rai...@li... > Subject: RE: [Rails-devel] Tiles are working... sorta. > > I've done it a little bit different: a new method > setTileOrientation() in GUIHex. > > Please update as well because I fixed two minor compilation errors > on my side (the BICUBIC problem and a missing getContentPane(). in > MapWindow. > Guess it's my Java version.... > > Erik. > > > -----Original Message----- > > From: rai...@li... > > [mailto:rai...@li...] On Behalf > Of Erik Vos > > Sent: 22 September 2005 22:24 > > To: rai...@li... > > Subject: RE: [Rails-devel] Tiles are working... sorta. > > > > One little problem: > > My version of java (1.4.2) does not have > > AffineTransformOp.TYPE_BICUBIC, > > I have replaced it for now by AffineTransformOp.TYPE_BILINEAR. > > > > Another problem is that the map does not repaint correctly > > when the window regains focus. > > > > How are we going to specify rotation? > > I suggest to add an extra int argument to the GUIEWHex constructor, > > which can range from 0-5 which indicates the number of 60 degrees > > clockwise turns to get at the actual orientation. > > > > I suppose af.rotate() does the turning? Why is it 0.5 now? > > Not clear to me how to tweak it to get our 60/120/180 deg rotations. > > > > I'm now going add the rotations to the 1830 hex map based > > on the current output. > > > > Erik. > > > > > -----Original Message----- > > > From: rai...@li... > > > [mailto:rai...@li...] On Behalf Of > > > Brett Lentz > > > Sent: 22 September 2005 00:24 > > > To: rai...@li... > > > Subject: RE: [Rails-devel] Tiles are working... sorta. > > > > > > Sounds fine by me. I hope seeing the fully drawn game maps > > > is at least a little inspiring. ;-) > > > > > > I've added an ImageLoader class so that we only load tile > > > images once rather than reread every file for every repaint. > > > Currently it's instantiated in HexMap, but I'm not > > > completely certain it will be able to stay there. It might > > > need to move to MapManager or some other place. > > > > > > I've added a BufferedImage and AffineTransform to GUIHex. > > > This is where we'll control the image's rotation and scaling. > > > > > > I've mentioned previously that I've added a Paint() method to > > > GUIEWHex that extends the Paint() method in GUIHex. This > > > will contain the hard-coded numbers for rotation and scaling. > > > > > > > > > > > > ---Brett. > > > > > > > > > > > > -----Original Message----- > > > From: Erik Vos <eri...@hc...> > > > Sent: Sep 21, 2005 3:08 PM > > > To: rai...@li... > > > Subject: RE: [Rails-devel] Tiles are working... sorta. > > > > > > > Things that aren't working yet: > > > > > > > > 1. We haven't defined the hex orientation in map.xml, so some > > > > of the map tiles aren't rotated properly. > > > > > > That I had planned to do when tiles would be displayable: > > > trying out the right rotation codes by trial and error (!). > > > So now is the time to start working on that. > > > > > > > 2. There's a few different things causing huge performance > > > > hits for drawing all tiles. > > > > > > > > 3. There's currently no interactivity with the map. > > > > > > > > Soon we'll need to build the logic for rotating through legal > > > > tiles. Is there already a method defined for obtaining arrays > > > > of tiles, such as an array of all yellow tile IDs? > > > > > > No, Tiles.xml is not read yet. But I think this file has > > the necessary > > > ingredients to create an internal representation of each tile's > > > nodes and tracks in terms of objects and relations between objects > > > (although I have some vague ideas on how it could be done). > > > > > > I'll look at what you have now tomorrow, maybe it inspires me to > > > something.... > > > > > > Erik. > > > > > > > > > > > > > > > ------------------------------------------------------- > > > SF.Net email is sponsored by: > > > Tame your development challenges with Apache's Geronimo App > > > Server. Download > > > it for free - -and be entered to win a 42" plasma tv or > > your very own > > > Sony(tm)PSP. Click here to play: > > http://sourceforge.net/geronimo.php > > > _______________________________________________ > > > Rails-devel mailing list > > > Rai...@li... > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > > > > > > > ------------------------------------------------------- > > > SF.Net email is sponsored by: > > > Tame your development challenges with Apache's Geronimo App > > > Server. Download > > > it for free - -and be entered to win a 42" plasma tv or > > your very own > > > Sony(tm)PSP. Click here to play: > > http://sourceforge.net/geronimo.php > > > _______________________________________________ > > > Rails-devel mailing list > > > Rai...@li... > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > > > > > > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: > > Tame your development challenges with Apache's Geronimo App > > Server. Download > > it for free - -and be entered to win a 42" plasma tv or > your very own > > Sony(tm)PSP. Click here to play: > http://sourceforge.net/geronimo.php > > _______________________________________________ > > Rails-devel mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App > Server. Download > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > > ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Rails-devel mailing list Rai...@li... https://lists.sourceforge.net/lists/listinfo/rails-devel ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Rails-devel mailing list Rai...@li... https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Erik V. <eri...@hc...> - 2005-09-23 21:19:21
|
> Ok... with the latest batch of commits... here's a rough > overview of the map's status: > > Things that work: > > 1. 1830 map lays out completely correctly. > 2. Clicking a hex rotates it... sorta. There's an array > count bug here so the first click doesn't hit the next array > value, but the beginning of the array. Nevertheless this is quite an achievement! > Things that need fixing: > > 1. The rotation values are HIGHLY scale-dependant. There's > still quite a bit of work left to do here. > 2. We need a few more hex images to represent these things: > all water, coastline with some water, rivers. The 1870 map > just doesn't look quite right otherwise. ;-) We could create full water hexes to spice things up a bit. But to create nice coastlines I think we should follow my earlier suggestion to create a single image that represents the whole map with all details, including the preprinted tiles. We would still have the preprinted tiles as separate objects (the current situation), but not display them on top of the map. These objects would then only exist to define the possible upgrades. > 3. Hex orientation needs to be added to all other game's map.xml I'll do that first thing now. > Things not yet implemented: > > 1. Building lists of tiles: allYellow, allGreen, allBrown, > validUpgradesFrom(tileNumber), validUpgradesTo(tileNumber) Not sure if we need "all" arrays per colour. The upgrade rules define what tiles are in play, regardless (but of course honouring) the tile colours, with the restriction that certain colours only become valid upgrades from certain phases (Phase is not implemented either). The upgrades are already defined, but not yet read. > 2. (re)Placing new tiles over existing map tiles. I would like a menu of valid upgrade tiles becoming available along one of the map borders when an upgradeable tile is clicked. Clicking (or dragging) one of these tiles would move it to the "active" hex. Clicking on that hex then then rotate the tile through its valid orientations. Also a "cancel" button is needed. > 3. Anything related to track, such as checking track > placement validity. 4. A tag or attribute to define impassable hexsides where upgradeable hexes border each other (e.g. C11/D12 in 1830) should be added to Map.xml. Perhaps a tag like <Hex name="C11" ....> <NoGo name="D12"/> </Hex> Erik. |
From: Erik V. <eri...@hc...> - 2005-09-23 21:52:15
|
> > 2. We need a few more hex images to represent these things: > > all water, coastline with some water, rivers. The 1870 map > > just doesn't look quite right otherwise. ;-) Glad you didn't notice that the even rows were shifted with respect to the odd rows! That was a bug in game.MapHex. 1870 is OK now. 1856 and 18AL I can do if the NS map hexes are done, which you apparently are working on. I was also trying to make the rotation values mathematically correct, but your updates crossed mine. If you declare public final double static DEG60 = Math.PI/3, (60 degrees = pi/3 radians) then the rotation is simply - for NS hexes: tileOrientation * DEG60 - for EW hexes: (0.5+tileOrientation) * DEG60 so you don't need an array anymore. Erik. |