PlanetX, multiplatform (Windows, WP7, XBOX) and iPhone development

As I mentioned few days ago, I’m helping some friends to port a game from Windows to the XBOX, WP7 and iPhone.

The game was originally developed at the global game jam in Italy, and you can download the original game from this Url

The game was developed using XNA, and I have to say that it’s really incredible the flexibility of that framework. Basically I started to work on that project just a week ago, and the only line of code I had to change to make it work on XBOX and WP7 was

this.cataclysmCount = Enum.GetValues(typeof(CataclysmEnum)).Length;


int i = 0;
       if(!Enum.IsDefined(typeof(CataclysmEnum), i))
while (true);
this.cataclysmCount = i;

This is because Enum.GetValues is not supported in the .NET NETCF implementation that is used on the Windows Phone 7 and on the one used on the XBOX.

The other change I’ll have to make to support the WP7 and XBOX the the code that handle the user input control.

While on windows we have the mouse and the keyboard, on the phone we have the touch sensor and the Accelerometer and finally on the XBOX we have the joypad, with the dpad, thumbs sticks and buttons.

The 4th chapter of this book (Learning XNA 4.0: Game Development for the PC, Xbox 360, and Windows Phone 7) explains you exactly how to do that.

Now, this development on VS 2010 and Windows is all on my comfort zone, but I was also asked to have a look at development for the iPhone.

I do not have a Mac, and i do not have an iPhone, so how can I do my research and study without all those Apple goods? Well, I had to resort to a non official way obviously.

So I found a Virtual machine with OSX (“Mac.OSX.Leopard_VMware.Workstation-TeamWersaq”), and after struggling with it for a good half an hour to make it work (the solution was to use the –legacy switch at the first boot prompt) I finally started to download a long list of software I need to do my experiments.

On codeplex I found an interesting project, called XNATouch, and it looks like it’s the ideal solution for me to keep a shared code base between all my platforms.

The list of software required to develop with XNATouch is the following

1. Installed Apple’s iPhone SDK 4.1

2. Installed Mono for OSX

3. Installed MonoDevelop for OS X

4. Installed The MonoTouch SDK

5. Downloaded XNATouch 1.0

So I’m waiting for the download of iPhone SDK to complete and I’m good to go Smile


[UPDATE] BTW, if I make enough money out of it I promise I’ll buy a Mac and an iPhone Winking smile

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s