SVG Game Engine – With Style!

SVG Game Engine now parses style attributes!

Ninja, now with 100% more Style (attribute)!

I decided to burn some midnight oil and get the style parsing working properly, since SVGLib doesn’t ever fill in the attributes.  Currently things like miter and join styles aren’t supported and it will break if you have stroke-width specified in pixels (with “px” at the end).  However, for my purposes it works great!  Here’s a screenshot of everyone’s favorite (well my favorite at least) ninja!

Advertisements

4 responses to “SVG Game Engine – With Style!

  1. Hi! I’m glad to know you’re continuing this project. Very interesting. How do you intend to handle animation? I mean: as Inkscape does not support animation yet, which tool will you be using?
    All the best…

  2. Thanks for the support 🙂 I plan on writing a skeletal animation system and a simple tool to do the posing and storing of keyframes. I may just abuse the SVG file and store the frames straight in there but maybe they’ll go in a separate file (not sure about that yet). I’m hoping the way I built the paths will lend well to a simple weighting system so I can simply interpolate between frames.

    I plan on working on a few simple bits to hit first (like supporting the shape types in the SVG file via the VGU utility functions) then I’m going to start on the skeleton system. After that I’m looking at integrating Box2DX (Box2D for C#) for collision detection/response.

    • Creating an animation tool is a *huge* work. I’m not sure about the real interest of this workflow. The great advantage of having a vector engine is mainly to have a game independent from the screen resolution. I know a game studio that overcame this problem by using Adobe Illustrator vector graphics which were resized before batch-conversion to standard bitmaps. The raster resolution depends then on the target system. Of course, animation data remains consistent on all targets since animation is only linked to the polygon which the bitmaps are drawn on. In the end, they get 3 sprite sets (low-res, id-res, high-res), and that’s enough IMHO. 2D Animation is done in Maya (on flat skinned polygons) and exported via a custom plugin, so they didn’t have to re-invent “yet another animation tool”…
      I like their approach (and I’m going this road too) because it minimizes the “tool work”, they keep the tools that gfx guys are accustomed to, and they always focus on the game rather than on the technology (which is the #1 recommendation for indie game development).
      That said, it’s always cool to see talented developers experimenting new areas, so don’t listen too much to my industry-loaded words and go on!

  3. I agree it could be a lot of work. I think I am probably thinking much more limited in scope than you’re imagining though 😛 At the most, I’m envisioning this tool will be able to create a skeleton, link bones to nodes in paths, and allow me to pose the skeleton and store keyframes as well as possibly playing back a set of keyframes. Since this will all be 100% limited to 2D, I don’t see it being a terribly crazy workload, and I’m not going to be making it general purpose at all. It will definitely be a “programmer’s” sort of tool, probably not very user friendly.

    For me, trying to use something like Max/Maya/Blender would be vastly more work, because I’d have to first learn those tools and then set up whatever solution I came up with to ignore the huge amounts of features that they each have.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s