Search code examples
c#.netiphoneclrxna

How toI run a game made with XNA on the iPhone/iTouch?


How could I run a game made with XNA on the iPhone/iTouch? Which steps/tools (existing ones or imaginary...) should be used?

Note: The goal is to avoid modifying existing C# code

UPDATE :
If I understand correctly, I must be able to:

  1. Run my XNA code on Mono (monoxna or SilverSprite, promising?)
  2. Run Mono on iPhone (MonoTouch)

Solution

  • I don't believe there is a good answer to your question. XNA doesn't target the iPhone, so the chances of being able to effectively port an XNA game without modifying the C# source code isn't likely to happen.

    Instead, I'd recommend that you take a look at the various frameworks that exist to help you craft cross-platform games. Unity often comes up in these discussions, but it isn't free.

    If cross-platform isn't your goal, but free iPhone development is, then I'd recommend looking at Cocos.

    Edit: The MonoTouch project may be able to assist you in the future, but doesn't help you out right now. Still, it's something to keep an eye on.

    Edit: The landscape has changed a lot in the ~5 years since this question was posted. If you have an XNA project that you want to get running on iOS, then Xamarin.iOS (formerly MonoTouch) plus MonoGame is a near-perfect fit. MonoGame is missing a huge chunk of the XNA content pipeline, which means you'll either have to abandon it or have a VS2010 instance somewhere compiling your assets.