Goodbye XNA, Hello SharpDX

Pope Kim Jan 9, 2013

I've been using XNA since the beginning. I liked this platform a lot because it allows me to write something that runs both on PC and Xbox 360. And it is even possible to monetize your games on Xbox 360 Indie Games channel. However, the importance of XNA games on Xbox Live turned out to be very minimal, and MS changed XNA a lot to support Windows Phone 7.0. From that moment, (XNA 4.0 I believe), XNA became somewhat awkward. PC and Xbox 360 became second-class citizens, i think.

Still I used XNA quite often. It was a great tool to prototype anything. Its contents pipeline and ability to use DirectX in C# really gave me a huge advantage to make any demo in it. For example, I even made the demo for my SIGGRAPH presentation in XNA.

Now XNA is dead because Windows Phone 8's not gonna support it. WinRT is apparently the new winner….Also Visual Studio 2012 doesn't support XNA officially. (an unofficial way exists, but whatever?) Sure, one can still stay behind with Visual Studio 2010 and XNA 4.0, but now XNA, aftert being neglected for a while, has some limits.

  • no 64-bit support
  • only supports DirectX 9 (no DX11 support)

So now time to find an alternative…. The reasons why I liked XNA were:

  • C# support
  • contents pipeline

So I just need to find an alternative which covers these two… right?

C# Support

There are two major libraries that supports DirectX in C#, or any .NET language: SharpDX and SlimDX. Both libraries have almost identical API, thus the usage is very similar. Furthermore, both supports 64 bit. I needed 64-bit support for my recent work, so I tried both libraries, and decided to go with SharDX for following reasons:

  • SharpDX is faster (less overhead on API calls)
  • it's easier to install SharpDX(simple DLL file copies)

So with SharpDX, C# support issue is covered

Contents Pipeline

Honestly, I still don't see anything that's comparable to XNA's contents pipeline yet. Texture is not a big issue since both C# and SharpDX's DX calls support textures pretty well. When it comes to other asset types, such as audio and mesh, it's still not that easy.

One good news is that Visual Studio 2012 contains an example which loads FBX files, I heard, and I believe Microsoft will enhance this side for WinRT, if they are really betting on Windows Phone 8. So maybe it's just matter of time?

I wish I had some time to make pretty solid contents pipeline for SharpDX or something…. But by looking at my schedule for this year, I don't think I'll ever get to do it.

My Conclusion - SharpDX

So I decided to live with SharpDX for now. My main reason was the 64-bit support. My prototype's already using more memory than what 32-bit application can handle. I'm not worried too much about textures and mesh support… For other contents types, I'll solve the problems when I need them.

Update - Jan 12, 2013

Nicolas just told me his Assimp.NET can handle some asset import/export and it's actually used by SharpDX too. So if you need an asset pipeline check it out at Apparently FBX files are not supported yet, but since there's already FBX SDK from autodesk for free, I would think it's just a matter of time.