Vector Graphics: Need SVG support now SWF is essentially gone

Cruce

Member
I know this topic has been going on for years, but it has become even harder to work with vector graphics inside GMS2. I can't find a decent SVG to SWF converter and I don't have Flash. I do have Illustrator, but the quality once it is imported into GMS2 is horrible.

Here is a screenshot of the SVG file in Illustrator. Next to it is a screenshot of it exported from Illustrator as a SWF and imported into GMS2. The third one was exported from Illustrator as a PNG and imported into GMS2.
1618507242167.png1618507313202.png1618507632449.png

I don't know why exporting to SWF looks so horrible. I have increased the export quality from the default 7 to the max (10). The third one is closer to the original, but still a little fuzzy. This card is currently around twice as large as it needs to be for use on a 1280 x 720 screen. I am targeting 1080. Yes, I know, dividing by 1.5 is the worst scaling I can do, but I figure most will be 1080 or higher resolution. When I need to scale it down 50% or increase it 200% depending on the target resolution, it just looks horrible. My only option is to accept the low quality images. I would also need to resize the SVG to have a couple of different scales and import them into GMS2. This is not ideal.

Are there any talks about supporting vector graphics and not relying on SWF?

Thanks for any suggestions.
-Cruce
 

Rayek

Member
Did you enable the anti-aliasing for your SWF vector sprites? The quality setting in the import screen only sets the number of polygons that will be used to draw the SWF sprite, and does not affect anti-aliasing. SWF sprites are drawn without AA, so you should use the code as explained here:

That will improve the render quality.

Secondly, about Illustrator's PNG export quality: it is pretty terrible. Way too soft. Importing that in any game engine results in too soft looking edges - in particular with art like these playing cards: the letter A looks too fat.

I always either export PNGs at 2-3 times the required size, and use ColorQuantizer or PhotoLine to downscale these PNG files with the CatmullRom resampling method. Typical resampling methods found in Photoshop generally prove to be too soft in my opinion.

Avoid Illustrator straight PNG export at native scale: edges are much too soft in my experience.
 

otterZ

Member
Not sure if this helps, but I just switched to Inkscape for making vector graphics after a lot of advice from the GMS community . . . especially including @Rayek and @RefresherTowel giving me so many detailed steps . . . much clearer . . . wish I had made my graphics on my current project set to 1080p form the very start and not 1280 x 720 but it is okay, fairly sharp . . . not bad. With Inkscape I am making graphics from scratch, as in UI graphical buttons, overlays etc that are at least 5 times sharper / clearer.

I set anti-aliasing to on already.

I still struggle with making text sharp, I would guess creating big ass fonts and then reducing them down may help? In GMS or in 3rd party graphics software . . . just guessing here but still not sure . . . jeez, do I really have to do that every time I have text in a game? High maintenance on projects with a lot of text. Perhaps fonts are outside of GMS's control, which is totally understandable, . . . but it would be so cool to have a font 'sharpenizer' (made up that word lol) that took care of this stuff in GMS.

I recently increased the font size to 1.5 times larger and it looked like I had double vision or had too many beers the night before - blurred. Imported Inkscape text at the same size as intended - not bad but not great, a little pixelated around the edges or maybe that is just the resolution - but movies at this resolution look 10 times sharper . . . , reduced the font size and got a Jet Set Willy pixelated vibe going on. I must be missing something here . . .
 
Last edited:
Top