From: Stefan F. <ste...@we...> - 2011-08-20 07:03:18
|
Erik: sure, but if I remember my usage of the TileDesigner correctly, there were only a finite number of possible positions allowed (something like three circles intersecting with 6 polar angles). In TileDictionary.xml those position definitions are contained already. Thus from my point of view it is possible to create the track configuration of tiles for SVG dynamically. And I was never really happy how TileDesigner allowed to specify labels or at least I was unable to get the desired result. Different to boardgames in Rails labels could (and should) be separated from track configuration. Thus it should be possible to define that tile y is identical to tile x except that there is a label added at this position. So the tiles defined would only contain track configurations and we would avoid to create a new tile only for a different label. I would even go further and use that principle for different values too (So tile y is identical to tile x except that city 1 has a different value). In a sense we could think about allowing abstract tiles, which only show track and cities with no value defined and then have concrete tiles "inherit" the track/stop configurations and then add values and labels. And all this should be possible without a GUI, as I avoid coding GUIs (I either prefer using designers or automatic configurations), as in my experience the time spent on the UI often exceeds that of the underlying algorithms by a large multiple. Especially as for viewing/editing the finished SVG GUIs already exist, is fine-tuning is an issue. This is not an urgent issue on my list, but it might be a good idea for Rails 2.x series, where we will have some time to experiment and can for some issues drop (full) backward compatibility. Stefan On Friday, August 19, 2011 10:38:42 am Erik Vos wrote: > Ah, but once we have a CreateTileSVG class, we already have most of that > GUI done. This is the hard part. Don't forget that we also need > - position(s) of the revenue indicator(s), > - position and contents of any labels. > > The current "position" parameter is an encoded version of the TileDesigner > name for the predefined positions of stops and other features. The > predefined positions of cities in curved tracks have been carefully > selected to produce pretty results. It won't be easy to get that right > without a GUI, or by at least replicating these predefined positions. > > Erik. > > > -----Original Message----- > > From: Stefan Frey [mailto:ste...@we...] > > Sent: Friday, August 19, 2011 7:54 AM > > To: Development list for Rails: an 18xx game > > Subject: Re: [Rails-devel] batik and svg documents (was: Background Maps) > > > > Erik, > > > > I think you do not need a GUI to create an XML like this: > > <Tile colour="green" id="12" name="12"> > > > > <Station id="city1" position="0" slots="1" type="City" > > > > value="30"/> > > > > <Track from="city1" gauge="normal" to="side1"/> > > <Track from="city1" gauge="normal" to="side2"/> > > <Track from="city1" gauge="normal" to="side3"/> > > > > </Tile> > > > > All information you would need to know to create a SVG for such a tile is > > where the city is located. > > > > (so think position = "..." > > or positionX = ... and positionY= ... > > or positionL=... and positionTheta=... > > for polar coordinates, something I would prefer). > > > > Everything else is style information: Stroke for the tracks, Circle > > diameter for the city, text styles for the value and tile id etc. > > > > And the SVG itself is created by a createTileSVG class. I believe it > > would be fast enough that it could be done on the fly at start-up. > > > > Stefan > > > > On Thursday, August 18, 2011 01:04:59 pm Erik Vos wrote: > > > I think you will still need some GUI to create that XML (which is > > > currently converted from the TileDesigner XML export), so with a > > > little extra effort you can as well have that GUI export the SVG as > > > well. Then we would have reengineered TileDesigner. I would love to > > > see that happen, but who is going to volunteer? > > > > > > Erik. > > > > > > > -----Original Message----- > > > > From: Stefan Frey [mailto:ste...@we...] > > > > Sent: Thursday, August 18, 2011 12:56 PM > > > > To: Development list for Rails: an 18xx game > > > > Subject: Re: [Rails-devel] batik and svg documents (was: Background > > > > Maps) > > > > > > > > Just a short comment (coming back from lunch hour at work): > > > > > > > > Maybe we should think the other around: Have a program define an SVG > > > > tile from the Rails' track and station definitions (maybe by adding > > > > some visual hints to that format). > > > > > > > > Ideally it would be able to create both sticky/standard visual > > > > appearance similar to what a style sheet does to html/xml code does. > > > > > > > > Actually it is possible to use a CSS with SVG documents, however I > > > > do not know by heart if batik supports that. > > > > > > > > Stefan > > > > > > > > On Thursday, August 18, 2011 12:47:52 pm Erik Vos wrote: > > > > > Nice idea, but I cannot find any ids in the SVG code (see attached > > > > > example of tile 57 - reformatted and renamed as text). And > > > > > unfortunately we don't have any control over the SVG XML format, > > > > > as we don't have the TileDesigner source code. > > > > > > > > > > Getting an open source tile designer program may be one of our > > > > > biggest needs. > > > > > > > > > > Erik. > > > > > > > > > > > -----Original Message----- > > > > > > From: Adam Badura [mailto:ab...@o2...] > > > > > > Sent: Thursday, August 18, 2011 11:49 AM > > > > > > To: 'Development list for Rails: an 18xx game' > > > > > > Subject: Re: [Rails-devel] batik and svg documents (was: > > > > > > Background > > > > > > Maps) > > > > > > > > > > > > And to fully benefit from the SVG model it would be great if the > > > > > > tile description had some mapping to SVG image of the tile. If > > > > > > for example station entry had an argument "svg-id" which would > > > > > > name identifier of SVG tile element which represents the > > > > > > station. Then the SVG map document code would not have to care > > > > > > that much about actual details of how the SVG makes the station > > > > > > (is it a single circle with border? or are those two circles of > > > > > > different radius wrapped in a an svg:g container? or whatever > > > > > > else...). It would know that it has to look for ID element and > > > > > > either replace it with station token element or to lay the > > > > > > station token element on the same position or whatever it likes. > > > > > > Yet it > > > > would be much easier. > > > > > > > > Another example is marking routes. If a route from edge X to > > > > > > edge Y would be realized by ID1, ID2, ... IDn elements in SVG > > > > > > the code could just change style of those elements (for example > > > > > > change color to Train 1 > > > > > > color) and expect the route to be marked well. > > > > > > > > > > > > If user clicks a station mark on SVG tile map manager will know > > > > > > ID of the "conceptual element" that was clicked and could easily > > > > > > in effect determine (based on the tile description) what was it. > > > > > > It easily transforms clicking "this white cirlce" into clicking > > > > > > NW station on a double station tile... > > > > > > > > > > > > -----Oryginalna wiadomość----- > > > > > > From: Erik Vos > > > > > > Sent: Thursday, August 18, 2011 11:39 AM > > > > > > To: 'Development list for Rails: an 18xx game' > > > > > > Subject: Re: [Rails-devel] batik and svg documents (was: > > > > > > Background > > > > > > Maps) > > > > > > > > > > > > > -----Original Message----- > > > > > > > From: Adam Badura [mailto:ab...@o2...] > > > > > > > Sent: Thursday, August 18, 2011 12:20 AM > > > > > > > To: 'Development list for Rails: an 18xx game' > > > > > > > Subject: Re: [Rails-devel] batik and svg documents (was: > > > > > > > Background > > > > > > > Maps) > > > > > > > > > > > > > > With SVG+XML I meant that (in my opinion) SVG should be used > > > > > > > purly for presentation. Tile "description" (like number of > > > > > > > stations, track connections between hex edges, stations on > > > > > > > that tracks, and so on...) should be stored separately (so not > > > > > > > to mix different tile > > > > > > > > aspects). > > > > > > > > > > > This also allows to easly use different tile "styles" without > > > > > > > need to change code that analyzes runs or finds possible tile > > > > > > > lays. > > > > > > > > > > > > I fully agree with that. Several games have hexes and tiles > > > > > > where the picture does not reflect the full connectivity > > > > > > function of that hex/tile. Examples: > > > > > > - PRR and Reading bases in the 1830 Coalfields and Reading > > > > > > variants, > > > > > > - Most off-map hexes, and specifically the 1856 Goderich and > > > > > > 18EU > > > > > > Hamburg: there is an undisplayed city on these hexes, that in > > > > > > the two cases mentioned can even be run through. > > > > > > - the sticky version of the brown plain track tiles in some > > > > > > games, like 18EU. In these cases the connectivity specification > > > > > > (in > > > > > > Tiles.xml) and the SVG picture are different, so the latter is > > > > > > unusable to base route calculations upon. > > > > > > > > > > > > Erik. > > > > > > > > > > > > > > > > > > ---------------------------------------------------------------- > > > > > > ---- > > > > > > ----- > > > > > > ----- Get a FREE DOWNLOAD! and learn more about uberSVN rich > > > > > > system, user administration capabilities and model > > > > > > configuration. Take the hassle out of deploying and managing > > > > > > Subversion and the tools developers use with it. > > > > > > http://p.sf.net/sfu/wandisco-d2d-2 > > > > > > _______________________________________________ > > > > > > Rails-devel mailing list > > > > > > Rai...@li... > > > > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > > > > > > > > > > > > > ---------------------------------------------------------------- > > > > > > ---- > > > > > > ----- > > > > > > ----- Get a FREE DOWNLOAD! and learn more about uberSVN rich > > > > > > system, user administration capabilities and model > > > > > > configuration. Take the hassle out of deploying and managing > > > > > > Subversion and the tools developers use with it. > > > > > > http://p.sf.net/sfu/wandisco-d2d-2 > > > > > > _______________________________________________ > > > > > > Rails-devel mailing list > > > > > > Rai...@li... > > > > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > > > -------------------------------------------------------------------- > > > > ----- > > > > ----- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > > > > user administration capabilities and model configuration. Take the > > > > hassle out of deploying and managing Subversion and the tools > > > > developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 > > > > _______________________________________________ > > > > Rails-devel mailing list > > > > Rai...@li... > > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > ---------------------------------------------------------------------- > > > ----- > > > --- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > > > user administration capabilities and model configuration. Take the > > > hassle out of deploying and managing Subversion and the tools > > > developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 > > > _______________________________________________ > > > Rails-devel mailing list > > > Rai...@li... > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > ------------------------------------------------------------------------- > > ----- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user > > administration capabilities and model configuration. Take the hassle out > > of deploying and managing Subversion and the tools developers use with > > it. http://p.sf.net/sfu/wandisco-d2d-2 > > _______________________________________________ > > Rails-devel mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > --------------------------------------------------------------------------- > --- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > user administration capabilities and model configuration. Take > the hassle out of deploying and managing Subversion and the > tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |