PlaneShift

Gameplay => Wish list => Topic started by: Gilrond on January 11, 2011, 09:49:09 pm

Title: Using SVG for maps
Post by: Gilrond on January 11, 2011, 09:49:09 pm
I tried to load a map into a blank one, but it expects it's own internal format. Using the built in editor is a rather painful process. May be you can switch to using SVG? It's a perfect generic vector graphics XML format. In such case one can create maps in any editor, and then just load them into the empty game map! This convenience is enabled for books, why not enable it for maps too?
Title: Re: Using SVG for maps
Post by: weltall on January 12, 2011, 12:27:57 am
1) it's complex and heavy (64k is the max for a packet it can't be overrun without a major blow to the net code)
2) not all it's primitives are available as primitive to the g2d backend, plus emulating them would be extremely expensive and would require implementation of r2t in order to have decent performance (fill is an example)
3) there are convertors.
Title: Re: Using SVG for maps
Post by: Gilrond on January 12, 2011, 01:16:13 am
So a convertor from SVG to PS maps XML format is available? Where can it be downloaded? And as I understood, the final map file shouldn't exceed 64k?

If packet size is the issue, XML can be compressed by the way.
Title: Re: Using SVG for maps
Post by: weltall on January 12, 2011, 06:43:06 am
search for it in this forum. yes it shouldn't. libz from time to time is affected from code execution exploits and we don't want big maps in the db.
Title: Re: Using SVG for maps
Post by: Tumaini on January 12, 2011, 10:44:51 am
Here is an SVG<->PlaneShift Sketch XML script in Ruby.
http://www.hydlaaplaza.com/smf/index.php?topic=35557.0
Title: Re: Using SVG for maps
Post by: Vakachehk on January 12, 2011, 01:39:46 pm
Here is an SVG<->PlaneShift Sketch XML script in Ruby.
http://www.hydlaaplaza.com/smf/index.php?topic=35557.0

Well I have tried using Ruby and have NO IDEA how to get it to work. So I gave up, even after talking with other people.

So I'm still stuck from the beginning how do I make a picture and convert it onto a map into PS?
Title: Re: Using SVG for maps
Post by: weltall on January 12, 2011, 06:35:50 pm
script.rb ./file.svg ./gamefile.xml?
Title: Re: Using SVG for maps
Post by: Gilrond on January 12, 2011, 07:29:06 pm
Thanks, it worked! It converted some simple SVG to PS xml map. Now I just need to figure out which SVG elements are supported.
Title: Re: Using SVG for maps
Post by: Gilrond on January 12, 2011, 07:35:50 pm
For those who are interested, it seems that script only supports path, line, rect, image, g elements from SVG.