From: Stefan F. <ste...@we...> - 2014-04-26 09:50:02
|
My own thoughts on this topic: * The important contribution of Marcos Tile Designer is not so much the UI tool itself, but the Tile definitions in file "TileDictionary.18t". * The process from "TileDictionary.18t" to the game specifics "Tiles.xml" is detailed here: https://sourceforge.net/apps/mediawiki/rail/index.php?title=Tile_creation * Access to Marcos and Johns code would be really helpful to avoid re-inventing the wheel again. I will send Marco an e-mail if he allows us to take a look at it. John, if you would share the code, it would be great. Maybe you could send it to one of the admins (Brett or myself)? * My proposal is to define tiles manually using the syntax we already have in Tiles.xml (instead of the one used in .18t, but keep in mind that this is only a different syntax to Marco, the content is identical). Take the example of tile 57 (straight city): <Tile colour="yellow" id="57" name="57"> <Station id="city1" position="0" slots="1" type="City" value="20"/> <Track from="city1" gauge="normal" to="side3"/> <Track from="city1" gauge="normal" to="side0"/> </Tile> This contains all information needed to generate a SVG from it. As John said this only requires rules for tracks/cities/token slots. By adopting different styles it would even be possible to support different layouts based on the same definitions. * For Rails 2.0 I have already simplified the handling of svg to some extent. My intention is to replace the current svg library (batik) by one which has a smaller footprint, is simpler to use and compatible with Android and/or JavaFX. Most likely this will happen at 2.1 / 2.2. However this is no precondition for a own svg-engine. * Some simplification of the map display code was done as well (mainly by factoring out code into MapOrientation class). However I still intend to refactor that even more. Again this is no precondition, but it a own SVG engine would really be helpful to make map painting easier. Currently the SVG tiles and the map code exist in two different worlds, loosely speaking ;-) * Hand-made graphics should be the exception and should be defined in plain svg. Most vector graphic programs (including inkscape) are able to save in "plain" svg, instead in their more bloated own svg based format. Question is if there is someone who would like to implement a tile to svg engine for Rails? It requires no detailed knowledge of any 18xx game, however some Java/svg/xml experience. I can offer my help and as mentioned some time ago, I have a duplicate version of http://www.amazon.com/SVG-Unleashed-Andrew-H-Watt/dp/0672324296 that I am willing to ship free-of-charge to a volunteer. The book is not perfect by any means, but I like it is a reference. However the available documentation on svg on the net covers every aspect needed for the task. If no one else is interested, it will be on my own list of to-dos after rails 2.0 is out. Stefan On 04/23/2014 02:09 AM, brett lentz wrote: > > On Tue, Apr 22, 2014 at 10:52 AM, John A. Tamplin <ja...@ja... > <mailto:ja...@ja...>> wrote: > > On Tue, Apr 22, 2014 at 9:54 AM, brett lentz <bre...@gm... > <mailto:bre...@gm...>> wrote: > > That's a tricky issue. It would be really nice if TileDesigner > were open sourced, so that we could update it. > > > Hmm, it's not? At least Marco sent it to me when I asked. > > > Unless the code has an explicit OSS license assigned that's compatible > with the license used by Rails, we can't really use Marco's code even if > you have it. > > However, it is written in Delphi. For my use, I reimplemented it in > perl, and that is still what I use to generate the production tiles. > Of course, the goals for printing are different than for screen > (and I made a number of changes to be able to generate print-ready > output and more complex tiles), but I generate PostScript from the > tile definitions and SVG wouldn't be hard (basically at the > rendering stage you have methods for drawing an arc, circle, etc). > > > Yep. Jumping from Postscript to SVG is pretty easy. IIRC, Perl has > GSAPI, which hooks into Ghostscript and can do that heavy-lifting. > > > Several years ago I started porting it to Java for use in Rails, but > I didn't have time to finish it. If someone wants to take that > and/or the perl code and modify I would be happy to send what I have > (assuming I can find the Java port :). > > > If you're willing to contribute your Perl and/or Java code under the GPL > v2+ license that Rails uses, we can probably make use of it. Posting the > code to the list is a reasonable way to start. > > It might be possible to develop some SVG templates for each of > the components of a tile. That would allow us to assemble new > tiles in Inkscape using a standardized set of primitives on a > standardized image base. > > > I don't think you want to get in the business of hand-drawing tiles. > Aside from consistency issues, you will also have to redraw every > single tile if you decide to change some aspect - I think generating > them from some tile description is the way to go. > > > I agree. It's not ideal, but implementing our own tile drawing engine is > also not very appealing. ;-) > > The nice thing about using SVG is that certain classes of problems are > at least a non-issue, when compared to the bitmap-based tile sets. > > -- > John A. Tamplin > > > ---Brett. > > > ------------------------------------------------------------------------------ > Start Your Social Network Today - Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet - Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platform > http://p.sf.net/sfu/ExoPlatform > > > > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |