Page 1 of 2

Porting to Android

Posted: Sun Jul 17, 2011 3:03 pm
by Alexandus
Hello community, was curious to see if it is possible to port this game to android? I have the asus tf101 tablet and use it at work, and would love to have a game like this to play! Any help would be greatly appreciated.

Re: Porting to Android

Posted: Sun Jul 17, 2011 3:24 pm
by Geoff the Medio
I've never used an Android device or done any programming for one, but I imagine porting FreeOrion would be difficult and complicated, but is probably possible in some form.

There is some discussion of Ogre on Android, though I don't know how functional that is. In practice, it may require writing a new interface program instead of "porting" the existing interface. Doing that is quite possible and flexible, as, for example, the FreeOrion AIs have no visual interface at all and can play the game (to some degree).

The server and AI also need to be built if you want to play a single-player game. If it's possible to launch other processes and have them communicate with eachother on a single Android device, then that should work. If not, then you'd need to set up a separate server and connect to it to play a game.

Regardless of these details, an Android port or client for FreeOrion will probably only be possible if you are willing to do the porting (or can convince someone else). That's probably the biggest problem, unless you're an experienced developer with sufficient motivation to work through the platform-specific issues yourself.

Re: Porting to Android

Posted: Sat Jun 13, 2015 8:33 am
by ChronicRat
Well, I am professional C++ programmer with Android experience. :D So, the question of porting is still actual?

Re: Porting to Android

Posted: Sat Jun 13, 2015 5:55 pm
by Geoff the Medio
ChronicRat wrote:So, the question of porting is still actual?
Not sure what that means, but the mention of Ogre on Android is not irrelevant as FreeOrion has switched (back) to SDL2 instead.

Re: Porting to Android

Posted: Sat Jun 13, 2015 6:01 pm
by ChronicRat
I mean do you have Android port already? Or is it in progress?

Re: Porting to Android

Posted: Sat Jun 13, 2015 6:32 pm
by MatGB
Neither, this is the only mention of it ever that I'm aware of, the main team are certainly not going to be able to even look at the idea for some time.

If, on the other hand, someone wanted to do it then it should, in theory, be feasible, it runs on Linux which Android is, technically, a fork of, but you'd need to have a pretty high spec phone/tablet to make it viable unless you completely change the display mechanism (if you could get the game, as is, to run on a typical tablet, I expect the battery life to be measurable in minutes, for example).

At some point I plan to get an Android tablet, at which point I'd love to see this sort of thing. But given the core game itself doesn't really have enough devs, we're all volunteers in spare time, etc.

If you want to get started, um, yeah, go for it ;-)

Re: Porting to Android

Posted: Sat Jun 13, 2015 7:54 pm
by Dilvish
A slight clarification Mat-- Android is based on the Linux kernel, but lacks lots and lots of the software that a regular Linux distro includes; I expect that a lot of libraries we use are not normally available for Android. It could be that any we use that don't come with Android could be compiled for it, though.

To be clear, FO is set up to compile and run on Linux just fine, using the cmake build system, so that should help with any porting effort.

Also, it looks like there are a couple ways to get a fuller Linux installation onto a droid device, such as http://www.linux-magazine.com/Online/Fe ... e-to-Linux, and http://linuxonandroid.org/ , so if it's just that you're wanting to be able to play on your phone it could be that one of those routes might be (mostly) sufficient. Then you'd mostly just have to worry about how to try scaling the UI to something that works reasonably on a phone display.

Re: Porting to Android

Posted: Thu Jun 18, 2015 6:02 am
by ChronicRat
Yep, I thought about porting. But after code review, I think it won't be so easy as I supposed. I just haven't enough time for it. Sorry for disturbing, guys. =(

Re: Porting to Android

Posted: Thu Jun 18, 2015 7:38 pm
by Apo
It appears there are already several guides out there that explain how you can run Debian or Ubuntu on your device.

http://forum.xda-developers.com/showthr ... ?t=2692270
http://forum.xda-developers.com/wiki/AS ... tu_Install

If you are able to install one of these Linux distributions, you could use the official Debian packages of FreeOrion for ARM devices.

https://packages.debian.org/sid/freeorion

Re: Porting to Android

Posted: Mon Aug 17, 2015 10:09 am
by meverik
Hi,
I use Odroid SoC's running linux and have been wondering if building freeorion would be worth a try?
I have a GLES accelerated SDL2 and have been able to build a few projects against it (ufoai, caveexpress) so my question is what's the status of arm/gles port?

Thanks

(forgive my Hunic English)

Re: Porting to Android

Posted: Tue Sep 15, 2015 11:48 am
by Massa
I'm not sure how useful that might prove be to the FO devs or anyone attempting to port but it seems android support has been added to ptitSeb's glshim 2 days ago:

https://github.com/ptitSeb/glshim


And now for some language humour from earlier in the thread - some people use the word 'actual' in the sense of 'current', 'up-to-date' cause that's what it means in their own language.

Re: Porting to Android

Posted: Tue Dec 04, 2018 10:59 am
by clarke21
You cant port to android but you can use cross-platform mobile application development.
It allows you to write a significant part of code using one language (for example, ReactNative created by Facebook developers uses JS). Subsequently, you can reuse as much as 50% to 80% of this code for both platforms. Moreover, this code will run as completely native on a device, so you won’t face poor performance or other issues.

You will only have to write those parts of the code using native language, which mostly concern UI and some design elements.

Re: Porting to Android

Posted: Sun Dec 09, 2018 1:45 pm
by Ophiuchus
clarke21 wrote: Tue Dec 04, 2018 10:59 am You cant port to android but you can use cross-platform mobile application development.
I think compared to a mobile-app port it would be simpler and more useful to have some responsive browser client available which also would work on an android device (probably mobile-first approach, we already have a good desktop UI).

If you do not need the game to work offline you could simply connect to a game server. I think this will become easier and easier to self-host. See what Oleg did and what happens in the provider space.

Also e.g. even just being able to open the encyclopedia on your pad or phone (next to your main screen maybe) would be a win.

The map is the main UI artefact on the desktop. On small devices that is not useful but for giving orders you do not necessarily need the map.

Re: Porting to Android

Posted: Fri Oct 23, 2020 11:19 am
by o01eg
I've managed to build common and parser library for android: https://github.com/freeorion/freeorion/pull/3202

It's still need some fixes for Android's directories and some glue to Android JNI so some client could use them.

Re: Porting to Android

Posted: Fri Oct 23, 2020 11:35 am
by Oberlus
That looks so good. Good job and keep it up.
I foresee hordes of people scrolling through their chunk of the galaxy and reviewing the state of their armies while commuting to their jobs.
That could make multiplayer slow games faster :lol: