Sponsored By

Game Engine Middleware Review : 2D SpriteManager2 for Unity

Unity is primarily a 3D game engine. However, more developers are using it for their 2D games. This is an objective review of SpriteManager2, which fills an empty niche in the Unity platform by providing a solution for 2D sprite animations.

David Shaver, Blogger

January 11, 2010

5 Min Read
Game Developer logo in a gray background | Game Developer

The Unity (formerly Unity3D) game engineis quickly becoming the de-facto standard for many Flash and Indie gamedevelopers wanting to make 3D games.  Now that the Unity Editor runs onWindows and has a free Indie license (both untrue last year), it ispoised to become ever more popular.  However, Unity is first andforemost a 3D engine, so it stands to reason that it should not supportmany of the facets of building a 2D game.  In reality, though, itactually works really well as a 2D engine if you set up your scene andscripts properly.  You can have a pixel perfect orthographic camera,collisions around your sprites, and even physics.  Where it lacks 2Dgame engine power, however, is in the sprite animation department. There is no easy way to animate your sprites.  This is where SpriteManager 2 by Above and Beyond Software (www.anbsoft.com) comes in tosave the day.

Sprite Manager 2 (SM2) is an easy-to-use middleware that works withall licenses of Unity (free, Pro, iPhone).  It takes creating andanimating sprites in the engine out of the hands of your programmersand into the hands of your designers and artists via a Unity Editorplugin.  You simply include the SM2 package in your project, attach ascript to a GameObject you wish to have a sprite animation, and use theUnity Editor’s Inspector to set up the animation frames and settingsfor each animation.  There is a Sprite Timeline Editor that lets youdrag & drop your animation frames (one per file, which is kind ofannoying) into the editor and build an animation.  SM2 even has anumber of features to let you use frames that are all different sizesand still make the animation look smooth.  All of this without a singleline of code on your part!

SM2 Timeline

SM2 Timeline

 

Ofcourse, there is an API that programmers can use to check the status ofthe animation and control the sprite animations (play, pause, stop,etc).  Most of the heavy lifting for setting up the sprites is in the Unity Editor. As a game programmer first, game designer second, I must say that itis nice to be able to focus on making a game fun (isn’t that what weare all doing here?) and not making a game framework.

Sprite Manager 2 has some excellent features under that greatinterface hood as well.  It takes all of the sprite animation framesyou give it and automatically builds a single optimized sprite sheetfor each sprite.  Now, all of your sprite’s animation frames are in onefile, and SM2 is smart enough to reuse frames and not duplicate them. This saves a lot of space, and if you are developing for iPhone, youknow that space is limited as you try to stay under the 10MB 3G networkdownload limit.  In addition, SM2 utilizes the iPhone’s dynamicbatching system which helps minimize the number of draw calls that needto be made.  This feature alone is a must-have for iPhone developersdoing 2D since Unity, left to it’s own devices, will make many drawcalls for every sprite.  You will find your 100 frames per second framerate drops to 15fps on the iPhone quickly!

SM2 Sprite Sheet

SM2 Sprite Sheet

With all the positives, there are a few SM2 negatives, however.  Themost prominent being that each frame of the sprite animation must besaved as a separate file.  This forces you to adjust your art pipelineto fit accordingly.  You may need to develop some simple scripts tomake this process smoother for your artists.  Another minor annoyanceis that once you add animations to your sprite, they are stuck in thatorder unless you want to do it over again.  For example, one of thesettings in the editor is the “number of the default animation.”  So ifyou add your default animation as the 10th animation in the list, youneed adjust your setting to equal 10, which is confusing considering itshould be 0 (the first in the list).  One final gripe is that thedocumentation provided is a little lacking.  The scripting API is fullydocumented, and the tutorial steps you through how to setup a spriteanimation (all good things, by the way).  However, there is nodocumentation on HOW to use the API properly.  This could pose aproblem for beginner game programmers.  It would be nice to have anexample script showing how to swap between animations in a gameplaysetting would be nice.  Luckily, A&B has excellent tutorial videoson their site and they participate actively in the Unity community, sohelp should be easily obtained.

Since everyone loves concise lists, here’s a Pros/Cons list to help summarize:

Pros:

  • Unity Editor plugin lets you build and edit your sprite animations visually, not in code

  • Automatically generates an optimized sprite sheet (great for iPhone size limitations)

  • One draw call and batching sprites for great performance (great for iPhone performance)

  • Sprite timeline editor lets you create animations frame by frame for excellent frame reuse and fine animation control

  • No coding to get sprite animations into your game!

  • Auto-resize and anchoring lets you have oddly shaped sprite frames that work together

Cons:

  • Each frame of an animation must be saved out as a separate file, which adds overhead for artists

  • You cannot re-order the animations once they are added to the sprite’s GameObject

  • The scripting API documentation could pose a problem for beginning game programmers

Sprite Manager 2 fills an empty niche in the Unity platform byproviding an optimized, easy-to-use, and cost effective solution for 2Dsprite animations in your game.  The current price is $75 for a singleseat, and $275 for an unlimited seat studio license.  It is worth morethan $75 considering how many man-hours it will save your team. Overall, the robust feature set heavily outweighs the minor grievancesof pipeline adjustment and documentation.

If I were on some rating website, I’d give it 5/5 stars.

Read more about:

Blogs
Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like