Jump to content

Animation does not play smoothly the first time


Qzlmnrk
 Share

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?

Link to comment
Share on other sites

  • 5 months later...

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

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

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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