Developing a 2D Game for Windows Phone 8

Vaccano picture Vaccano · Nov 25, 2012 · Viewed 16.8k times · Source

I would like to develop a 2D game for Windows Phone 8. I am a professional Application Developer by day and this seems like a fun hobby.

But I have been disapointed trying to get going. It seems that 2D games (far and away the majority of games) do not have an API available.

It seems the Windows Phone makers did not include support for Direct2D. So unless you are planning to make a fully 3D app, you are out of luck.

So, if you just wanted to make a nice 2D app, these are your choices:

  1. Write your game using Xaml and C# (Performance Issues?)
  2. Write your game using Direct3D and but only draw on one plane.
  3. Use the DirectX Took Kit found on codeplex. It allows you to use the dying XNA framework's API for development.

Number 3 seems the best for my game. But I hate to waste my time learning the XNA api when Microsoft has clearly stated that it is not going to be supported going forward.

Number 2 would work, but 3D development is really hard. I would rather not have to do all that to get the 2D effect. (Assuming Direct2D is easier. I have yet to look into that.)

Number 1 seems the easiest, but I worry that my app will not run well if it is based off of xaml rendering rather than DirectX.

What is the suggested method from Microsoft?

And who decided that 2D games were going to get shortchanged?

Answer

Darren Reid picture Darren Reid · Nov 25, 2012

In my opinion, games development for both Windows 8 and Windows Phone 8 has taken a step back. This is mainly due to the dropping of XNA in my opinion, but it really doesn't seem like something they have focused on making easier.

To answering your question, though learning yet another API like XNA, it is still worth doing. Thanks to MonoGame, you will be able to take what you learn and target multiple platforms. Quite a lot of contributors are working on MonoGame and I can see it living on for quite some time.

So, if you are willing to learn XNA, you could simply make an XNA 2D game for the Windows Phone 7 platform. These titles (Microsoft has said) will run on Windows Phone 8** (not the case, see update). Sounds counter intuitive I know, but unless you really need to use some of the new functionality of WP8, target 7.1 and use XNA. It's a polished framework is great for making 2D games (Check out Bastion for example!). Once you have finished making your 2D game for WP7/WP8 you can target iPhone, Android and other platforms with very little code change by referencing MonoGame.

Maybe not a great option, but another one to add to the list. Hope that helps.

Update Turns out MS has really screwed up with WP7 to WP8 development. From the above method you will still be able to get the advantages of cross platform development to iOS, Android etc, but I wouldn't have a lot of confidence in WP8 as compatibility issues are starting to show up and WP7 titles are being omitted from the store for WP8 devices.