• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Discussion SWF vector graphics, what is possible?

G

GeminiEngine

Guest
Not so much a programming question. I find nothing in the forums about SWF vector graphics, google can't seem to stay off of the adobe website, and the manual seems a little barren for those who are not intimately familiar with SWF files.

What is possible with SWF vector graphics in GMS2, aside from the benefits of vector graphics?

What kind of animation tricks can SWF achieve that normal bitmaps can't?

Will an animated SWF vector still animate when imported?
EDIT: yes, they do. But require that file's "timeline" property to be very specific.
 
Last edited by a moderator:

MilesThatch

Member
Not so much a programming question. I find nothing in the forums about SWF vector graphics, google can't seem to stay off of the adobe website, and the manual seems a little barren for those who are not intimately familiar with SWF files.

What is possible with SWF vector graphics in GMS2, aside from the benefits of vector graphics?

What kind of animation tricks can SWF achieve that normal bitmaps can't?

Will an animated SWF vector still animate when imported?
SWF's are generally much smaller in size, infinitely scale-able. Since the animation is coded as opposed to having each frame be loaded in the memory, you save texture page space resulting in less texture page swaps. You can use the vertex manipulation using shades. I use found a use for swfs in this game of mine, where I needed to create a tunnel effect without having raster degradation on scaling:

 
G

GeminiEngine

Guest
SWF's are generally much smaller in size, infinitely scale-able. Since the animation is coded as opposed to having each frame be loaded in the memory, you save texture page space resulting in less texture page swaps. You can use the vertex manipulation using shades. I use found a use for swfs in this game of mine, where I needed to create a tunnel effect without having raster degradation on scaling:
To be blunt and specific regarding the following:
Since the animation is coded as opposed to having each frame be loaded in the memory, you save texture page space resulting in less texture page swaps.
SWF graphics can be used to create animation effects without having to code them in GML and swapping textures? So, I could use a tool set such as: Inkscape and a SVGtoSWF converter and I can create animations for use in GMS2?

EDIT: Do you have any info or source on how collisions work with vector graphics?
 

MilesThatch

Member
To be blunt and specific regarding the following:

SWF graphics can be used to create animation effects without having to code them in GML and swapping textures? So, I could use a tool set such as: Inkscape and a SVGtoSWF converter and I can create animations for use in GMS2?
An example of a benefit of using vector graphics for reduced texture swaps would be, using swf image as a background sprite. Since the image is basically a programmed set of vector coordinates with color instead of an array of pixels, it won't be placed into your texture page. So a 1440x900 raster based .png background would take up almost an entire texture page so in order for the game to also draw your character, objects, tiles and so on, it would have to load the texture page containing that giant background (which btw Game Maker would still be scale down on compile, in order to make it fit into one 2048x2048 texture page too, PS: that page size can be set in the Resources > Windows > Graphics, but be careful of using large texture pages)

EDIT: Do you have any info or source on how collisions work with vector graphics?
No resources that I know of, unfortunately as I don't use vector graphics much. It's a pretty low res game in my case. I find vector graphics to be most useful for static imagery as there are some caveats you have to follow in order to avoid broken images. It's really easy to bork your vector image in Flash (now called Adobe Animate) since Animate's intelligent vector handling algorithm are only unique to it and GM may not possess the same algorithms. So exercise with caution.
 

gnysek

Member
Some SWF animations may take more memory than sprites in general (but should always use less memory than sprite with SAME graphics). For example SWF with 20 frames and lot of shapes (== triangles) of course will take more data in memory than 32x32 sprite, and drawing performance may be worse, but in most of cases SWF should be better. Just don't make it uber-complex.
 

Bentley

Member
To be blunt and specific regarding the following:

SWF graphics can be used to create animation effects without having to code them in GML and swapping textures? So, I could use a tool set such as: Inkscape and a SVGtoSWF converter and I can create animations for use in GMS2?

EDIT: Do you have any info or source on how collisions work with vector graphics?
I had this same problem. Can Inkscape convert SVG into SWF?
 
G

GeminiEngine

Guest
Some SWF animations may take more memory than sprites in general (but should always use less memory than sprite with SAME graphics). For example SWF with 20 frames and lot of shapes (== triangles) of course will take more data in memory than 32x32 sprite, and drawing performance may be worse, but in most of cases SWF should be better. Just don't make it uber-complex.
I downloaded several, animated SWF files but none would animate. how do you get them to animate? Can the speed of animation be controlled from within GMS2? Is there a guide for this as it applies to GMS?

I had this same problem. Can Inkscape convert SVG into SWF?
There are several, google "svg2swf" and it pulls up several. However, I have not found one that can convert animated ones.
 
G

GeminiEngine

Guest
Gemini et al, any progress with your problems?
As I am not adept in any graphical design all i have been able to try is downloaded swf files.

What I have learned:

  • No animated SWF graphic works in GMS2. There are numerous posts to indicate otherwise that this problem is due to the file not being configured as GMS2 expects. (disregard: I assume GMS2 limit, as few SWF studios support animation and many of those are unable to import other studio's animations (I know nothing about Adobe software regarding these other studios))
  • SWF graphics always look fantastic and better than BMP, as they should, except when they don't
  • SWF files can contain "errors" in them, such as when image_*scale, can cause interesting results. A few out of way-to-many had this "error".
  • swapping between SWFs for animation can cause flickering, one out of about a dozen I played with this happened. IDK if the reason is GMS2 tech limits or something in the files themselves, I assume files as this was a distinct minority
 
Last edited by a moderator:

rIKmAN

Member
  • No animated SWF graphic works in GMS2. I assume GMS2 limit, as few SWF studios support animation and many of those are unable to import other studio's animations (I know nothing about Adobe software regarding these other studios)
Animated SWF files work fine, as long as you adhere to limitations regarding all animations having to be on the main timeline (and the other caveats as per the docs).
 
G

GeminiEngine

Guest
Animated SWF files work fine, as long as you adhere to limitations regarding all animations having to be on the main timeline (and the other caveats as per the docs).
I was unable to get any animated swf that I downloaded to work.

You say that animated swf works and is mentioned in the Docs, I can not find it. Could you provide a link please?
 

rIKmAN

Member
I was unable to get any animated swf that I downloaded to work.

You say that animated swf works and is mentioned in the Docs, I can not find it. Could you provide a link please?
The manual has a search function, it's really handy!

Some info on antialiasing functions here:
https://docs2.yoyogames.com/source/...eference/drawing/sprites_and_tiles/index.html

Main swf documentation:
https://docs2.yoyogames.com/source/...information/importing_non_bitmap_sprites.html

Also I'm not just saying it works, I know it works as I've had animated swf files working myself. SWF support is pretty bad, but the do animate.
 
G

GeminiEngine

Guest
The manual has a search function, it's really handy!...
You don't have to be rude. Yes, it does mention animation, you are correct. However, nothing for troubleshooting a lack of animation.

I have indicated that I have explored this to the best of my ability. I have blatantly stated that I have used over a dozen animated only SWF files and that none have animated in GMS2.

Since you appear educated on this could you provide context to why my efforts might have failed?
 
Last edited by a moderator:

rIKmAN

Member
You don't have to be rude.

I have indicated that I have explored this to the best of my ability. I have blatantly stated that I have used over a dozen animated only SWF files and that none have animated in GMS2.

Since you appear educated on this could you provide context to why my efforts have failed?
If I was being rude I wouldn't have provided links to the manual for you, but for the record they weren't hard to find if you put in even a small amount of effort.

The forum search will also help you educate yourself and learn from other people who have tried using vectors with GMS the same way you are trying to.

Here is a link to the search results, just in case typing 'vector' into the forum search box proves as difficult for you as reading the manual seems to have.

Check through those pages of results for any threads that sound pertinent.

I would also suggest you download a trial of Adobe Flash or Adobe Animate, as the consensus seems to be that using those tools produces swf files that GMS likes, and also make sure you read the manual so that you are sure you are sticking to the rules that GMS imposes in terms of animated swf files.

I'm not a fan of the swf support, it's largely useless due to the restrictions IMO, but animations do work as I had them working when I tested swf files myself recently.

Check your image speed is set > 0, check you animation is on the main timeline, and use a swf that you created yourself and didn't randomly download from the Internet - it's highly likely the downloaded swf files don't stick to the rules GMS wants it to (ie. Animation on main timeline or else only the first frame will play - which is essentially no animation as you are seeing.)

Read the docs, it's all explained.
 
G

GeminiEngine

Guest
I did search.Try the term "swf" with any of "graphic" "image" "animation". Since the concept of benefit of the doubt appears to allude you in your choice of words, you will find that the only relevant result returned is this post with those terms.

Check your image speed is set > 0, check you animation is on the main timeline, and use a swf that you created yourself and didn't randomly download from the Internet - it's highly likely the downloaded swf files don't stick to the rules GMS wants it to (ie. Animation on main timeline or else only the first frame will play - which is essentially no animation as you are seeing.)
Thank you. As I have tried speeds set from 1 to 10, I have to assume that these file's timeline is not set as GMS expects.

I would also suggest you download a trial of Adobe Flash or Adobe Animate, as the consensus seems to be that using those tools produces swf files that GMS likes, and also make sure you read the manual so that you are sure you are sticking to the rules that GMS imposes in terms of animated swf files.
After reading through your search link, and using "adobe animate" which get even better results, it would seem that is true. As I am currently not interested in purchasing anything I guess this is on the back burner for me.
 
Top