Skip to main content
Known Participant
April 13, 2013
Answered

Blliting Optimization

  • April 13, 2013
  • 1 reply
  • 729 views

Hi everyone!

I'm working on a little game and I was wondering about the efficiency of my blit class.

The way I see it I can do it in 2 ways:

1-Each displayed object contains a bitmapdata instance of the blitted image.

2-Each displayed object contains an array which holds the frames of the blitted image.

I was wondering about the pros and cons of each method (CPU, RAM, render speed, ect...), would like to hear from you

Thank you very much!

This topic has been closed for replies.
Correct answer kglad

then it doesn't make any significant difference unless some of the data are duplicated in 1 or 2.  the display is still fully blitted with both.

the only difference is 1 has more objects that contain the bitmapdata and 2 has fewer objects but each contains more data. in general, they both contain the same total amount of data.

1 reply

kglad
Community Expert
Community Expert
April 13, 2013

do you mean:

1. each object used to update the display is a bitmapdata instance that you then blit to the stage?

2. each object is an array of bitmapdata instances each representing the display of some movieclip's frames which you then blit to the stage?

Sason922Author
Known Participant
April 13, 2013

Yep...

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
April 13, 2013

then it doesn't make any significant difference unless some of the data are duplicated in 1 or 2.  the display is still fully blitted with both.

the only difference is 1 has more objects that contain the bitmapdata and 2 has fewer objects but each contains more data. in general, they both contain the same total amount of data.