Like many developers, Dawn of Play started out creating games for iOS. Porting Dream of Pixels to Windows Phone 8 represented a new development challenge for the team. Their solution: create a development tool called Automagical that translates Objective-C (iOS) code to C# (Windows Phone 8) code. Automagical makes porting from iOS and Mac to Windows platforms much easier. Read on to find out more about what it does and how to get it.

Earlier in the summer we reported on a strikingly lovely Windows Phone puzzle game called Dream of Pixels . The game comes from Slovenian developer Dawn of Play, who first joined the Windows Phone scene with Twinoo, another puzzle game for Windows Phone 7 and 8.

Using Automagical

Automagical runs on Windows XP or newer, all the way up to Windows 8.1. It requires a .NET framework and will provide one if necessary. The developer also has a very early Mac build that uses a terminal interface instead of GUI.

The Windows version of Automagical presents a convenient and intuitive interface for software developers. It splits the screen vertically, with Objective-C (iOS and Mac) code on the left. As the developer enters code on the left side, the software translates it on the fly into C# code on the right side of the screen. This makes it a great C# learning tool even if you're not working on a commercial project.

Both languages are based on C, so some code stays the same during the translation process. Other code gets translated into the correct C# syntax. Much of the resulting code can then be used as-is, without the need for change. Other times, developers might want to change code such as macros beforehand, using a C function instead. Automagical will change the function into a reusable class method for C#.

Automagical is a tool to help the programmer but it doesn't take all of the work out of porting. It translates syntax (how equivalent things must be written in Objective-C and C#) but doesn't understand what the code actually does. For example, it can't tell whether the object that your code references actually exists, so you still have to check for that.

Besides writing code on the fly, Automagical can translate existing projects automatically. To do so, create a new project in Automagical and define the input and output source folders. Make sure you have a backup copy of the source project, because you'll often need to change the source Objective-C code to suit Automagical's translation results.