Porting to Android

Questions, problems and discussion about compiling FreeOrion.
Post Reply
Message
Author
Alexandus
Space Krill
Posts: 1
Joined: Sun Jul 17, 2011 2:58 pm

Porting to Android

#1 Post by Alexandus » Sun Jul 17, 2011 3:03 pm

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.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12280
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Porting to Android

#2 Post by Geoff the Medio » Sun Jul 17, 2011 3:24 pm

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.

User avatar
ChronicRat
Space Krill
Posts: 3
Joined: Sat Jun 13, 2015 8:29 am
Location: Russia

Re: Porting to Android

#3 Post by ChronicRat » Sat Jun 13, 2015 8:33 am

Well, I am professional C++ programmer with Android experience. :D So, the question of porting is still actual?

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12280
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Porting to Android

#4 Post by Geoff the Medio » Sat Jun 13, 2015 5:55 pm

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.

User avatar
ChronicRat
Space Krill
Posts: 3
Joined: Sat Jun 13, 2015 8:29 am
Location: Russia

Re: Porting to Android

#5 Post by ChronicRat » Sat Jun 13, 2015 6:01 pm

I mean do you have Android port already? Or is it in progress?

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Porting to Android

#6 Post by MatGB » Sat Jun 13, 2015 6:32 pm

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 ;-)
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Dilvish
AI Lead, Programmer
Posts: 4720
Joined: Sat Sep 22, 2012 6:25 pm

Re: Porting to Android

#7 Post by Dilvish » Sat Jun 13, 2015 7:54 pm

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.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
ChronicRat
Space Krill
Posts: 3
Joined: Sat Jun 13, 2015 8:29 am
Location: Russia

Re: Porting to Android

#8 Post by ChronicRat » Thu Jun 18, 2015 6:02 am

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. =(

Apo
Space Squid
Posts: 89
Joined: Fri Apr 19, 2013 4:10 pm

Re: Porting to Android

#9 Post by Apo » Thu Jun 18, 2015 7:38 pm

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

meverik
Krill Swarm
Posts: 10
Joined: Mon Aug 17, 2015 9:56 am

Re: Porting to Android

#10 Post by meverik » Mon Aug 17, 2015 10:09 am

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)

Massa
Space Krill
Posts: 5
Joined: Tue Sep 01, 2015 12:33 pm

Re: Porting to Android

#11 Post by Massa » Tue Sep 15, 2015 11:48 am

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.

Post Reply