Jump to content

BitmapText Performance in CocoonJS


Hsaka
 Share

Recommended Posts

Hello, I'm experiencing some performance issues with BitmapText. In one screen in my game, I have 4 BitmapText objects and the fps in CocoonJS drops to around 45.

 

Correct me if I'm wrong, but looking at the source, it seems that a BitmapText object is a display object container where each character in the bitmap text is a sprite.

 

If this is true, then is it possible to incorporate a SpriteBatch instead of DisplayObjectContainer in BitmapText to contain all of these sprites? And will doing so improve its performance?

Link to comment
Share on other sites

I also came into this, it terribly drops FPS count ( especially if your text is nested in some additional DoC ).

If you have multiple static text in some container, you can cacheAsBitmap bitmapText and container itself, it did the trick for me in simple example.

Unfortunately, cacheAsBitmap is not working perfectly too, sometimes it trims part of your content ( I think because of bad bounds calculating, when the container is scaled ).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...