Port An XNA Game To Unity

By February 17, 2013 Ignite The Skies, Journal, Videos

So Ignite The Skies has been sitting around for a little while and every time I look at it I die a little bit inside. It was built using XNA but was never finished (it’s probably sitting around 90% done)

I’ve been toying with the idea of taking it across to Unity but it always felt like such a shit tonne of work to sift through for no real progress. Recently, I found someone had made a simple XNA Emulator for Unity. This tweaked my interest and I tried a quick test to see how well it would work for ITS. After a little bit of fiddling and fleshing out the stubbed parts a bit, I got the main game loop working in Unity! Well, it worked in a very limited sense. Most of the rendering didn’t work properly and the way it was dealing with resources wasn’t feasible to use long term.

Cool… but so what? So what indeed…. I couldn’t use this to make an actual port of the game to Unity but it has allowed me to get a bit of momentum towards getting the full port done. I can still use all the ‘systems’ code that isn’t directly linked to any XNA stuff. This all pretty much works… in fact I’m removing more code than I am changing. Considering how many features Unity has built into it.

So with a little more work I’ve brought all the assets across (and they just work straight away) and started to rebuild levels. In the process I made a few super quick Unity Editor Wizards that take some of the XNA assets and import them into the Unity Asset system (creating prefabs). When trying to recreate the backdrops for the levels I realised we had created heightmaps for them originally…. which meant I can now use a 3D terrain! Cool!

Here’s a video showing some of the models floating around over one of the terrains….

 

WP-Backgrounds Lite by InoPlugs Web Design and Juwelier Schönmann 1010 Wien