Page 1 of 2

SVG's ...

Posted: 21 Feb 2007, 03:48
by zick
for those of you who read my posts on irc in regards to using svg's, i will use this thread as a knowledge base for everything pertaining to svg's that will be used in some forked version of tmw (or of the real thing, if support is added) ... this is an RFC (request for comments) situation, please feel free to voice your opinions.

i will post some svg's that i'm working on here soon (a week maybe), so stay tuned.

also people may ask "why SVG's?" ... here is my answer:
  • - svg's can be resolution independent, they both work on a monitor with an 800x600 monitor or the nice high-def one i'm using and can be scaled to fit on each without any loss in detail

    - because they're resolution independent, at some point in the future dynamic zoom effects can be added (like when you perform a special attack) and it won't be a blocky zoom (1 pixel becoming 4 pixels) or a blocky filtered zoom which can be processor intensive on low-end machines

Posted: 21 Feb 2007, 04:02
by zick
also interesting link for code developers (as opposed to artists):
http://www.khronos.org/openvg/
looks like an api related to opengl ... i'm not sure if opengl is in play here or not, but i thought i'd mention it. this api is a vector graphics accelerator ...

Re: SVG's ...

Posted: 21 Feb 2007, 13:11
by Modanung
zick wrote:...or a blocky filtered zoom which can be processor intensive on low-end machines
I think real-time SVG may be more processor intensive.

Posted: 21 Feb 2007, 21:34
by zick
well, it does work somehow for flash player, although flash has some botlenecks of it's own ... and isn't really that good at networking with other players (that's why you don't see any flash mmo's)

Posted: 21 Feb 2007, 22:36
by i
SVG isnt a good idea. Rendering consumes a really large amount of procesor time. Perosonally I'm enthusiast of SVG, but not in this case.

Posted: 22 Feb 2007, 01:36
by zick
what about with that openvg api thingamajiggy ... that looks like they're saying it doesn't use the normal system processor, but does use gpu on your graphics card.

Posted: 25 Feb 2007, 14:43
by Bjørn
I would imagine we'd just pre-render the SVG after which it's just another bitmap or texture which renders are the same speed as everything else. Of course when the size changes it will need to be re-rendered from the SVG but currently nothing changes size in TMW.

Re: SVG's ...

Posted: 24 Jun 2009, 11:56
by displague
Is this really a dead topic?

Gnome uses SVG very extensively for the the desktop environment. Way back in 2003, SVG renders were beginning to beat out PNG: http://developers.slashdot.org/article. ... /03/129215

SVG offers you the image source which has more value than a rendered bitmap. Use the make process to build the PNGs from SVG if needed, but for reuse and editing sake, an SVG is certainly better to have.

FreeCiv uses SVG for some elements but the main reason it has not been fully adopted is that the complete tile-set was never officially reimplementing in SVG ( https://mail.gna.org/public/freeciv-dev ... 00014.html ). I remember using various partial SVG contributions and liking them.

Is this thread just out of date? Is SVG still on the table?

Posted: 24 Jun 2009, 12:04
by displague
i wrote:Rendering consumes a really large amount of processor time.
(tooma) If you were to implement SVG, I imagine that renderers would be cached and you would then clone those and apply simply modifications (color, insignia) to them. Rendering complete costumes could probably take advantage of layering (somehow better than pixmaps?).

XSLT and Javascript for attack / spell effects! Oh, come on!

Re: SVG's ...

Posted: 24 Jun 2009, 17:36
by octalot
If you're going for vector graphics and cached renders, why not go for full 3D graphics (drawing a 2D world)?

I think it would create a very different look to the current game; while it would look good it would need to be a total conversion, otherwise the vector bits would look odd.

Re: SVG's ...

Posted: 24 Jun 2009, 21:07
by Crush
octalot wrote:If you're going for vector graphics and cached renders, why not go for full 3D graphics (drawing a 2D world)?
No.

Re: SVG's ...

Posted: 25 Jun 2009, 13:48
by displague
After a little more thought on the matter, SVG might be a step towards making an HTML5 / Canvas based client. It could still be done with PNG, but wouldn't that be cool!

I am making the assumption (from a quick glance at the source and reports of DDoS) that all server communication is done via HTTP/XML.

For that matter (getting off topic), do tools exist to create The Mana World badges? As in, can I use a utility account to poll a player status appearance, level, etc? Would that cause the server to have to render the image - that probably wouldn't be idea. But if each characters rendering is already cached somewhere - with a proper HTTP expiration header, then it shouldn't be too bad (especially if you can get image mirroring). I realize this is a little more complicated because the badge should probably follow every change in attire, but it could be a daily snapshot (based on HTTP expirations or public cache file updates).

Re: SVG's ...

Posted: 25 Jun 2009, 14:25
by Crush
displague wrote:I am making the assumption (from a quick glance at the source and reports of DDoS) that all server communication is done via HTTP/XML.
This assumption is wrong.

The gameplay netcode uses neither HTTP nor XML.

Re: SVG's ...

Posted: 25 Jun 2009, 14:51
by displague
Well, that's not a deal breaker. Javascript can find other ways of communicating or a server interface to HTTP clients could be made.

Re: SVG's ...

Posted: 25 Jun 2009, 15:11
by Crush
A web-based client would still be a complete redevelopment of what we did in the last 5 years.

When you think that you can pull it off: Sure, go on. But don't count on the other developers to do the work for you.