From: Stefan F. <ste...@we...> - 2011-08-19 05:51:29
|
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 |