Jump to content

TilingSprite Performance


Dan335
 Share

Recommended Posts

I'm using 4 layers of fullscreen TilingSprites for a background.  Performance on laptops is bad.  Each frame I'm setting the tilePosition.  Any suggestions on how to get better performance and have the same parallax background? Can the TilingSprite code be simplified somehow?  http://astroe.io is the game.  I tried using CSS and a transparent renderer but performance wasn't much better.  If I take out the tilingSprites performance is great but I would really like to keep them.

Link to comment
Share on other sites

That would be awesome Ivan.

My only other idea is use a sprite for each individual star.  One of the layers I can get rid of.  It adds to the effect but not enough to make it worth it.  I would have to update the position of each star every frame but maybe if they use the particle container and an object pool it would be fast enough.  That leaves only one layer done with TilingSprite for the hex grid. 

But maybe your idea would be faster.

Link to comment
Share on other sites

I was running many sprites on my game which were static and only moved all together as the camera panned. I used RenderTexture every time I update the layer (not often), it improved performance on my laptop, not sure if it's an option here though.

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