I am really enjoying developing the SVG Ninja Game here, and I got to thinking about my process. Right now I really don’t have a concrete plan as to what bits of the project I’ll immediately be working next, and I think this is a benefit rather than a hindrance.
What brought this minor realization to the fore for me was just now while I had decided to do some new art for my level, namely the clouds. As I was drawing the clouds in Inkscape, I went to set them up how I had them before and realize, oops, I need to implement cap styles for path stroking for these to render correctly. I really like that I can implement little chunks of functionality driven by what I’m doing on the art side.
I think most of my enjoyment of this particular project is driven by the fact that I’m the closed loop for the whole pipeline. I do the art, I see it in game, I do more art, I write more code to display that new art and so forth.
I meant to post this about an hour ago, but I ran into a minor roadblock. After setting up the parsing for the stroke-cap parameter of the style attribute, and setting up the set call in my draw function, my little clouds still had square ends!
So first thing I do is go and search around to see if anyone else is having the same issue with OpenVG or ShivaVG in particular. No luck there…. I poke around the ShivaVG code some, and then the test suites. I compile and run the dash test and I’m looking at the code…I noticed it calls draw twice, once for fill and once for stroke, which is a bit odd. Eventually after going back and forth a few times I thought, “Well, it seems like it’s always setting the join style with the cap style…hmm.” I try that and voilà!
So, remember folks, if you’re setting up stroke cap styles, you have to set the join style as well!
And here’s the result of my process, this time:
Now with clouds, which are just straight paths stroked with the "round" end cap style. Rendered at 6xAA.