04-22-2012 10:46 AM
I am creating a very simple memory match game.
I am using flash builder 4.6, air 3.1, tweenlite, and vector graphics imported as swc files.
i have all of the logic in place, however i find the animation runs very slow.
I have coded a scrollable view port that runs extremely choppy on the device. in addition, simple animations that move the x/y coordinate perform very slowly as well.
the app is set to CPU mode since i am using vector graphics.
please advise on how i may improve performance. thank you.
04-22-2012 10:50 AM
i have already tried optimizing my app by doing the following:
- reducing filters
- optimizing code / functions
- switching to vectors instead of arrays
- testing gpu vs cpu (cpu performs better for me)
- profiled the app and ensured low memory usage (under 5mb) .. trying cache as bitmap pushed memory usage to over 30mb so i removed that option.
any tips please?
04-22-2012 02:16 PM
" updates based on the app frame events and move resources"
Are you referring to the Enter_FRAME event?
I do not have many tweens, just a lot of vector graphics (100ish ) on screen at once.
04-22-2012 02:26 PM
04-22-2012 03:28 PM
Thanks for the reply.
Each item is contained in its own sprite. They are vectors, but do not have to be.
Would you recommend I convert every sprite to bitmap using the bitmap data class?
Should i use cache as bitmap on everythign that does not have an animation?
04-23-2012 07:44 AM
04-23-2012 08:14 AM
I have profiled teh code and what I was previously doing was on the fly converting vectors to bitmap data and adding that bitmapdata to the display list. this method proved to be very memory intensive. it took up approximately 2000% more memory than using plain vectors.
i will try your rectangle idea and let you know what I uncover. thanks for the tip.