[This is a repost from my blog,¬†doolwind.com]
We‚Äôve just finished our first iPhone/iPad game with Unity 3, Flick Buddies.¬† This post is a review of our experiences with Unity including its pros and cons.¬† The review is slightly slanted toward iOS development however I touch on stand-alone and web-player builds as we created these versions in parallel.
Unity (often referred to as Unity3D) is an authoring tool for creating 3D games for a large range of platforms (ranging from iOS to PC and recently Xbox360 and Wii).¬† It has been out for a number of years although it‚Äôs popularity has sky-rocketed in the last couple of years with the release of a PC version of the editor to compliment its original Mac version as well as moving to a free model for independent developers.
Since going free, Unity seems to have been surrounded by an ever increasing amount of good news.¬† It‚Äôs constantly adding new platforms to its list, is being used by an increasing number of developers and provides consistently useful updates that solve many of people‚Äôs concerns.¬† The only negative press it‚Äôs received of late was when Apple looked like they were going to ban 3rd party engines like Unity from running on their iOS devices.¬† This never eventuated and Apple has since relaxed their restrictions.
Unity comes in a number of different price points:
Unity has been an absolute pleasure to work with.¬† I‚Äôve worked with a number of engines in the past both proprietary and off the shelf (such as Torque and Unreal) and I‚Äôve found Unity to be the most enjoyable to work with.
The biggest drawcard for many developers is the huge list of platforms Unity supports.¬† At the time of writing, this list included:
While each platform has different pricing points, the fact that a game can easily be ported between these various platforms is a massive advantage for Unity.¬† For a small indie company like ourselves, without the resources to port games to different platforms, we find it invaluable that we can simply change the destination platform and create a build.
A strong list of platforms is great, however what makes this ideal is the unified editor.¬† Unity‚Äôs unified editor means that you work within a single editor interface and share all your code and assets between projects.¬† Unlike the previous version of Unity (pre 3.0) where a different editor was required for the iOS build, everything happens within the single, unified editor.
Small amounts of conditional code can be written for different platforms, however of the ~4000 lines of code we wrote about 5 of them were conditionally compiled out.¬† I also wrote a small class that handled finger and mouse input through a single code path freeing up the design to treat both PC/Mac and iOS platforms in a similar way.
Unity also supports per-platform settings for all your assets, for example setting a maximum texture size for iPhone to keep you under the 20MB wifi budget.
Unity has great support for advanced effects.¬† It has a large list of built in shaders and materials as well as full custom shader support.¬† We primarily used the built in shaders, however in a few special circumstances I dropped into writing a few simple shaders for some custom effects.
The great visuals also scale down well on iOS devices.¬† While the game looks much nicer on PC with full anti-aliasing and higher quality lighting, for the screen size the game still looks amazing on iOS, particularly the iPhone 4‚Äôs retina display.¬† There is a strong limit on the shader capability on the iOS devices however due to their lack of processing power.¬† This is not a major concern for us, but means you have to employ some old-school tactics to get the best looking visuals without resorting to costly shaders.
An example of this is the outline we used on our characters in Flick Buddies.¬† We originally wanted a black and then white border to stylize the characters in a similar way to their 2D representations.¬† Instead of writing a shader I had to do the old trick of exporting the model a second time with its vertices pushed out along their normals and then inverted to get the same effect.
I‚Äôve spoken about the fact the editor is unified, however I also wanted to touch on the editor itself.¬† With its intuitive interface it‚Äôs easy to get up and running quickly.¬† I gave a guest lecture at a local university and the entire class of 30 students were up and running within a couple of hours, navigating their way around the interface making changes and customizing the small game we created.
The only negative point I found with the editor was the lack of multi-select support.¬† You can make simple changes to position, size and orientation with multiple objects selected, otherwise though you have to make changes individually.¬† A couple of times during the project this was a real pain, however it was workable.
With every passing month the tools and community seem to becoming more mature.¬† answers.unity.com is an awesome resource.¬† Nearly every issue I ran into had a solution which made life easy.¬† They are also quick to respond with new issues that arise.¬† Unity also has a solid list of example projects which are great for getting a head start on a game.¬† It‚Äôs also a great way to see best practices for usage within the editor.
With the recent release of the Asset Store, Unity has a good opportunity to create a thriving community that share assets of all types.¬† As this was released towards the end of our project we didn‚Äôt make use of the Asset Store, however we‚Äôll be keeping an eye on it for assistance in future games.¬† While it currently has a limited selection we‚Äôre hoping it takes off in the near future.
Rapid Application Development
I love my RAD.¬† One if the biggest drawcards for me personally was the quick turnaround in producing our game.¬† Despite learning Unity as I created Flick Buddies, I still managed the following:
I‚Äôm a huge fan of C# as a language to rapidly develop games.¬† Combining the ease of use of the editor with the robust nature of C# programming I found I could fly through all the features in the game with few bugs and only crashes in the last 24 hours of development (right when you don‚Äôt want them).
Unity is without its faults.¬† Whenever I explain Unity to someone, I usually list these three issues as it‚Äôs a lot quicker than explaining all the great things I love about it.
No Great 2D Support
Out of the box, Unity doesn‚Äôt have a sprite library for rendering 2D sprites.¬† It‚Äôs the number 1 request from developers and it will hopefully be coming soon: http://feedback.unity3d.com/forums/15793-unity-iphone/suggestions/163934-graphics-native-fast-sprite-manager
Until this is released there are three workarounds:
The built in GUI in Unity is terrible.¬† It‚Äôs fine for rapid throwaway prototyping to get something on the screen, but otherwise I highly recommend steering clear of it.¬† It performs badly and has a major bug in it which averages the position of multiple fingers and produces a ‚Äúpress‚ÄĚ in the middle (where there is no finger).
The simplest workaround for this is to roll your own GUI.¬† Flick Buddies was very light on with GUI so this wasn‚Äôt an issue, however for more GUI intensive games this may cause some problems.
This was the biggest issue we had with Unity.¬† As with the other issues there is a work around, however this one requires a fairly large investment for a small indie company (~$2000 per developer)
The Unity editor has a strange way of dealing with files, using a combination of a database and the asset files themselves.¬† This means that it‚Äôs not possible to use a regular source control system (like SVN which we use on other projects) for the bulk of the files.¬† The pro version of Unity does support a special feature which allows the use of SVN however it doesn‚Äôt just work out of the box, and I have heard of a few people having issues with this.
The ultimate (and most costly) solution is the Unity Asset Server.¬† For this you will need a Unity Pro license as well as the Asset Server client license.
We managed to work around Unity‚Äôs shortcomings as I was the only develper working on the game itself with our single level designer working on the ‚Äúscene‚ÄĚ files in isolation.¬† He would get a copy of the entire source tree, make changes to the scene (and occasionally animation files) and then copy the few files he changed back up in to the source tree.¬† We used Dropbox for this and other than a few minor issues it worked quite well.
I have still not solved this problem and I‚Äôm not happy with our current setup.¬† I will be investigating this further in the future and we may simply go down the Unity Asset Server route.
Overall I found Unity 3 a pleasure to work with and we plan to use it for all our games in the future.¬† Its tiered pricing model works well for indie‚Äôs of all sizes.
Have you used Unity?¬† Do you have thoughts on the pros and cons I‚Äôve listed or have other items that should be in the list?