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

Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Android port

Post by Roujin »

NekoMaster wrote: for the text problem you could try editing the config if there is one and change the text (small, medium, and large) to a different font or a different size

Also, you do know theres a grf that makes buttons and the gui bigger for touch screens and high res monitors?

I have no idea how to edit the config in this android port. It's a config file only option, right? Not adjustable ingame?
It would be great if the android-specific setup could include font-size selection.
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Android port

Post by NekoMaster »

Roujin wrote:
NekoMaster wrote: for the text problem you could try editing the config if there is one and change the text (small, medium, and large) to a different font or a different size

Also, you do know theres a grf that makes buttons and the gui bigger for touch screens and high res monitors?

I have no idea how to edit the config in this android port. It's a config file only option, right? Not adjustable ingame?
It would be great if the android-specific setup could include font-size selection.
There should be a file in your openttd directory called "openttd.cfg"

Also, the content downloaded has the big-gui grf
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Android port

Post by Roujin »

I know of the existence of the config file, but I don't know if/how I can edit it manually. Keep in mind we're talking the Android port here. Not the normal PC version. It's installed on my android phone (downloaded from android market) and I don't know if/how I can manually change the config file there.

Yes, I already use the big-gui newgrf, that is kindly provided as a setup option of the port. Forgot to mention it in last post, sorry. That does help with the ingame buttons, but not with e.g. the main menu ones, since these are just text.
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Android port

Post by planetmaker »

You might also define another font, or if you can't access the config file but can install newgrfs, a solution albeit still not nice one, is Zephyris' big font: http://www.tt-forums.net/viewtopic.php?f=33&t=50068
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2890
Joined: 16 May 2007 16:59

Re: Android port

Post by Zephyris »

Roujin wrote:I know of the existence of the config file, but I don't know if/how I can edit it manually. Keep in mind we're talking the Android port here. Not the normal PC version. It's installed on my android phone (downloaded from android market) and I don't know if/how I can manually change the config file there.
You either need a text editor on your phone, or connect your phone to a pc and modify the config file on the phone as if it were a flash disk...
Logital82
Engineer
Engineer
Posts: 58
Joined: 15 Feb 2010 12:03
Location: Germany, Berlin

Re: Android port

Post by Logital82 »

Anyone here tried to play it on Galaxy S i9000? The Problem ist that this telefon doesnt has a joystick. Anybody knows some comfortabel settings to play it? Is there a possibility to change the cotrolsettings without uninstall and reinstall the game to try out the best controlsettings?
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Android port

Post by NekoMaster »

Logital82 wrote:Anyone here tried to play it on Galaxy S i9000? The Problem ist that this telefon doesnt has a joystick. Anybody knows some comfortabel settings to play it? Is there a possibility to change the cotrolsettings without uninstall and reinstall the game to try out the best controlsettings?
Im pretty sure that left click scrolling was made default for Android Ports, but if not then you can just enable the setting in the Advanced Settings menu
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
pelya
Transport Coordinator
Transport Coordinator
Posts: 342
Joined: 18 Nov 2010 19:48
Contact:

Re: Android port

Post by pelya »

Logital82 wrote:Anyone here tried to play it on Galaxy S i9000? The Problem ist that this telefon doesnt has a joystick. Anybody knows some comfortabel settings to play it? Is there a possibility to change the cotrolsettings without uninstall and reinstall the game to try out the best controlsettings?
Do not close the app with Home button, press Exit from app menu, then it will show SDL configure button on next start.
Galaxy supports multitouch, so I recommend setting right mouse click to multitouch in SDL settings, left click - "Touch near cursor", and "Show screen under finger" in "Additional controls".
If you can't close it just use any Task Killer app from Market (for example if you cannot hit the right option in that tiny menu).
User avatar
flake
Engineer
Engineer
Posts: 66
Joined: 28 Apr 2004 10:07
Location: Salzburg
Contact:

Re: Android port

Post by flake »

first of all: :bow:

secondly: i am using sony ericsson x10
when downloading the datafiles it ends with "could not write to..." but after restarting ottd it just worked fine.

thirdly: and with "just worked fine" i mean a dream came true !
*<(:-}
SHADOW-XIII
Tycoon
Tycoon
Posts: 14275
Joined: 09 Jan 2003 08:37

Re: Android port

Post by SHADOW-XIII »

pelya, not sure if you are aware but from NDK r5 whole app can be in C++ with nearly 0 java in it:
http://android-developers.blogspot.com/ ... eness.html
what are you looking at? it's a signature!
pelya
Transport Coordinator
Transport Coordinator
Posts: 342
Joined: 18 Nov 2010 19:48
Contact:

Re: Android port

Post by pelya »

SHADOW-XIII wrote:pelya, not sure if you are aware but from NDK r5 whole app can be in C++ with nearly 0 java in it:
http://android-developers.blogspot.com/ ... eness.html
I'm aware of that, thanks, however I won't recode all my Java files in C++ - the SDL config code is already 60 kbytes in size, this will take ages.
Also NDK r5 contains an important bug:
http://groups.google.com/group/android- ... 776842041d
When I've compiled Free Heroes 2 with it the game froze at the end of turn. I did not try other apps, but I don't want to catch that subtle bug everywhere - I'll rather wait for NDK r5b.
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Android port

Post by NekoMaster »

Will this port work in any version of Android? Because I'd like to mess around with android on my Desktop PC (I just found out they have ports to the PC, mainly for messing around with)
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
pelya
Transport Coordinator
Transport Coordinator
Posts: 342
Joined: 18 Nov 2010 19:48
Contact:

Re: Android port

Post by pelya »

NekoMaster wrote:Will this port work in any version of Android? Because I'd like to mess around with android on my Desktop PC (I just found out they have ports to the PC, mainly for messing around with)
It requires ARMv5 CPU, if you'll install Android on your desktop PC natively (e.g. not running emulator) it will not work, because it contains native C/C++ code, not only Java. It should run okay in emulator though.
I can make build that will include the native code compiled for both ARM and x86, never tried that however.
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Android port

Post by NekoMaster »

pelya wrote:
NekoMaster wrote:Will this port work in any version of Android? Because I'd like to mess around with android on my Desktop PC (I just found out they have ports to the PC, mainly for messing around with)
It requires ARMv5 CPU, if you'll install Android on your desktop PC natively (e.g. not running emulator) it will not work, because it contains native C/C++ code, not only Java. It should run okay in emulator though.
I can make build that will include the native code compiled for both ARM and x86, never tried that however.
Probably would be a good idea to apadt it for x86 cpus too since android is growing and if its already been ported to x86 then in the future there might be other low end x86 machines that might run android (like netbooks or low cost laptops)
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
SHADOW-XIII
Tycoon
Tycoon
Posts: 14275
Joined: 09 Jan 2003 08:37

Re: Android port

Post by SHADOW-XIII »

pelya wrote:
SHADOW-XIII wrote:pelya, not sure if you are aware but from NDK r5 whole app can be in C++ with nearly 0 java in it:
http://android-developers.blogspot.com/ ... eness.html
I'm aware of that, thanks, however I won't recode all my Java files in C++ - the SDL config code is already 60 kbytes in size, this will take ages.
Also NDK r5 contains an important bug:
http://groups.google.com/group/android- ... 776842041d
When I've compiled Free Heroes 2 with it the game froze at the end of turn. I did not try other apps, but I don't want to catch that subtle bug everywhere - I'll rather wait for NDK r5b.
I see but wonder if changing it back to only C/C++ will not be better from the longer time perspective (speed and possibility to add it to OTTD trunk?)
what are you looking at? it's a signature!
pelya
Transport Coordinator
Transport Coordinator
Posts: 342
Joined: 18 Nov 2010 19:48
Contact:

Re: Android port

Post by pelya »

SHADOW-XIII wrote:
pelya wrote:
SHADOW-XIII wrote:pelya, not sure if you are aware but from NDK r5 whole app can be in C++ with nearly 0 java in it:
http://android-developers.blogspot.com/ ... eness.html
I'm aware of that, thanks, however I won't recode all my Java files in C++ - the SDL config code is already 60 kbytes in size, this will take ages.
Also NDK r5 contains an important bug:
http://groups.google.com/group/android- ... 776842041d
When I've compiled Free Heroes 2 with it the game froze at the end of turn. I did not try other apps, but I don't want to catch that subtle bug everywhere - I'll rather wait for NDK r5b.
I see but wonder if changing it back to only C/C++ will not be better from the longer time perspective (speed and possibility to add it to OTTD trunk?)
OpenTTD sources do not contain any Java code, the Javas is only inside SDL port. Also it's used mainly for config dialog and initialization, so it won't get any faster if I'll recode it in C++ (maybe it become more buggy though :P ). The only bottleneck is the sound - it is passed to Java layer, and it's slow, however I won't be using non-Java SLES API because I'll lose compatibility to Android 1.6/2.0/2.1 . Maybe I'll add an optional SLES output in the future, but that requires quite some time and effort.
Also new libjnigraphics is reported to be faster than OpenGL-ES implementation I'm using, and it's supported on devices starting from Android 2.1, I'll add an optional support for it in the future (but screen magnifying glass will be disabled then, 'cause it's a plain pixel buffer, and it's not as flexible as OpenGL)
Sarvesh50
Engineer
Engineer
Posts: 63
Joined: 31 Mar 2008 16:29

Re: Android port

Post by Sarvesh50 »

works like s*** on the galaxy s
Image
Arie-
Director
Director
Posts: 593
Joined: 20 Jan 2009 16:07

Re: Android port

Post by Arie- »

Damn, was hoping to play OpenTTD on my new Desire Z this night, however, the offer T-mobile has in my country only concerns new clients, not for current customers. Looking for another deal now.
Arie-
Director
Director
Posts: 593
Joined: 20 Jan 2009 16:07

Re: Android port

Post by Arie- »

So downloading OpenTTD now on my brand new Desire Z, posting updates on experiences soon!

edit:So I've got it, however, an issue I ran into, but finally past that now: upon first use you have to work through this menu, however, you have to click the OK button in the end or else the SDL starter will not do anything. I've probably missed that read somewhere, but it works now.
User avatar
hyperpac
Engineer
Engineer
Posts: 3
Joined: 17 Aug 2004 22:57
Contact:

Re: Android port

Post by hyperpac »

Well this might be a bit offtopic but I shot a video based on the port from pelya where OpenTTD is controlled with a Bluetooth Mouse on a Samsung Galaxy Tab.

http://www.youtube.com/watch?v=9vILfIVkQ7I
:: I love it when a plan comes together ::
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Baidu [Spider] and 31 guests