Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Blliting Optimization

New Here ,
Apr 12, 2013 Apr 12, 2013

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!

TOPICS
ActionScript
648
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 13, 2013 Apr 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.

Translate
Community Expert ,
Apr 13, 2013 Apr 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 13, 2013 Apr 13, 2013

Yep...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 13, 2013 Apr 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 13, 2013 Apr 13, 2013

Thank you!

In that case I'll guess i'll go with 1, its more straightforward.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 13, 2013 Apr 13, 2013
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines