Unity 3D becomes a weapon of choice of many game developers. Amount of Unity-powered games is growing rapidly especially on mobiles. As the name implies, Unity 3D is suited better for 3D games and the vanilla editor is not a good tool to make 2D games. But there are a lot of frameworks that try to tackle this problem; let's see what they're worth!
Orthello 2D (Free/$35)
It has a free version (with quite a lot of features) and a Pro version. I tested the Free version.
The good: Orthello comes with loads of handy classes. You can import texture sheets and atlases easily, create animated sprites, tween their parameters, check collisions and input... All with just a Free version! It's well documented, with a nice user guide.
The bad: Orthello's performance is... Well, bad. Very bad. Apart from this it imposes some restrictions (e.g. you have to use an orthographic camera, you should create sprites from pre-made prefabs etc.). It loses a lot of flexibility because of this.
ex2D ($25/$35)
ex2D will set you back $25/$35 (depends on whether you purchase from the Asset Store or directly from authors), but there is a free evaluation version available.
The good: ex2D provides a few tools for creating atlases and sprite animations. You'll be using them straight in the Unity editor, and you'll like them 'cause they're good. I liked the whole workflow for ex2D and I set up my test fastest using this library.
The bad: Documentation is a little bit lacking and contains a lot of grammar errors.
SpriteManager 1 (Free)
This is a free and minimal sprite library. The only thing it does is rendering sprites and sprite animations. It is also the fastest one.
The good: great performance! SM consists of 3 classes, which aren't even MonoBehaviours. I liked the flexibility that comes from it.
The bad: SM consists of 3 classes, so yeah, you'll be coding a lot of things yourself. The lack of atlas importer hurts the most (you have to type in UVs for every sprite in the atlas...).
SpriteManager 2 ($149)
It's a developed version of SpriteManager 1, armed with tools for creating atlases and animations.
The good: the performance is still great, it's almost as flexible as SM1 too. But you can use simple atlas and animation editors this time around!
The bad: it still just renders sprites; if you need collision/input handling, scrolling backgrounds etc., you'll have to code it. And while the editors do the job, they're a little bit rough. SM2 is rather expensive.
2D Toolkit ($65)
I don't own it and unfortunately there is no free version, so I couldn't test it!
Performance
I'm mostly interested in mobile performance. I tested all of these frameworks on my Xperia Play (on iOS you'd get roughly similar performance using an iPhone 4). My test consists of a single background sprite (640x960 px, static) and three animated sprites (all frames were packed into a single atlas texture to reduce draw calls).
Every touch spawned 10 sprites, every second touch spawned another 100 sprites (randomly selected from these three types). Sprites go from the top of the screen to the bottom of it and are deactivated and reused later. Here are the results:
Sprite count | Orthello 2D | ex2D | SpriteManager 1 | SpriteManager 2 |
50 | 57 fps | 60 fps | 60 fps | 60 fps |
100 | 18 fps | 60 fps | 60 fps | 60 fps |
150 | 6 fps | 58 fps | 60 fps | 60 fps |
200 | 4 fps | 52 fps | 60 fps | 60 fps |
300 | 1 fps | 35 fps | 60 fps | 58 fps |
500 | 1 fps | 22 fps | 58 fps | 52 fps | |
1000 | 1 fps | 11 fps | 45 fps | 39 fps |
In my opinion you should choose between SpriteManager and ex2D. Both SpriteManagers are very fast and very flexible. It's up to you how you extend it for the needs of your game. If you don't care about money, buy SM2 and save yourself coding a read-sprite-from-atlas tool. I'd recommend ex2D for less experienced programmers. ex2D's excellent tools will get you up and running in no time, performance is sufficient and the framework itself is pretty cheap.
Now go and make some games!