Search Unity

Optimization: Built in Animation editor or Sprite Sheets?

Discussion in 'iOS and tvOS' started by snoodleking, Jan 23, 2013.

  1. snoodleking

    snoodleking

    Joined:
    May 2, 2012
    Posts:
    17
    Long story short: I'm making a 2D rhythm based iPhone game. My first attempt ended up with less than smooth gameplay (and it MUST be smooth as it is a rhythm game).

    Since then I have totally rebuilt the game and have redone all the art assets (as I thought that my art could have been slowing down the game -- I didn't really have texture size in mind as much as I should have).

    This time around I've been trying to utilize the built in Animation tool in Unity to achieve some cool effects with my sprites (some how I missed this tool on my first go at the project). Previously I had been using sprite sheets and some simple code that cycled through the texture offset, but now I've been relying on the animation editor to pull some things off (such as color variation/pulsation, projectile movement, etc).

    So my question is: how taxing are animations done with the animation editor in Unity?

    Are they less demanding than cycling through sprite sheets?

    I realize that there are plugins (sprite manager 2) that could help with efficiency, especially since I am not a very proficient coder. To be honest, I'd rather not spend the money on SM2, as this project is very simple, and if Animations are relatively cheap with Unity's editor, then I'd really only require one character to have a sprite sheet.

    If anyone has any insight on the subject, I would really appreciate it! I just would like to know before I get in to deep with these animations before I have to scrap them all and go back to sprite sheets -- if indeed that is what I'll have to do.

    Thanks!
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    cycling through sprite sheets are considerably less demanding. The animation editor isn't that slow though. It depends on how many properties you're animating. But sprite sheets + atlas will be faster.
     
  3. snoodleking

    snoodleking

    Joined:
    May 2, 2012
    Posts:
    17
    Not exactly what I wanted to hear... but thank you for the quick reply! This will help immensely!!
     
  4. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    For what it's worth we usually have up to 50 unity animations playing at one time constantly in the scene for our mobile game which is smooth as silk. Unity animations have options to prevent calculation if out of bounds or off screen. How many numbers you're looking at is probably going to slow down from the gpu before your code becomes a big issue.

    This smells like premature optimisation. Don't do it. Just focus on what makes the game how it should be then pop back in and fix it closer to launch.