Page 1 of 23

Android port

Posted: 29 Aug 2010 17:57
by jwm
Hello All,

I have started working on an Android port of OpenTTD. The code of the first version of this work has been posted here: http://gitorious.com/openttd-android You can do single player games, but sound, AI, and network content are not functional yet. I haven't posted a binary yet, as it's not ready for normal usage. However, you can download the source code and build a binary using the standard Android NDK tools. A description of the build steps is in the android/README.txt file of the repository. The application has been tested on the Nexus One and on the emulator, but it should work on any Android device that has Froyo (2.2).

Important! In order to be able to run the application on the device, you need to get the game content manually. The Android build automatically pre-packages game data from bin/data in the application package. You can either prepare the game data in that directory before doing the build, or you can copy the files after doing the build to the SD-card. The path in which OpenTTD will look for them is in the sd-card is /sdcard/openttd/data If the application doesn't run for some reason, try getting logs with logcat (adb logcat). Not all error displays have been hooked up yet, but OpenTTD debugging is routed through logcat.

The bare bones of OpenTTD are functioning now, but there remains much work to do before it's ready for use by the general public. If anyone would be interested in collaborating on the remaining work, please feel free to contact me so we can make sure we're dividing the work. We can really use all the help we can get to make the OpenTTD experience on Android match the one on the PC!

Thanks!
-jwm

Re: Android port

Posted: 30 Aug 2010 14:19
by Zephyris
Sounds like great work! Any chance of some screen shots?...

Re: Android port

Posted: 30 Aug 2010 23:38
by SHADOW-XIII
looking forward to see it!

Re: Android port

Posted: 31 Aug 2010 07:12
by jwm
Here you go..

Re: Android port

Posted: 31 Aug 2010 10:13
by bokkie
I'm curious, looking forward to playing it on my Milestone. As has been brought op before in various other low-res/small-screen/touch-screen ports: if you have improvements for them, please make small patches for trunk so it might be included and all can benefit.

Re: Android port

Posted: 31 Aug 2010 12:16
by Zephyris
bokkie wrote:As has been brought op before in various other low-res/small-screen/touch-screen ports: if you have improvements for them, please make small patches for trunk so it might be included and all can benefit.
That is very very true, minimising changes to the code and feeding any patches for the small screen back to trunk will benefit development enormously, both for future updates to this branch and other small touchscreen devices in the future.

Re: Android port

Posted: 31 Aug 2010 14:22
by SHADOW-XIII
I would love to see it in official trunk but I assume it's fairly impossible due to having own development kit (NDK)

Re: Android port

Posted: 06 Sep 2010 03:13
by jwm
SHADOW-XIII wrote:I would love to see it in official trunk but I assume it's fairly impossible due to having own development kit (NDK)
Most of the changes to the existing codebase are generic and could eventually be taken to the main trunk. Android-specific changes are only compiled when building for Android. The goal is to keep these changes minimal and as generic as possible. For example, the changes to work around lack of RTTI on a platform are enabled if and only if __GXX_RTTI is off. That code could easily be integrated and all platforms without RTTI will benefit.

The questions that need to be asked though are:
1) Are developers on the official trunk willing to maintain these platform variations going forward;
2) When will the changes be mature enough for the official trunk.

I'd really like to see most of the changes back in the official trunk eventually. That makes maintaining the port easier and easier going forward :) Right now, there is still much work to do to get the port functioning and clean up the changes.

Re: Android port

Posted: 06 Sep 2010 09:01
by SHADOW-XIII
Well, they key point is first downloadable/installable apk. Once it's out it will be easier to get more people to work on it and once popular (which I assume will be) it might be easier to convince devs to put it into the trunk but yes - so it's not gonna end up like mac os we would need at least one dev in dev team to support android (hey, maybe you will get into dev team :mrgreen: )

Re: Android port

Posted: 06 Sep 2010 10:13
by Rubidium
SHADOW-XIII wrote:so it's not gonna end up like mac os we would need at least one dev in dev team to support android
And in what way does making some android porter an official OpenTTD developer it unlikely that the Mac OS X debacle happens again? Or did you forget the fact that the Mac OS X porter has been an official OpenTTD developer for many years?

Re: Android port

Posted: 06 Sep 2010 10:23
by Zephyris
Rubidium wrote:
SHADOW-XIII wrote:so it's not gonna end up like mac os we would need at least one dev in dev team to support android
And in what way does making some android porter an official OpenTTD developer it unlikely that the Mac OS X debacle happens again? Or did you forget the fact that the Mac OS X porter has been an official OpenTTD developer for many years?
That may be the case, but an "official" Android developer is the best bet for future support of the platform.

Re: Android port

Posted: 06 Sep 2010 11:00
by Eddi
that's mostly depending on how much more difficult they make it to build and test the application, than on any oher unixoid platform [e.g. in a virtual machine].

openttd has been supporting dozens of platforms without the need of a "dedicated developer"... if a platform needs this, it is poor design of the platform.

Re: Android port

Posted: 06 Sep 2010 12:30
by Zephyris
Well the SDK works on Windows Mac OSX and Linux (http://developer.android.com/sdk/index.html); I think that counts as good cross platform support, unlike macs...

Re: Android port

Posted: 06 Sep 2010 16:49
by Methius
Hey,

Just want to say that it's an incredible development!
Only, is this the same version as can be found here: http://code.google.com/p/openttd-android/?
As this version has modified UI, and binaries in APK form :-)

Re: Android port

Posted: 06 Sep 2010 17:30
by jwm
Methius wrote:Hey,

Just want to say that it's an incredible development!
Only, is this the same version as can be found here: http://code.google.com/p/openttd-android/?
As this version has modified UI, and binaries in APK form :-)
Thanks Methius :)

There are currently two parallel efforts going on. I'm working with the maintainer of that port to see what we can do to join efforts in a single codebase.

Please be aware that neither port is by far ready for non-developers. There are many missing features and both ports are unstable. This is the reason for me not to maintain a binary APK yet, although you could easily build one from the code.

Re: Android port

Posted: 16 Sep 2010 03:34
by Zhall
Aw, now i want a Droid..

Any chance for a port to the Envy 2? AHAHAHAHAH ya right just kidding.

Re: Android port

Posted: 08 Oct 2010 04:57
by Ivegottheskill
This is great news. I've got a Galaxy S which will hopefully have Froyo soon so that I can run the port of Open TTD. I'm looking forward to future releases. Any further communication between yourself and erikandre who's running the parallel development?

Re: Android port

Posted: 25 Oct 2010 07:36
by SHADOW-XIII
Seems like both project are dead?

Re: Android port

Posted: 29 Oct 2010 10:31
by aka_zed
SHADOW-XIII wrote:Seems like both project are dead?
It really is a shame! Would be a real battery drainer for my device :lol:

Re: Android port

Posted: 14 Nov 2010 19:11
by lubomyr
my attempt to create port to android
builded with crystaX ndk & pelya SDL-lib

http://anddev.at.ua/load/openttd_1_0_4/1-1-0-4