Home
Reviews
Guides
Noteworthy
Game Creation
World of Games
Beside Games
GameStylus Blog

How to convert an Android app to Windows

We developed our games for Android but we decided to convert them to iOS and Windows 10. How did we do that?

As you probably know, we are developing adventure games for Android - and not just for this OS. Over time, we transferred them to iOS and Windows. We have already written elsewhere (here) about how we ported the game from Android to iOS, this time we'll look how easy it can be to convert games or other apps, of course, from Android to Windows. Step by step.

Our GameStylus game engine (more about it here) has been completely written in Java. We were not thinking about porting it on platforms other than Android. Maybe it seemed like a possible, but very distant future. At one point, however, we had several games on this game engine and it was a pity that once we had created graphics, animations, lyrics, translations and game logic, these games could not be played by players on platforms other than Android. And to say the truth: When our Alice and The Reformatory for Witches game  went over a million downloads and still had over four stars out of five, we decided we really should convert it to iOS and Windows.

As I wrote above, we started porting the games from Android to iOS. Thinking about the converting to Windows, we originally thought we would use Windows Bridge for Android from Microsoft. Microsoft started to develop it when it started to offer Windows 10 and the goal was clear: Getting as many applications as possible for Windows 10 UWP (Universal Windows Platform, the kind of applications that Microsoft started offering in its Microsoft Store). Along with this, information about Windows Bridge for iOS also appeared. So we were waiting for Microsoft to complete these tools.

But this was a wrong decision. The first preview of the Bridges appeared - as a preview - exactly three years ago, in August 2015, the Bridge for iOS is now in version 0.2 (yes, 0.2 after three years of the development by this huge company!) And the project of Bridge for Android has been completely killed by Microsoft. If you think it's unbelievable, we do too. However, at first we did not know that it would be such a trouble - and patiently we waited. Then Microsoft closed the Astoria project, we ported our engine to iOS, and we decided, we will port it to Windows 10 from there - using the Windows Bridge for iOS. We tested it continuously, and it turned out that the tool behaves absolutely unpredictably, the game runs in absurd resolutions, it can not be debugged in the Visual Studio, and so on. So we gave up waiting this year.

How we moved games from Android to Windows 10

But we did not want to give up the Windows 10. But how to port the games as easily and quickly as possible? We offer our games for free or between one and two dollars, so we can not really afford high costs - and we also have to work on the things that feed us, which, unfortunately, are not the games.

The problem has two parts: First, we need to convert the Java source code into a programming language that can be easily understand by Microsoft Visual Studio (which Java is not) - and from which it can create an UWP application for Windows 10. On the other hand, we need to create an API link to Windows also - all the Android-dependent functions need to be converted to functions that work in Windows 10. These are functions for graphics, sounds, data storage, and so on. And there is also the basic structure of the application: It is necessary to call the game logic in the right time, to display updates in the right time, to exit and save the game, and so on.

As a programming language, we chose C# for various reasons. To say the truth: With C and C++ we have some experience, but none at all with C#. We would like to have a tool that helps us to convert the code from Java to the C#. And here we have reached Java to C# Converter from Tangible Software Solutions. This tool has a free version that is limited, and a paid version ($120 is certainly a very good price if you make more converting). We've decided to use the free version that has fewer settings and can only convert a limited number of line codes. It was a great help anyway.

After a while we had a C# game code and there was another task in front of us: We had to edit it so it could work with the Windows 10 API. Our goal was not to become a programming engineers for Windows in C#, we just wanted it to work - easily and quickly. However, the documentation that Microsoft provides is in our opinion quite non-intuitive. When I want to prepare an omelette for breakfast, I do not want to read a manual explaining how a programmable oven, microwave, dishwasher and hood come into operation, I do not want to read about egg history, nutrition values, and hen types, nor do I want to read goulash recipes or sous vide pork doll recipes. No, I do not want to know all the possibilities, I just want to know clearly and briefly how to warm the pan and throw the f.....g eggs on it! And in Windows, I want to know where the input points are for calling the engine status update function and for updating the display (and, yes, where to add some code for starting and ending the application), how to show a bitmap, play the sound and save the file to where it will not be readily available for other apps. Easy and fast. Unfortunately, Microsoft does not offer this type of easy tutorial - even the simplest examples are unreasonably over-combinated. And believe me - I personally programmed in a lot of programming languages in many tools and platforms, but I would have to spend long hours exploring how to finish the UWP app right now.

So - what next? Fortunately, there is an open source project called MonoGame, which provides both a framework and just such a simple documentation that you won't find at Microsoft. (It should be said here, that Mono is a project created and then abandoned by Microsoft.) Just install it (into the free version of VisualStudio), insert the code at the right places, edit it... Of course, you need to find the right API functions for Windows 10, but thanks to MonoGame they are nicely encapsulated and it is easy to find the right ones. Depending on the complexity of your application (and depending on how it is written, of course) it can be done in tens of minutes, maybe in a few hours.

The finished game engine for Windows 10, of course, required some testing and tuning, uploading all game data and testing one game after another. Then we needed to test the games for compliance with the Windows Store requirements and upload them there. But when I look back, I have to say that it all happened relatively quickly.

And one more note: The location editor for our games is written in PHP and JavaScript and runs on GameStylus.com. So nothing changes in this regard, anybody can create a game there once and it can run on Android, iOS and Windows 10.

Our games to try

As I have written above, we are developing classic point and click adventure games. We use our engine and we try not to spend too much on development and to offer the games for free or very cheap. Even though we are also considering a bigger project now... The GameStylus engine can do it. If you want, look at our ported games, you can find them here:

Ported adventure games for Windows 10

Ported adventure games for iOS

Original adventure games for Android, such as Alice and Polepšovna for Witches


Comments, opinions and advice
Nobody has added any comment yet. Be the first...


>>> Read and post comments <<<
©2015-2024 GameCondor.com
Publisher: Bispiral, s.r.o. | About Us | Rules of the GameCondor.com web site and privacy protection | Send us a tip on a game