开发者

Which type of Flash animation performs best for games?

开发者 https://www.devze.com 2022-12-12 15:33 出处:网络
I\'m making a multiplayer flash game in Actionscript 3.0, using Flash CS4 IDE. I\'m not sure what kind of animation would perform best (higher frames per second) in a g开发者_如何学JAVAame.Frame base

I'm making a multiplayer flash game in Actionscript 3.0, using Flash CS4 IDE.

I'm not sure what kind of animation would perform best (higher frames per second) in a g开发者_如何学JAVAame. Frame based or maybe use the motion tween, also would it be best to do say the motion tweens by calling a frame or by calling a method with the animation code in it?


For better framerates:

  • move your game sprites with code, a little bit every frame
  • use PNG source art instead of vector, so you can set stage quality to LOW with no visible aliasing
  • use scrollrect to eliminate drawing objects outside the visible bounds of your game
  • remove objects from the display list, don't just set visible=false
  • recycle objects in your code instead of constantly creating new instances. Learn about using object pools


we meet again :)

Use bitmaps and containers

Use cache as bitmap for vector movieclips if you don't change their size and it has a lot of load.

Try to avoid filters and lots of transparent objects one on top of each other

Use time based animation rather than frame based animation; (if you need it I'll build an example of this and post it on www.flashontherocks.com soon)

Until then check the following:

http://www.tonypa.pri.ee/ (I recommend vector tutorials)

http://www.8bitrocket.com/ (Bitmap usage in games)

Regards, Oliver

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号