Automagical helps developers port iOS code to Windows Phone and Windows 8

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.

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.

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.

Automagical

Features list (abridged)

Automagical can:

  • Translate code syntax.
  • Provide a GUI for batch code translation.
  • Collect #define constants into static class values.
  • Change C to C# enums.
  • And much more.

Automagical can't:

  • Understand your code (semantics).
  • Replace your source code editor.
  • Produce code that will compile without manual fixes.
  • Translate Objective-C++ syntax
  • Work on files with invalid syntax.

Dream of Pixels

Getting Automagical

Automagical sounds like a great way to speed up the process of porting games that were not created in a multiplatform engine like Unity. You don't have to use it specifically for Windows Phone and Windows 8 projects. The C# code it creates can be used with MonoGame to create software for other platforms.

It's important to Dawn of Play/Razum that Automagical be an affordable tool for indie developers. As such, the creator has priced the application at $79. For that price, a developer gets Automagical and personalized support. If the tool doesn't meet the developer's needs, they can request a full refund within thirty days of purchase.

Head to the Automagical website for a more in-depth feature list or to place an order. And if you'd like to see the results of Automagical in action, grab Dream of Pixels for Windows Phone.

  • Dream of Pixels – Windows Phone 8 – 66 MB – $2.99 – Store Link

QR: Dream of Pixels

Paul Acevedo

Paul Acevedo is the Games Editor at Windows Central. A lifelong gamer, he has written about videogames for over 15 years and reviewed over 350 games for our site. Follow him on Twitter @PaulRAcevedo. Don’t hate. Appreciate!