How is cross platform done

Started by
12 comments, last by jwezorek 8 years, 9 months ago

Are there better ways?
RoboVM might work.

I saw this, libGDX uses this to get its games onto IOS from what I understand.

Has anyone had any experience with this? Outside of libGDX

Advertisement

If you've got the cash, Xamarin might be an option

With the caveat that Xamarin is C#, not Java.

and the caveat that Xamarins cross platform GUI API is pretty close to worthless, it is buggy(especially on android), incomplete and has awful performance, even fairly trivial GUI apps are forced to use the iOS and Android API wrappers which aren't cross platform (Being able to use C# instead of googles outdated java clone is really nice though)

[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

Web apps have become a popular way to write for multiple platforms. There are still a lot of problems with the concept, but I think it's now viable for games (if they don't need much CPU) and the technology is bound to go from strength to strength and make it an increasingly attractive option.

The way that cocos2d-x does cross-platform is the traditional way: you have a core library written in a platform independent manner in a platform independent language (C++). By "written in a platform independent manner" we mean that at its lowest level it is written in terms of calls to functions that have different concrete implementations for the different platforms that it supports. There is then a thin shell of an executable that is in whatever the sort of the native language of the platform in question is (Objective-C on iOS, etc.) that does a minimum of initialization and then just calls into the library, and you the user of the framework, to the extent possible, write your game in terms of the platform independent methods exposed by the core library and/or platform independent wrappers around platform dependent functionality and thus that part of your game can be used as-is across platforms.

It is more or less impossible the layer this kind of architecture on to an existing platform-dependent codebase. Basically you can't do cross-platform like this after the fact without re-writing.

This topic is closed to new replies.

Advertisement