Qzlmnrk

Animation does not play smoothly the first time

Recommended Posts

I'm using a large (3072x3840) spritesheet to play a sprite animation.  However, when the animation is played for the first time, there's a noticeable pause where the first ~85% of the animation should be, possibly from the spritesheet being loaded into memory.  What can I do to make the animation run smoothly the first time?

Share this post


Link to post
Share on other sites

I have the same thing happening to me... I have large spritesheet 4096x4096px with sprite size of 301x155px. The first time I load any animation it does not show most of the frames at the beginning (~85% is a good estimate) and it shows last couple of frames at the end. After that all other animations from that spritesheet play smoothly. I am trying to load single sprite at the beginning to force it to load spritesheet in the memory but think that is not the best solution :P

Share this post


Link to post
Share on other sites

The delay is almost certainly the texture being pushed up to the GPU. To get around it use the texture somewhere else in your game first. Perhaps add a sprite to your main menu that uses this texture. It doesn't matter if the sprite is visible false, it will still achieve the same job of preparing the texture.

Share this post


Link to post
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...

  • Recently Browsing   0 members

    No registered users viewing this page.