Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Contributor ,
Feb 28, 2011 Feb 28, 2011

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.

TOPICS
ActionScript
912
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 01, 2011 Mar 01, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 01, 2011 Mar 01, 2011
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines