Skip to main content

Background Limitations

Perfomance impact: High

Background animations are often delivered with a huge amount of details, complex meshes and large textures. Even though background elements are typically covered by reels and other UI elements, optimizing this part of the scene could be a headache.

Uncontrolled background animations complexity can significantly affect the game performance, game loading time and memory consumption.

  • Do not create too many details and complex meshes.
Animation example
warning

Background animation consists of huge amount of slots and meshes. Most of them will not be noticeable or even hidden under the reels/panels, especially on mobile devices. Updating and rendering all these elements will significantly affect the game performance.

example

  • Do not create separate version of the background animation for each screen size/orientation. Developer will be able to align and scale animations for different screen size/orientation.
Animation example
warning

Background contains separate version of the animation for each screen orientation. As a result:

  • unnecessary mask is used to crop the animation elements and fit the screen orientation, which also slightly affects the performance;
  • duplicated keyframes are stored in the memory.

example

  • Do not create too many versions of the background animation. Consider using skins and multiple tracks for different states to add more variety to the animation.

  • Do not bake the static background into the Spine export. Deliver the static (or nearly static) background separately as a JPG, and keep only the animated elements in the Spine animation.

tip

A flat JPG compresses much better than the same background packed into a Spine texture atlas. Exporting only the animated layers and compositing them over a separate JPG reduces the output file size, with no noticeable quality loss.

Example
warning

The static background is baked into the Spine animation and stored in the texture atlas. It takes up a large part of the atlas and compresses worse than a dedicated image format, increasing the output file size for pixels that never move.

example