Background scroll

I would like to better understand how Flash displays display objects, so I better understand how to optimize my games.

I previously created a game that had a scrollable, repeating (and parallaxing) background. I laid it out and cached it as a bitmap, which was pretty painful when taking animated screen objects in the background. Is there a better way to do this?

Another question: if I have a large bitmap (or vector art that I cached as a bitmap), is there any performance if it is completely turned off? How about if it is partially displayed on the screen - should the flash drive display the entire bitmap or what it sees on the screen?

+3
source share
4

scrollRect, , . , ENTER_FRAME - , , , . scrollRect, , .

+1

cacheAsBitmap, , . . , , MovieClip, , , .

, false.

. , /fps .. Mrdoob . http://www.as3gamegears.com/profiling/mrdoob-stats/

+1

:

  • , scrollRect ( , + scrollRect).

  • , , . bitmapData.lock(), copyPixels() bitmapData.unlock(), , .

  • , . - Flixel .

, , ( ), ( ?). №2 - , - , , .

# 1 # 2. :

https://gamedev.stackexchange.com/questions/1081/rendering-performance-for-flash-games

+1

, , , Flixel, .

, , , , , . tbh:)

0

Source: https://habr.com/ru/post/1793479/


All Articles