New games every week!
SVG Part 2 Blog
31st March 2019
Alan continues...
Have you tried Inkscape?


Nope!

-=-=-

I haven't attempted to use ANY art package on the PC, other than PaintshopPro, and even that's only being used for copy+pasteing spritesheets that I've actually drawn on the iPad.

The reason?
I exclusively use a laptop, and it's on my knee.. I have no space for a mouse, or anything else.

I haven't sat at a desk, to use a "Proper setup" (eg, a mouse) since the day before I was rushed into hospital back in 2012.
Ever since then, it's been a laptop. (OK, occasionally I've had to sit at a desk to use the Mac, but only ever to start yet another batch of updates!!!)

And a laptop means a touchpad.
And I don't know if you've ever tried to use a touchpad for drawing anything, but .. let me tell you.. My art sucks to begin with!!!

Instead, then, I've been using various iOS apps, and prodding the screen with my finger. It's actually upgraded my artistic ability from around about 2%, up to a whopping 3%!!!

The one-to-one drawing makes for a much better style, and frankly I love it!
Trying to find anything like that on a laptop will probably be akin to having a tablet, but I've avoided those "all in one laptop" devices, since they tend to cost a bloomin' fortune, and/or are abysmal in other more important specs.

Instead, then, I'd have to find a really impressive iOS vector graphic app that I'm actually comfortable with.
One day!! Maybe!

Anyway, if you're plotting by code, plotting svg by code is not a huge leap. developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths


The SVG format is indeed really really simple, and I've had a chance to nosey (and even poke around) at the output that the Concepts app was spitting out (when I originally used SVG for the button icons in Shoebox)
It seems easy enough that I could code my own output creator, but that's not really the issue.
The problem is figuring out what those paths should be.

The pixelart generators that I code tend to work on the basis of splodging pixels randomly, not drawing nice curves and things.
I can certainly splodge things, but then finding nice paths that would scale nicely is a whole other issue.
If anything, the output would be ... lots of high definition crisp squares!
I can already do that just fine with the pixelart, and even have a toggle to switch AntiAlias image scale off and on, to make those pixels nice and crisp.

Instead, I could probably add something like these Scaling algorithms, but those don't always look that great, and in the end you're still looking at pixels scaled up.

If I'm going to "properly" do SVG, I'd rather it be done with big high-definition starting points, and then (hopefully!!) reduced to look fairly decent, and not be an insane filesize. SVGMinify on standby.

Having said all of that..
I have left the SVG code in the framework.

When loading a spritesheet, rather than saying "This .png sheet has sprites of XxY pixels each, figure out how many sprites are on the sheet", you say "This .svg sheet has X sprites across, and Y sprites down, figure out the areas of each sprite."
That worked perfectly fine when the game icons used .svg, and there's no real reason it shouldn't work for everything else.

So, if some day I do dare to tackle this, I can (reasonably) easily plop the .svg file down, and tell the engine "Use this instead!"
It *should* work!!!




.. I'm now fighting a little voice in my head that's going "Hey.. .. You could probably code something to do all of that, yourself. I bet you could.. You could even do it in Javascript. .. You should consider that, Jay.."
Views 207, Upvotes 22  
Sandbox
New games every week!
Site credits : Jayenkai put all his heart and soul into everything you can see on this site.
(c) Jayenkai 2023 and onwards, RSS feed 4

Blog - SVG Part 2 - AGameAWeek