Ported my first game from libgdx to windows phone 8

In the past weeks I accomplished to port my existing game Robo Miner (made with libgdx) to monogame (using C#) - and it was just published some hours ago! Maybe have a look:

Robo Miner | Windows Phone Apps+Games Store (United States)

It was a lot of help to have experience with C# and XNa already and being a developer for multiple decades. It turned out that I had to do a lot of “recode” some things. I also mailny used core functionality of libgdx so that made some stuff easier. Worst thing was the fact, that monogame 2d does not use cameras at all - so there was a lot to do to make me some helper classes / wrappers to make that possible. Lots of problem therefore with non-pixel-integer perfect conditions.

Beside the coding stuff the publishing to windows phone store was pretty … “complicated” in terms of time needed to get everything right, age ratings etc …

But it is done, let me know if you have any questions about the process, maybe I can give some advises.

Merry Christmas!

Nice! Will you keep us posted on how your game does on WP store?

Congrats! Did you revise the IAP structure ?

Well, that’s great wishing you all the success you can get in future ! :smiley:

When there is something worth to tell, I will do so here :slight_smile: I have not re-integrated IAP yet, just because I do want to see first if it is worth to do so.

Nice! You port all java code to c#? Sad that libgdx core team don’t care about Windows phone. I want to port may games to Windows Phone but it will take much time.

How long you take to port this game and can you share the process?

Some time ago the libgdx team had told in a blog post why a wp port is not possible - there were some good reasons for it (technical nature) - in the end it’s a java engine and they would have to rewrite the whole library. Unfortunatelly it is not always clear what MS is going to do - the drop of XNA back the days was a bit unexpected too.

The process depends on your game. Porting java to c# code is not complicated, many things are equal. You have to make your own SpriteBatch-Wrapper which can work with TextureRegions, cause Monogame has no regions.

The biggest challenge in the draw calls is the differing coordinate system. The Y-Coordinate is mirrored in XNA/MonoGame. So if you do not want to rewrite ALL your positioning code, you have to tweak your draw wrapper to work “quirky”. This was really the hardest part, to make that all right.

If you use your camera with moving and zooming you have to care for that as well, because XNA/MonoGame has no camera for Spritebatch (its always a representation of your screen). It may be possible to use the transform-parameter of spritebatch.begin for that. You also have to care for pixel-perfect integer positions, else you will have some gaps in tiled drawings. (very annoying if you use zooming in your game for example).

I did write several classes from scratch for example NinePatch. Not so hard to do actually.

On the other hand - the possibility of value-types (struct etc) really makes many things easier. I actually prefer C# over Java in general.

Deployment to Windows Phone is quite a task. A lot of little bits which would be to many to point out here :slight_smile:

After all it took me about a week of full-day-working (>8h) to have everything done. It may be faster the next time, cause I already have most of the classes and now how to do several things.

Oh. And you get NO free exposure for your app in Win Store :slight_smile: You have to promote completely yourself to rank better than all the GameBoyAdvance-Ports and Emulator Games :slight_smile:

Sounds like a nightmare really. :slight_smile: Especially the no free exposure part. :confused:

I guess iOS will be more of a nightmare :slight_smile:

Due to some reason with libgdx. Cocos2d-x seem is the best support cross platform game engine. Many big guy from Japan, Korea, China are using it. But it 's C++ base.
But for only iOS and Android now libgdx still the best.

After a couple of days and very low downloads - suddenly it gets more downloads since yesterday. It may have reached a bunch of “the right people” who play it. Quite possible, that the new year parties had some influence in spreading the word tru players :slight_smile:

I already have 6 crash reports - trying to download and investigate them failed because the reports are empty.

All in all it’s still not very much in terms of userbase, let’s see how it will progress over the next weeks.