Why is my FPS inconsistent?
god bless, i'm pretty new @ flash please bear me; having trouble annimation made on pivot animator , exported , copied onto flash. noticed when playback annimation slow , when try change fps not consistent, meaning changes itself, example put fastest go(120 fps) , saw changing aninmation played: 9.21 fps, 8.30 fps, 10.12 fps, every frame. please explain should do. thanks.
there's no simple one-step fixes advice can given. , it's possible animation complex nothing can done improve fps you're seeing.
that said, here excerpt book wrote (flash game development) , things increase fps:
easiest hardest implement
- do not use filters.
- always use reverse for-loops , avoid do-loops , avoid while-loops.
- explicitly stop timers ready them gc (garbage collection).
- use weak event listeners , remove listeners.
- strictly type variables whenever possible.
- explicitly disable mouse interactivity when mouse interactivity not needed.
- replace dispatchevents callback functions whenever possible.
- stop sounds enable sounds , soundchannels gc'd.
- use basic displayobject needed.
- always use cacheasbitmap , cacheasbitmapmatrix air apps (i.e., mobile devices).
- reuse objects whenever possible.
- event.enter_frame loops: use different listeners , different listener functions applied few displayobjects possible.
- pool objects instead of creating , gc'ing objects.
- use partial blitting.
- use stage blitting.
- use stage3d.
greatest least benefit
- use stage blitting (if there enough system memory).
- use stage3d.
- use partial blitting.
- use cacheasbitmap , cacheasbitmapmatrix mobile devices.
- explicitly disable mouse interactivity when mouse interactivity not needed.
- do not use filters.
- use basic displayobject needed.
- reuse objects whenever possible.
- event.enter_frame loops: use different listeners , different listener functions applied few displayobjects possible.
- use reverse for-loops , avoid do-loops , while-loops.
- pool objects instead of creating , gc'ing objects.
- strictly type variables whenever possible.
- use weak event listeners , remove listeners.
- replace dispatchevents callback functions whenever possible.
- explicitly stop timers ready gc.
16. stop sounds enable sounds , soundchannels gc'd.
More discussions in Adobe Animate CC - General
adobe
Comments
Post a Comment