Skip to main content
Inspiring
March 1, 2011
Question

Some image-performance questions (jpg vs png, smoothing, image size, etc)

  • March 1, 2011
  • 1 reply
  • 935 views

I've done quite a bit of digging but it's surprisingly difficult to find informed answers to these questions.

I'm making a Flash game with a friend; as far as we can tell, the code is fine, but there are some serious framerate problems that seem entirely related to the graphics.

  • Is there a performance difference between Movieclips as JPGs and PNGs? Most of our graphics are imported as PNGs because they have transparent sections, but I don't know whether there is a performance difference between setting image compression to JPG or PNG within Flash itself
  • Does turning on "Smoothing" for an image affect performance?
  • Obviously larger graphics have more of a performance hit, but is there any benefit to splitting a large image into pieces? Example, changing a 2000*1000 background into two 1000*1000 pieces?

One thing is most of our graphics are as much as twice the size in the library as they are displayed onscreen, then scaled in the code. We had wanted to make the game still look good when zoomed in/fullscreened but that doesn't seem practical so I'm planning on resizing all of the image files to their final size in the game and removing the scaling code. Hopefully that's the major part of the problem.

This topic has been closed for replies.

1 reply

somascope
Inspiring
March 1, 2011

Using an image in Flash, but scaling it down 50%, brings in overhead (like you are thinking) - it's more that you need, and adds to the slow-down of things.

Using smoothing also takes up a little bit of speed, as Flash does that during runtime. The smoothing, will make things look nicer if your project scales up in size when in full-screen, which partially lowers the need to provide such large images.

PNG versus JPG - I'm not sure if there is a difference or not, we'd have to get others to weigh in here.

xTLSAuthor
Inspiring
March 2, 2011

Thanks somascope, I hope others can chime in as well.