Dustin Horne

Developing for fun...

Goodbye XNA, Hello Unity

Before writing about Unity, I wanted to provide clarification for my subscribers and let them know that I've moved away from XNA development and moved to Unity.  While XNA isn't entirely dead (there are still plenty of XNA developers around and still using XNA for desktop and XBLIG games), it is certainly fading away. 

XNA was great fun to work with and definitely forces you to learn as it is a Framework and not a game engine.  The engine mechanics and plumbing are entirely up to you.  While this provided for great learning material, it was tremendously time consuming.  The tradeoff, however, was extreme flexibility in what and how you designed and great support for multi-threading.

The main issues with XNA were centered around garbage collection, especially in the context of XBLIG since there was no support for generational garbage collection on the console.  Given a little more time and TLC by Microsoft, I think XNA could have evolved to be a first class product.  The truth is though, it wasn't a huge money maker for Microsoft.  Most of the games released on XBLIG were pretty sub-par and other frameworks and full engines were coming into play.  While MonoGame steadily (albeit very slowly) picks up more and more functionality, strategic partnerships between Microsoft and Unity for the Windows 8 and Windows Phone 8 stores have made Unity seem to be a much more attractive option.  There's also a pretty good bet that when Xbox One Indie development is opened up more, Unity could very well be a player in the development space.  What Unity lacks in flexibility (you can do just about anything as long as you do it "The Unity Way"), it makes up for in ease of use, tooling and rapid development.

The biggest thing to keep in mind is that, while you can certainly compare the end products created using XNA or Unity, you really can't compare XNA and Unity as products.  XNA is a framework that offers an abstraction on top of DirectX while Unity is a full blown Engine.  Both Unity and XNA abstract away the low level details of communicating with the graphics device and both allow you to leverage shaders for some heavy lifting but Unity goes a step further and also abstracts away the frame lifecycle and leverages a component based methodology.  XNA does support component driven development but it's up to you to manage the lifecycle and build your own engine to handle it.

The benefit of XNA is that it allows you complete control over how that lifecycle is managed and you can build the engine that meets the needs of your game.  On the other hand, Unity takes more of an "all things to all people" approach in providing you with a somewhat flexible engine with its own lifecycle management that you build your game into.  While this may seem like it's packaging your idea into a neat little box, it's still very powerful and allows you to break out and still do a lot of complex backend work yourself.  In the end, Unity allows you to concentrate more on your assets and your game and less on the complicated underpinnings of what make it work.  Couple that with support for more than one version of DirectX in addition to OpenGL, iOS, Android and many other platforms and Unity just makes for a much more well rounded product for indie developers.