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

Flash poor performance with vector art (.svg)

New Here ,
Nov 20, 2012 Nov 20, 2012

When using multiple pieces of vector art I've noticed that performance gets rather sloppy, so I created a simple test program that displays 100 copies of the same graphic and allows zooming. I used what I believe to be a fairly simple vector image (can see links below). However, fps drops massively when zooming in or out. I know zooming requires a lot of calculations, but I have an above average system (i5 2500k processor) that I would expect to handle such demands. Is there something I'm missing? or is vector art just not viable for my game (I would need lots of similar artwork on the screen at one time)

Picture of image - http://i.imgur.com/Cj50O.png

SVG file - http://pastebin.com/MjBLebFQ

Test Code: http://pastebin.com/Xmquy9Py

TOPICS
ActionScript
896
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

correct answers 1 Correct answer

Community Expert , Nov 20, 2012 Nov 20, 2012

for optimum performance you should use bitmaps (or enable cacheAsBitmap).  but if you're doing a lot of zooming that won't work unless you're publishing for a mobile and can use the cacheAsBitmapMatrix property.

Translate
Community Expert ,
Nov 20, 2012 Nov 20, 2012

for optimum performance you should use bitmaps (or enable cacheAsBitmap).  but if you're doing a lot of zooming that won't work unless you're publishing for a mobile and can use the cacheAsBitmapMatrix property.

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
New Here ,
Nov 20, 2012 Nov 20, 2012

Oh wow, cache as bitmap seems to make quite a noticable improvement in performance. I didn't know that option was possible.

I will look into bitmaps, but I tried before and noticed the quality was poor when zooming. Lots of jagged edges. I tried using bitmapSmoothing but then my images were noticably blurry afterwards.

Thanks for the help again kglad. You are an absolute legend!

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
Community Expert ,
Nov 21, 2012 Nov 21, 2012
LATEST

you're welcome.

if you're publishing for mobiles and can use cacheAsBitmapMatrix, you can import (or create) the highest zoomed bitmap you will need.  then you won't have a problem with quality when zooming down.  you will be consuming more memory so there are limitations on using bitmaps with zooming for mobiles.

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