Thoughts on the Unity engine

A few weeks ago, some friends of mine were starting a project and were deciding on a 3D engine to develop a desktop PC game in. I tried to list out the pros and cons of the Unity engine, which would in my opinion have been a great choice for the project they were kicking off. Here is what I wrote:

I have played a part in creating three Unity games, ported one other Unity game to Unity iPhone, and am currently creating an iPhone game with it. I know that isn’t ‘loads’ of experience and the games were medium to low scope, but here’s my thoughts on it:

Pros:

  • Ease of Use: Unity provides easily the most seamless and anger-free development environment I’ve ever laid my hands on. From day one, everything made sense, and whoever designed the top down workflow must have been an engineer at Apple or something because they really nailed the interface, flow, and logic for creating games. Getting a prototype up and running is quicker in Unity than any other engine I’ve seen so far and that’s counting GameMaker and Flash.
  • Physics Integration: PhysX is built in and ported for both Mac and PC so it just works. You can add rigidbodies, forces, joints, etc to objects with one or two clicks or a call from the rigidbody class though code.
  • Art Pipeline: Unity provides an amazing art pipeline out of the box. Drag and drop integration with maya (.mb) files (and .max files in Windows) and native FBX support give Unity a one step pipeline: If the file is in your asset folder, it is automagically imported. You can also update a 3d scene while Unity is open, tab back to Unity and it will change in real time, even while the game is playing. That’s another thing; live changes. You can tweak values while the game is running by exposing variables to the editor and then changing them on the fly for very quick iteration and value shifting. It’s like Firebug for game development. Web developers know the glory that is Firebug.
  • Networking: Unity provides built-in networking classes that ease the pain of writing your own networking code. Then again, if you’re writing an MMO, you’re probably going to completely tear apart their built in functions and roll your own.
  • Deployment: You can build to Mac (PPC, Intel, or Universal Binary), Windows, or browser-based format (or the almost never used OSX Dashboard export). This makes porting a non-issue, as everything is handled for you. There are separate builds for Wii and iPhone development but your code will largely remain the same. iPhone will cost you extra and Wii will cost you a LOT extra (they won’t publically list the price).
  • Price: 200 bucks for an Indie license and 1500 for the Pro license. With Pro you get the ability to do post-effects, render textures, simple video playback, realtime soft and hard shadows, as well as terrain/asset streaming. You can still use projector blob shadows in Indie and code a loop to play back short videos in an image sequence, so Pro is definitely not always necessary. Indie will also throw up a little logo on the bottom for the first few seconds, so keep that in mind.

Cons:

  • Source code: No, you do not get full source when you purchase a Unity license. The cost of the license is pretty indicative of that fact. The thing is, you won’t actually miss it. All of the coding on the developer’s end is done in C# or Javascript (well, a Javascript based language called UnityScript) or even Boo script (which almost no one uses). There is a massive list of API calls and built in functions and Unity really allows you to get at every level of the engine, from simple lerps and physics functions to low level engine calls (garbage/mem management and lots more) You can write your own C++ plugins and shaderlab/CG shaders can be written for custom graphics needs (toon shading, outlines, different post processor effects, etc etc). It does come with loads of pre-made graphical effects and shaders such as line render, toon, post blur, refraction, reflection, water shaders, glass, and an assortment of combinations of parallax, bump, spec, alpha, and diffuse shaders). Most if not all of the Unity forum members will agree that you can get down and dirty without having to touch the source of the engine. It’s been my experience that the cheaper engines that provide source in the regular engine price use that fact as an excuse to omit certain API calls and a sense that “Well, if the user really wants to , they can dig through this obscure section to modify it on their own”. This is what I often hear about Torque, the messy unkempt source with a serious documentation lack is not really helpful to most, and having to dig through someone else’s extremely low level complicated code is not always the best way to go about customizing something that should really have an easier outlet for change. Same goes for the C4 engine, in my experiences, but I don’t have the C++ knowledge to be able to really get in deep in the source and truly understand the inner workings of a full fledged game engine.
  • Version control: Versioning is wonky unless you buy their asset server: Because of the way Unity stores its project files, there are parts that do not play well with SVN/CVS. Therefore the Unity team sells an addon called the Unity Asset Server ($500) which is a fully featured asset server that will allow better collaboration among teammates (from what I hear, I haven’t had personal experience with it but I havent heard any negative comments about it, other than the fact that larger teams are pretty much forced to use it).

*Note that there would be a completely different list of pros and cons for Unity iPhone vs straight Objective-C or 2D sprite engine, but I’ll save that for another day :)

3 Comments

Look mom, a blog!

Yeah, the time has come to set up a blog for those mind dumps that require slightly more space than 140 characters. Then again, everything important can be said in 140, so I guess stay tuned for some unimportant content.

+ Comments