Vsync in Flex/Flash/AS3?

前端 未结 3 747
长情又很酷
长情又很酷 2021-01-04 19:48

I work on a 2D shooter game with lots of moving objects on the screen (bullets etc).

I use BitmapData.copyPixels(...) to render entire screen to a buffer:BitmapData.

3条回答
  •  攒了一身酷
    2021-01-04 20:08

    Don't save things to BitmapData, that will kill, absolutely kill your app. Bitmap Data is not very performant.

    Make all your game elements in flash, as Sprites(or MovieClips if you must), and then work how flash was meant to work, as a vector animation platform. It was never optimized for 2d bitmap graphics. 2d vector graphics work well, and even if you import bitmaps they will work better moving around then they will rendered to a BitmapData object.

提交回复
热议问题