Android port

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
jwm
Engineer
Engineer
Posts: 4
Joined: 29 Aug 2010 07:10

Android port

Post by jwm » 29 Aug 2010 17:57

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

User avatar
Zephyris
Tycoon
Tycoon
Posts: 2826
Joined: 16 May 2007 16:59

Re: Android port

Post by Zephyris » 30 Aug 2010 14:19

Sounds like great work! Any chance of some screen shots?...

SHADOW-XIII
Tycoon
Tycoon
Posts: 13748
Joined: 09 Jan 2003 08:37

Re: Android port

Post by SHADOW-XIII » 30 Aug 2010 23:38

looking forward to see it!
what are you looking at? it's a signature!

jwm
Engineer
Engineer
Posts: 4
Joined: 29 Aug 2010 07:10

Re: Android port

Post by jwm » 31 Aug 2010 07:12

Here you go..
Attachments
openttd.png
Screenshot
(158.21 KiB) Downloaded 10 times

bokkie
Transport Coordinator
Transport Coordinator
Posts: 326
Joined: 19 Jan 2007 19:26

Re: Android port

Post by bokkie » 31 Aug 2010 10:13

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.

User avatar
Zephyris
Tycoon
Tycoon
Posts: 2826
Joined: 16 May 2007 16:59

Re: Android port

Post by Zephyris » 31 Aug 2010 12:16

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.

SHADOW-XIII
Tycoon
Tycoon
Posts: 13748
Joined: 09 Jan 2003 08:37

Re: Android port

Post by SHADOW-XIII » 31 Aug 2010 14:22

I would love to see it in official trunk but I assume it's fairly impossible due to having own development kit (NDK)
what are you looking at? it's a signature!

jwm
Engineer
Engineer
Posts: 4
Joined: 29 Aug 2010 07:10

Re: Android port

Post by jwm » 06 Sep 2010 03:13

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.

SHADOW-XIII
Tycoon
Tycoon
Posts: 13748
Joined: 09 Jan 2003 08:37

Re: Android port

Post by SHADOW-XIII » 06 Sep 2010 09:01

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: )
what are you looking at? it's a signature!

Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Android port

Post by Rubidium » 06 Sep 2010 10:13

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?

User avatar
Zephyris
Tycoon
Tycoon
Posts: 2826
Joined: 16 May 2007 16:59

Re: Android port

Post by Zephyris » 06 Sep 2010 10:23

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.

Eddi
Tycoon
Tycoon
Posts: 7418
Joined: 17 Jan 2007 00:14

Re: Android port

Post by Eddi » 06 Sep 2010 11:00

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.
You might not exactly be interested in Ferion, but if you are, have fun :)

User avatar
Zephyris
Tycoon
Tycoon
Posts: 2826
Joined: 16 May 2007 16:59

Re: Android port

Post by Zephyris » 06 Sep 2010 12:30

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

Methius
Engineer
Engineer
Posts: 3
Joined: 25 Mar 2008 21:28

Re: Android port

Post by Methius » 06 Sep 2010 16:49

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 :-)

jwm
Engineer
Engineer
Posts: 4
Joined: 29 Aug 2010 07:10

Re: Android port

Post by jwm » 06 Sep 2010 17:30

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.

User avatar
Zhall
Tycoon
Tycoon
Posts: 1244
Joined: 17 Jul 2007 01:36
Skype: moonray_zdo
Location: Teh matrix, duh.
Contact:

Re: Android port

Post by Zhall » 16 Sep 2010 03:34

Aw, now i want a Droid..

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

User avatar
Ivegottheskill
Engineer
Engineer
Posts: 21
Joined: 15 Apr 2004 00:25
Location: Australia

Re: Android port

Post by Ivegottheskill » 08 Oct 2010 04:57

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?
Agent Smith - "You have a problem with authority, Mr. Anderson."

SHADOW-XIII
Tycoon
Tycoon
Posts: 13748
Joined: 09 Jan 2003 08:37

Re: Android port

Post by SHADOW-XIII » 25 Oct 2010 07:36

Seems like both project are dead?
what are you looking at? it's a signature!

aka_zed
Engineer
Engineer
Posts: 3
Joined: 17 Jun 2005 14:46
Contact:

Re: Android port

Post by aka_zed » 29 Oct 2010 10:31

SHADOW-XIII wrote:Seems like both project are dead?
It really is a shame! Would be a real battery drainer for my device :lol:

lubomyr
Engineer
Engineer
Posts: 1
Joined: 14 Nov 2010 19:06

Re: Android port

Post by lubomyr » 14 Nov 2010 19:11

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

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: jfs and 2 guests