From: Erik V. <eri...@xs...> - 2011-06-11 10:37:59
|
Stefan, Thanks for picking this up. I knew it had to be done, but was indeed trusting upon you. Erik. > -----Oorspronkelijk bericht----- > Van: Stefan Frey [mailto:ste...@we...] > Verzonden: zaterdag 11 juni 2011 8:08 > Aan: Development list for Rails: an 18xx game > Onderwerp: Re: [Rails-devel] Background Maps > > The background map can now be activated in the configuration menu in the > Map/Report section. > The required changes are summarized below for future reference. > I will move this example to the wiki with some more instructions on the > configuration menu. > Stefan > > > To be supported in the configuration menu a new entry requires the > following: > A) An XML definition in data => Properties.xml > > B) A default value in data.profiles => default.profile > > C) A menu text in LocalisedText.properties Prefix is Config.label. followed by > the property name > > For this example here: > A) > <Property name="map.image.display" type="BOOLEAN" /> in section UI > > B) > map.image.display=no > > C) > Config.label.map.display=Display background map > > > > > On Tuesday, June 07, 2011 06:04:37 pm Erik Vos wrote: > > OK, I have committed the current code, which includes an SVG > > background map for 18EU (contributed by Bill Rosgen, IIRC). > > > > To enable seeing the map, one entry needs be added to your custom > > my.properties file (I haven't tried to update the configuration menu yet): > > - map.image.display=yes (default no, in which case everything works > > as before). > > > > I have included Bill Rosgen's patch to highlight selected hexes > > somewhat differently. Currently, it only affects display when the map is > used. > > The original highlighting looks ugly in this case. > > > > Please don't Zoom in serious play when the map image is used: it does > > not yet work as it should. When I try, the tiles rescale correctly, > > and so does the map image, but the latter soon gets out of sync. > > > > It's not clear to me how JSVGCanvas rescaling+resizing should be > > programmed the right way. A scaling affine transform works fine, which > > is what I used initially. But it not change the canvas size, so part > > of the map becomes invisible on zooming in. Only setting the canvas > > bounds (setBounds()) initially does the whole job, and this is what > > I'm currently using. But on repeated zooming actions, it seems to > > rescale the map image only every other time. Doing both (scale and > setBounds) upscales the map twice. > > > > It may be a matter of timing, and perhaps some listener should be > > invoked, but I cannot find any pointer on what exactly would be needed. > > > > Erik. > > > > > -----Oorspronkelijk bericht----- > > > Van: Erik Vos [mailto:eri...@xs...] > > > Verzonden: dinsdag 7 juni 2011 13:57 > > > Aan: 'Development list for Rails: an 18xx game' > > > Onderwerp: Re: [Rails-devel] Background Maps > > > > > > I fully agree that this is the way to go for the future. > > > In the meantime, I will commit my and some of Bill's work on the map > > > image integration (imperfect as it currently is), trusting that you > > > will ultimately also be able to integrate SVG map images into your work. > > > > > > Erik > > > > > > > -----Oorspronkelijk bericht----- > > > > Van: Adam Badura [mailto:ab...@o2...] > > > > Verzonden: dinsdag 7 juni 2011 7:38 > > > > Aan: Development list for Rails: an 18xx game > > > > Onderwerp: Re: [Rails-devel] Background Maps > > > > > > > > OK. Great. Then I shell continue this work. Yet I cannot promise > > > > when it will be done. But I will try to report on progress every > > > > now and then. > > > > > > > > Adam Badura > > > > > > > > -----Oryginalna wiadomość----- > > > > From: brett lentz > > > > Sent: Tuesday, June 07, 2011 6:31 AM > > > > To: Development list for Rails: an 18xx game > > > > Subject: Re: [Rails-devel] Background Maps > > > > > > > > I think this is an excellent direction to continue working on. > > > > > > > > The patch looks like it consolidates a bunch of code into a couple > > > > of classes, which looks good on first glance. > > > > > > > > I'd definitely like to see the finished patch once you're ready > > > > for it to be merged into the codebase. > > > > > > > > ---Brett. > > > > > > > > On Mon, Jun 6, 2011 at 2:45 PM, Adam Badura <ab...@o2...> wrote: > > > > > Sorry for the delay but I decided to adapt the patch to current > > > > > code revision and have a look whether it does what I recall it > > > > > did. Also I removed some additional works on symbols which I was > > > > > doing along (this was the reason to start this work) but would > > > > > be only distracting now. > > > > > > > > > > The code is mostly not documented as it is a working patch. Its > > > > > not also "clean". But it does show that SVG Document isn't that hard. > > > > > (To scroll or zoom use standard Batik components ways: > > > > > Shift/Ctrl + moves with mouse buttons pressed.) > > > > > > > > > > So what do you think? Should I continue my work in this area? > > > > > > > > > > Adam Badura > > > > > > > > > > -----Oryginalna wiadomość----- From: Erik Vos > > > > > Sent: Monday, June 06, 2011 2:43 PM > > > > > To: 'Development list for Rails: an 18xx game' > > > > > Subject: Re: [Rails-devel] Background Maps > > > > > > > > > > Adam, > > > > > > > > > > Congratulations with your second child! > > > > > > > > > > I'm certainly interested to have a look at your code, to check > > > > > if I can merge it with my map display code. > > > > > > > > > > Some more comments below. > > > > > > > > > >> -----Oorspronkelijk bericht----- > > > > >> Van: Adam Badura [mailto:ab...@o2...] > > > > >> > > > > >> I was working on moving entire drawing to SVG (and this was > > > > >> one > > > > >> > > > > >> of the reasons I tried to push Batik 1.7). But recently my > > > > >> second child was born and there is some little chaos in my life > > > > >> with not much time for such tasks. > > > > >> I still have SVN Patch yet it is already conflicting at some > > > > >> places with new code. > > > > >> > > > > >> What I managed to get was to create an SVG document > > > > >> containing > > > > >> > > > > >> map (all the tiles, either from map or track tiles). It looked > > > > >> significantly better than our previous drawing mechanism. While > > > > >> it was much less and much simpler code. > > > > >> Also it scaled nicely. > > > > >> > > > > >> What the code was missing was: > > > > >> (1) drawing station tokens, > > > > >> (2) drawing train paths, > > > > >> (3) handling scaling and scrolling well, > > > > >> (4) support tile selection. > > > > >> > > > > >> First two would likely require some "hacking" as there is no > > > > >> > > > > >> easy way currently to do it in SVG Document as there is not > > > > >> "specification" of tracks and stations on an SVG tile. But > > > > >> previous code did it somehow and I guess that solution could be > > > > >> used with SVG Document as well until (if ever) SVG tiles will > > > > >> receive better description. (That is a topic interesting on its > > > > >> own...) > > > > > > > > > > The tracks and the token spot locations are also (somewhat > > > > > cryptically) defined in Tiles.xml, and these definitions are > > > > > currently used to draw the train paths and tokens. > > > > > For the time being (or perhaps forever) that can be left as is, > > > > > drawing these objects in the top layer of the JLayeredPane that > > > > > I'm currently using. > > > > > However, that would still require achieving correct alignment of > > > > > the two layers after zooming. > > > > > > > > > >> I tries to handle third by using JSVGSrolledPane (or > > > > >> something > > > > >> > > > > >> called > > > > >> similarly) but didn't achieve much. Then I had to interrupt my > > > > >> investigations. > > > > > > > > > > I have also been thinking about JSVGScrolledPane, but I think > > > > > using that will only become possible once we manage to do all > > > > > drawing via > > > > > > JSVG. > > > > > > > >> Fourth should be easy as Batik provides some events to > > > > >> detect > > > > >> > > > > >> this. I expect this could be even easier then current mouse > > > > >> handling. Borders around selected or marked tiles could likely > > > > >> be achieved easily with CSS in the SVG Document. > > > > > > > > > > Sounds good. > > > > > > > > > > Erik. > > > > > > > > > > > > > > > ---------------------------------------------------------------- > > > > > ---- > > > > > -- > > > > > -------- Simplify data backup and recovery for your virtual > > > > > environment with vRanger. > > > > > Installation's a snap, and flexible recovery options mean your > > > > > data is safe, secure and there when you need it. Discover what > > > > > all the cheering's about. > > > > > Get your free trial download today. > > > > > http://p.sf.net/sfu/quest-dev2dev2 > > > > > _______________________________________________ > > > > > Rails-devel mailing list > > > > > Rai...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > ---------------------------------------------------------------- > > > > > ---- > > > > > -- > > > > > -------- EditLive Enterprise is the world's most technically > > > > > advanced content authoring tool. Experience the power of Track > > > > > Changes, Inline Image Editing and ensure content is compliant > > > > > with Accessibility Checking. > > > > > http://p.sf.net/sfu/ephox-dev2dev > > > > > _______________________________________________ > > > > > Rails-devel mailing list > > > > > Rai...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > > > ------------------------------------------------------------------ > > > > ---- > > > > -------- EditLive Enterprise is the world's most technically > > > > advanced content authoring tool. Experience the power of Track > > > > Changes, Inline Image Editing and ensure content is compliant with > > > > Accessibility Checking. > > > > http://p.sf.net/sfu/ephox-dev2dev > > > > _______________________________________________ > > > > Rails-devel mailing list > > > > Rai...@li... > > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > > > > > > > ------------------------------------------------------------------ > > > > ---- > > > > -------- EditLive Enterprise is the world's most technically > > > > advanced content authoring tool. Experience the power of Track > > > > Changes, Inline Image Editing and ensure content is compliant with > > > > Accessibility Checking. > > > > http://p.sf.net/sfu/ephox-dev2dev > > > > _______________________________________________ > > > > Rails-devel mailing list > > > > Rai...@li... > > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > > -------------------------------------------------------------------- > > > ----- > > > ----- EditLive Enterprise is the world's most technically advanced > > > content authoring tool. Experience the power of Track Changes, > > > Inline Image Editing and ensure content is compliant with > > > Accessibility Checking. > > > http://p.sf.net/sfu/ephox-dev2dev > > > _______________________________________________ > > > Rails-devel mailing list > > > Rai...@li... > > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > ---------------------------------------------------------------------- > > ----- > > --- EditLive Enterprise is the world's most technically advanced > > content authoring tool. Experience the power of Track Changes, Inline > > Image Editing and ensure content is compliant with Accessibility Checking. > > http://p.sf.net/sfu/ephox-dev2dev > > _______________________________________________ > > Rails-devel mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image Editing > and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Adam B. <ab...@o2...> - 2011-08-18 09:49:56
|
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 |
From: Erik V. <eri...@xs...> - 2011-08-18 10:47:33
Attachments:
tile57.txt
|
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 |
From: Adam B. <ab...@o2...> - 2011-08-18 10:49:12
|
Yes. I know all that. -----Oryginalna wiadomość----- From: Erik Vos Sent: Thursday, August 18, 2011 12:47 PM To: 'Development list for Rails: an 18xx game' Subject: Re: [Rails-devel] batik and svg documents (was: Background Maps) 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 |
From: Stefan F. <ste...@we...> - 2011-08-18 10:53:35
|
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 |
From: Erik V. <eri...@xs...> - 2011-08-18 11:04:40
|
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 |
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 |
From: Erik V. <eri...@xs...> - 2011-08-19 08:38:17
|
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 |
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 |