Jump to content

Sprite recycling/pooling worth it?


samim
 Share

Recommended Posts

I´ve got a scenario where i´m creating & destroying hundreds of sprites over and over. Performance is rock solid but nevertheless curios about this.

Would a object recycling/pooling system increase performance substantially? e.g. instead of spawning & destroying the sprites, re-using them.

Link to comment
Share on other sites

setTexture is cheaper; how much cheaper depends on your renderer and the texture.

 

"depends on the texture"? what are some performance guidelines here?

e.g. use square textures only / use powerOf2 sizes only / don´t scale in code ?

Link to comment
Share on other sites

"depends on the texture"? what are some performance guidelines here?

e.g. use square textures only / use powerOf2 sizes only / don´t scale in code ?

 

If you are using separate texture images each time you update it there is a performance cost of re-uploading to the GPU. If the same iamges is used that cost doesn't exist.

Link to comment
Share on other sites

If you are using separate texture images each time you update it there is a performance cost of re-uploading to the GPU. If the same iamges is used that cost doesn't exist.

Ok great insight, hails back to what i learned from the UDK/Unity world - tnx.

Wish there was a clear performance breakdown for stuff like tint / setTexture / scale.

Even though its pure vanity at this point as we´re rocking 50>60fps on most major platforms now. Pixi rules! 

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...