UFO:Alien Invasion

General => User modifications => Topic started by: pelya on January 13, 2011, 06:40:32 pm

Title: UFO:AI Android port
Post by: pelya on January 13, 2011, 06:40:32 pm
A port of UFO:AI to Android mobile platform.
Google Play page (https://play.google.com/store/apps/details?id=net.sourceforge.ufoai)
Android package file (http://sourceforge.net/projects/libsdl-android/files/UFOAI/)

You will need 1Gb RAM on your device (you'll get a warning if you have less), also it will download 1Gb data on the first launch.
Title: Re: UFO:AI Android port
Post by: Mattn on January 13, 2011, 09:00:27 pm
Quite cool. I have a galaxy s 9000. I'm very interested in this port. Unfortunately i have little time right now. But i will have a look tomorrow.
Title: Re: UFO:AI Android port
Post by: bayo on January 13, 2011, 10:15:37 pm
hehehe very nice. I download myself your framework port to android few weeks ago to work around UFOAI and Android... i dont yet check it, but sure u do a better job than me.

Thanks for your job. I will take a look too. Soon i will have some android phones and tablets to test what we can do with it. I think we can aim to provide a skirmish mode quite well. But it will need work.

BTW i dont think aiming the full game is a very good idea. That's IMO another subprojet, cause it really need too much work.
Title: Re: UFO:AI Android port
Post by: geever on January 13, 2011, 11:09:48 pm
BTW i dont think aiming the full game is a very good idea. That's IMO another subprojet, cause it really need too much work.

I've been thinking about if we could have a minihud or 2d hud version for older PCs or even phones/tablets that doesn't require much resources but the game would be still fun to play.

-geever
Title: Re: UFO:AI Android port
Post by: bayo on January 13, 2011, 11:55:10 pm
hope to have time to work on http://mattn.ninex.info/files/android/test-dyn.svg
maybe we also need to have special release pipeline to reduce texture size, or tweek thing like that
and use "simple" maps, with only one floor (or only few)

but what do you mean by  2d hud?
Title: Re: UFO:AI Android port
Post by: geever on January 14, 2011, 12:34:32 am
but what do you mean by  2d hud?

Well, not only hud but renderer/battlescape/whatever. Maybe topdown or fixed isometric view. The goal is to be fast&light.
The game is slow and waste resources now imho.

-geever
Title: Re: UFO:AI Android port
Post by: Mattn on January 14, 2011, 08:41:12 am
it would be really cool if you could attach the ufoconsole.log of the android startup.
Title: Re: UFO:AI Android port
Post by: H-Hour on January 14, 2011, 10:22:41 am
Re: maps. I'm happy to create a few simple one-level maps that use very basic brushes.

Alternatively, what about pre-rendering all the maps into isometric images that are spliced together? I guess there would still be the problem of calculating visibility.
Title: Re: UFO:AI Android port
Post by: geever on January 14, 2011, 10:50:55 am
Alternatively, what about pre-rendering all the maps into isometric images that are spliced together? I guess there would still be the problem of calculating visibility.

Radar images? We have support for tactical radar images but we lack most of them. They could be used as a top-down 2D map with some additional info about visibility.

-geever
Title: Re: UFO:AI Android port
Post by: H-Hour on January 14, 2011, 02:43:57 pm
Radar images? We have support for tactical radar images but we lack most of them. They could be used as a top-down 2D map with some additional info about visibility.

Yeah, although I was thinking more like at a 45 degree angle, like the old-school X-Com stuff. Top-down will only work if we want to get rid of all vertical play and have all the soldiers/aliens/civs walk only on one z-level.

I'm not opposed to that if it's important to make it low-impact for the Android, just saying.
Title: Re: UFO:AI Android port
Post by: bayo on January 14, 2011, 03:41:26 pm
rasterising a map, and allow to play it is imo a very big computation problem. No idea if it is possible.

BTW have you test to reduce texture sieze ? 1x1 32x32 pixels? can it help old card to work? A little script can do the job if it is need.

IMO your alien base looks quite simple and nice.
Title: Re: UFO:AI Android port
Post by: pelya on January 17, 2011, 11:31:54 am
So, did anyone succeed running this? I still cannot push to the Ufoai Git :( also I've found more bugs in my code, need time to fix them though.

rasterising a map, and allow to play it is imo a very big computation problem. No idea if it is possible.

That seem not that complicated if we'll just use OpenGL - from the map editor render each map tile to an off-screen surface or even to the screen (I mean big tile, like dropship or UFO), then get the resulting image and Z-buffer values using glReadPixels(). Then for each individual small tile, where soldiers will stand, check Z-buffer value and determine if there are any pixels that will cover the soldier, and also save that "visibility" images.
Then repeat for each floor level.
Those big tiles can be combined on-the-fly into an isometric game level just like you're doing that in 3D (but you'll have to combine "visibility" images on the tile borders, not that complicated too).

When rendering the soldiers there are two ways:

1. Draw the background to the near Z-Buffer plane. Then for each soldier, sorted from top to bottom:
    Disable Z-Buffer check.
    Render soldier 3-D model onto the background, so it will make a depth "hole" in Z-Buffer.
    Enable Z-buffer check
    Draw the "visibility" image with some alpha-blend value to the near Z-Buffer plane, that will make soldier model half-transparent but other background pixels will not change, because it will be applied only to a "hole" in Z-Buffer.
    This will also fill the "hole" in the Z-buffer, so when you'll render next soldier which will be close to the previous one the "visibility" image will not be applied twice on the first soldier.

2. Draw the background to the far Z-Buffer plane. Then for each soldier, sorted from top to bottom:
    Render soldier 3-D model normally.
    Call glAlphaFunc() so only non-transparent pixels will modify Z-Buffer.
    Draw the "visibility" image right before soldier with some alpha-blend value, that will make soldier model half-transparent, but will not change background pixels 'cause they have the same value.
    If two soldiers will stand near each other the "visibility" image from the second one may be applied to the first one, and this will create drawing artifacts.

That sounds easy, but require lot of developer time and small details sorted out.

Edit: I've made another build (https://sites.google.com/site/xpelyax/Home/ufoai-tech-demo.apk?attredirects=0&d=1), with slightly less memory usage - it uses just 170 Mb with loaded main menu.
Title: Re: UFO:AI Android port
Post by: bayo on January 17, 2011, 07:21:56 pm
There is some more thing to do for translucent and destructible surfaces (and maybe more?). But using zbuffer looks very interesting. But according to the fact that our top-down radar "feature" is waiting for a real autogen tool, i dont think wev got skill to do it, or no body take care about it.
Title: Re: UFO:AI Android port
Post by: pelya on January 18, 2011, 09:22:12 am
So, we DO have destructible surfaces?  :o
Title: Re: UFO:AI Android port
Post by: Kildor on January 18, 2011, 09:31:39 am
a bit of.
Title: Re: UFO:AI Android port
Post by: Lew Yard on January 18, 2011, 09:37:20 am
So, we DO have destructible surfaces?  :o

*shrug*  Haven't checked how they're implemented, but you can already shoot through windows, breaking them in the process.
Title: Re: UFO:AI Android port
Post by: bayo on January 27, 2011, 08:30:51 pm
Here some screenshot of the game on a Toshiba Folio 100 (Android 2.2).

As u can see it is quite nice and usable. The base layout is the only one i found watchable.

Control is horrible, i yet dont understand how to click on button, sometime it work, sometime not.

Title: Re: UFO:AI Android port
Post by: pelya on January 28, 2011, 10:57:22 am
To fix the controls click "Change device config" button at the startup, click "Mouse emulation" -> "Left mouse button" and select "Normal", or "Button", or whatever you like, you have to experiment with it a bit.
The default mouse click mode is configured for point-and-click games like ScummVM or Free Heroes 2, plus magnifying glass does not work with UfoAI 'cause it uses OpenGL (I might add some implementation using glCopyTexImage2D() for example)
Also people asked for a mouse control mode when touchscreen acts like laptop touchpad, I'll add that to SDL in a future.
Title: Re: UFO:AI Android port
Post by: pelya on February 01, 2011, 01:47:58 pm
Hey. I've fixed most of bugs with empty textures, check out this build (https://sites.google.com/site/xpelyax/Home/ufoai-tech-demo.apk?attredirects=0&d=1)
When I'll have some time I'll assemble the "demo" version, with few maps and all textures resized to 256x256, so it won't require 800 Mb download.

EDIT: I've moved some statically-allocated data to heap, and managed to start the africa_small skirmish map, with this build (https://sites.google.com/site/xpelyax/Home/ufoai.apk?attredirects=0&d=1) - it occupied 270 Mb RAM after loading (and my device max capacity is near 300 Mb RAM). Texture and lightmap sizes were set to smallest, sounds were turned off.
Also I've moved game data to "Additional downloads" section in SDL menu, so you have to enable it manually, or download data by hand.
Title: Re: UFO:AI Android port
Post by: bayo on February 01, 2011, 06:10:41 pm
Little screenshot.

There is some icon bug maybe cause is dont have the right "base" (it is a little older). And I dont start the skirmish for the same reason (iv got a "light" base without any maps). BTW, it looks like some models (maybe only animated models) embedded in the GUI are still not well displayed.

The white transparent box on the left-top is maybe a sdl_android feature.
Title: Re: UFO:AI Android port
Post by: pelya on February 04, 2011, 06:51:45 pm
I've made another build (https://sites.google.com/site/xpelyax/Home/ufoai.apk) , details here (http://ufoai.ninex.info/wiki/index.php/User:Bayo/Test)

Edit: I've updated that build - now the mouse movement is relative, like with a laptop touchpad ,should be more comfortable to control it.
Title: Re: UFO:AI Android port
Post by: pelya on March 07, 2011, 05:59:52 pm
I've made another build (https://sites.google.com/site/xpelyax/Home/ufoai.apk?attredirects=0&d=1) - nothing really new, just merged with master branch. Also GFX settings are automatically set to lowest, so it should give relatively many FPS (however the picture on screen sux).
Title: Re: UFO:AI Android port
Post by: pelya on May 20, 2011, 01:38:24 pm
I've finally published UfoAI to the Android market (https://market.android.com/details?id=net.sourceforge.ufoai)
Any comments about description and screenshots are appreciated
Title: Re: UFO:AI Android port
Post by: easycheese on June 05, 2011, 01:13:04 pm
Hey, I just found this in the market. (actually from wikipedia).  Awesome game, reminds me of a UFO game I played (not X-com).

Trying to play it on a tablet, figuring out the best settings right now.  It is a bit hard to read the text but I'm sure if I fiddle with the settings it will get better.  Working on the touch interface right now to figure out hte best thing.

But still....awesome!
Title: Re: UFO:AI Android port
Post by: pelya on June 05, 2011, 07:32:16 pm
I've kinda increased size of all fonts in game few days ago, some text is already out of the bounding boxes, so I cannot increase it even more, unless someone will redesign all GUI layout.
There are several GUI layouts for the battle screen, and the classic one is the best in my opinion, could you please test all layouts and tell which one is the best? They can be selected in Options->Game->HUD (and you have to restart the map)
Title: Re: UFO:AI Android port
Post by: easycheese on June 06, 2011, 05:21:27 pm
I didn't get a chance to test the layouts yet but here are my overall impressions (I should note, I was testing this on a xoom w/3.1)

I'm not sure how ports work but it seems you have built in interface that just interprets what the touches mean on the screen for the game (which is run separately?)

By far the best interface would be the touch one (where it clicks where you press) but since the game is designed for a computer screen, all the buttons are too small and difficult to press (especially the arrows on text fields).  Not to mention some text fields (aircraft stats), leave out ONE stat (making you have to scroll down to see accuracy).  Ideally the interface should be less cluttered so all the stats would be available.

I ended up using the laptop method and a 2nd finger to activate a click (right click disabled) but it got very tiring holding my hand up there.

I have attached pictures to show you what I mean about the text.  It isn't a size issue, its a pixelation issue. 

To be honest, this could be an EPIC game for a tablet.  Its perfect for touch based input but it really needs to have a totally redesigned GUI.  For example, on the bases page, using Honeycomb fragments, you could have the list (aircraft, research, production) on the left with the map on the right, then when you click a on research, it would remove the map and replace it with a research interface, leaving the lists up on the left so you could select a different area after you are done with research.  ALL buttons need to be larger for touch based input and the whole interface needs to be simplified (not in content but in accessibility since you don't have a mouse and keyboard).  Again, i have no idea how this port works and if this is even possible to implement...

That being said, if you intend to continue this project, I highly suggest you limit it on the market to tablets only initially.  Once that is working well you could reduce it for smaller devices.  Going from a computer w/multiple inputs is hard enough going down to a tablet, not to mention even smaller for a phone

Oh, also, it freezes up in the campaign mode when trying to play your first battle.  It goes to the black screen, music keeps playing but nothing happens.
Title: Re: UFO:AI Android port
Post by: Thrashard96 on July 08, 2011, 09:33:17 am
There is an issue with this game. On startup it shows me black screen, but the music is still going. Any suggestions?
Title: Re: UFO:AI Android port
Post by: pelya on July 08, 2011, 11:09:32 am
It really loads for ages, especially on the slower devices. Please try to set screen timeout to 10-30 minutes in settings, plug USB charger, and leave it loading for a while.
Also, if it crashes in the end, you may try to install aLogcat application and copy here it's output. 256 Mb RAM should be enough to load main menu at least.
Title: Re: UFO:AI Android port
Post by: pelya on November 25, 2011, 07:56:10 pm
New build (http://sourceforge.net/projects/libsdl-android/files/UFOAI/2.4.0.04/ufoai.apk), with all the latest changes merged, and with several GFX glitches (seems like alpha is missing on some textures).
I'll try to fix them next week, and update the build on Android Market.
Edit: I've fixed weird textures here's the new build (http://sourceforge.net/projects/libsdl-android/files/UFOAI/2.4.0.05/ufoai.apk/download)
Title: Re: UFO:AI Android port
Post by: zotje on December 09, 2011, 06:53:50 pm
http://sourceforge.net/projects/libsdl-android/files/UFOAI/2.4.0.05/ufoai.apk/download
This version is missing the ufoai.apk file...
Title: Re: UFO:AI Android port
Post by: pelya on December 10, 2011, 11:22:57 am
I've fixed the link. I intend to fix restoring from background, and add touch-anywhere-and-drag smartphone-like scrolling to the textlists, then I'll update the package on the Android Market.
Title: Re: UFO:AI Android port
Post by: zotje on December 10, 2011, 01:44:31 pm
Thank you for all your work.
Any particular reason why the packages have gotten so much larger btw?

Version 2.4.0.4 worked though with garbled graphics.
Version 2.4.0.5 loads to black screen and then terminates.

Code: [Select]
D/alogcat (17054): stopped
D/alogcat (17054): starting ...
D/AudioHardwareALSA( 2359):
D/AudioHardwareALSA( 2359):  ALSA OPEN mode 0,device 2
I/AudioHardwareALSA( 2359): Try to open ALSA PLAYBACK device AndroidPlayback_Speaker_normal
I/AudioHardwareALSA( 2359): Initialized ALSA PLAYBACK device AndroidPlayback_Speaker_normal
D/AudioHardwareALSA( 2359): Set PLAYBACK PCM format to S16_LE (Signed 16 bit Little Endian)
D/AudioHardwareALSA( 2359): Using 2 channels for PLAYBACK.
D/AudioHardwareALSA( 2359): Set PLAYBACK sample rate to 44100 HZ
D/AudioHardwareALSA( 2359): Buffer size: 2048
D/AudioHardwareALSA( 2359): Latency: 46439
W/PowerManagerService( 2463): Timer 0x3->0x3|0x3
I/AudioHardwareALSA( 2359): Output standby called!!. Turn off PCM device.
W/PowerManagerService( 2463): Timer 0x3->0x3|0x0
E/imdg81  ( 2463): IsShutDownStarted()
E/imdg81  ( 2463): IsShutDownStarted()
W/PowerManagerService( 2463): Timer 0x7->0x3|0x0
D/dalvikvm( 7380): GC_EXPLICIT freed 2640 objects / 142960 bytes in 165ms
D/NativeCrypto( 7380): Freeing OpenSSL session
V/WindowManager( 2463): Dsptch > Window{486453c8  paused=false}
V/WindowManager( 2463): Dsptch > Window{486453c8  paused=false}
V/alogcat (17054): save instance
V/alogcat (17054): paused
D/AudioHardwareALSA( 2359):
D/AudioHardwareALSA( 2359):  ALSA OPEN mode 0,device 2
I/AudioHardwareALSA( 2359): Try to open ALSA PLAYBACK device AndroidPlayback_Speaker_normal
I/AudioHardwareALSA( 2359): Initialized ALSA PLAYBACK device AndroidPlayback_Speaker_normal
D/AudioHardwareALSA( 2359): Set PLAYBACK PCM format to S16_LE (Signed 16 bit Little Endian)
D/AudioHardwareALSA( 2359): Using 2 channels for PLAYBACK.
D/AudioHardwareALSA( 2359): Set PLAYBACK sample rate to 44100 HZ
D/AudioHardwareALSA( 2359): Buffer size: 2048
D/AudioHardwareALSA( 2359): Latency: 46439
I/Zygote  (17078): Zygote: pid 17078 has INTERNET permission, then set capability for CAP_NET_RAW
I/System.out(17078): libSDL: Creating startup screen
I/System.out(17078): libSDL: Loading libraries
I/System.out(17078): libSDL: loaded GLESv2 lib
I/System.out(17078): libSDL: loading lib /data/data/net.sourceforge.ufoai/files/../lib/libsdl-1.2.so
D/dalvikvm(17078): Trying to load lib /data/data/net.sourceforge.ufoai/files/../lib/libsdl-1.2.so 0x4801da00
D/dalvikvm(17078): Added shared lib /data/data/net.sourceforge.ufoai/files/../lib/libsdl-1.2.so 0x4801da00
I/System.out(17078): libSDL: loading lib /data/data/net.sourceforge.ufoai/files/../lib/libsdl_net.so
D/dalvikvm(17078): Trying to load lib /data/data/net.sourceforge.ufoai/files/../lib/libsdl_net.so 0x4801da00
D/dalvikvm(17078): Added shared lib /data/data/net.sourceforge.ufoai/files/../lib/libsdl_net.so 0x4801da00
D/dalvikvm(17078): No JNI_OnLoad found in /data/data/net.sourceforge.ufoai/files/../lib/libsdl_net.so 0x4801da00, skipping init
I/System.out(17078): libSDL: loading lib /data/data/net.sourceforge.ufoai/files/../lib/libsdl_mixer.so
D/dalvikvm(17078): Trying to load lib /data/data/net.sourceforge.ufoai/files/../lib/libsdl_mixer.so 0x4801da00
D/dalvikvm(17078): Added shared lib /data/data/net.sourceforge.ufoai/files/../lib/libsdl_mixer.so 0x4801da00
D/dalvikvm(17078): No JNI_OnLoad found in /data/data/net.sourceforge.ufoai/files/../lib/libsdl_mixer.so 0x4801da00, skipping init
I/System.out(17078): libSDL: loading lib /data/data/net.sourceforge.ufoai/files/../lib/libsdl_image.so
D/dalvikvm(17078): Trying to load lib /data/data/net.sourceforge.ufoai/files/../lib/libsdl_image.so 0x4801da00
D/dalvikvm(17078): Added shared lib /data/data/net.sourceforge.ufoai/files/../lib/libsdl_image.so 0x4801da00
D/dalvikvm(17078): No JNI_OnLoad found in /data/data/net.sourceforge.ufoai/files/../lib/libsdl_image.so 0x4801da00, skipping init
I/System.out(17078): libSDL: loading lib /data/data/net.sourceforge.ufoai/files/../lib/libsdl_ttf.so
D/dalvikvm(17078): Trying to load lib /data/data/net.sourceforge.ufoai/files/../lib/libsdl_ttf.so 0x4801da00
D/dalvikvm(17078): Added shared lib /data/data/net.sourceforge.ufoai/files/../lib/libsdl_ttf.so 0x4801da00
D/dalvikvm(17078): No JNI_OnLoad found in /data/data/net.sourceforge.ufoai/files/../lib/libsdl_ttf.so 0x4801da00, skipping init
I/System.out(17078): libSDL: loading lib /data/data/net.sourceforge.ufoai/files/../lib/libtheora.so
D/dalvikvm(17078): Trying to load lib /data/data/net.sourceforge.ufoai/files/../lib/libtheora.so 0x4801da00
D/dalvikvm(17078): Added shared lib /data/data/net.sourceforge.ufoai/files/../lib/libtheora.so 0x4801da00
D/dalvikvm(17078): No JNI_OnLoad found in /data/data/net.sourceforge.ufoai/files/../lib/libtheora.so 0x4801da00, skipping init
I/System.out(17078): libSDL: loading lib /data/data/net.sourceforge.ufoai/files/../lib/libintl.so
D/dalvikvm(17078): Trying to load lib /data/data/net.sourceforge.ufoai/files/../lib/libintl.so 0x4801da00
D/dalvikvm(17078): Added shared lib /data/data/net.sourceforge.ufoai/files/../lib/libintl.so 0x4801da00
D/dalvikvm(17078): No JNI_OnLoad found in /data/data/net.sourceforge.ufoai/files/../lib/libintl.so 0x4801da00, skipping init
I/System.out(17078): libSDL: loading lib /data/data/net.sourceforge.ufoai/files/../lib/liblua.so
D/dalvikvm(17078): Trying to load lib /data/data/net.sourceforge.ufoai/files/../lib/liblua.so 0x4801da00
D/dalvikvm(17078): Added shared lib /data/data/net.sourceforge.ufoai/files/../lib/liblua.so 0x4801da00
D/dalvikvm(17078): No JNI_OnLoad found in /data/data/net.sourceforge.ufoai/files/../lib/liblua.so 0x4801da00, skipping init
I/System.out(17078): libSDL: loading lib /data/data/net.sourceforge.ufoai/files/../lib/libcurl.so
D/dalvikvm(17078): Trying to load lib /data/data/net.sourceforge.ufoai/files/../lib/libcurl.so 0x4801da00
D/dalvikvm(17078): Added shared lib /data/data/net.sourceforge.ufoai/files/../lib/libcurl.so 0x4801da00
D/dalvikvm(17078): No JNI_OnLoad found in /data/data/net.sourceforge.ufoai/files/../lib/libcurl.so 0x4801da00, skipping init
I/System.out(17078): libSDL: loading lib /data/data/net.sourceforge.ufoai/files/../lib/libmxml.so
D/dalvikvm(17078): Trying to load lib /data/data/net.sourceforge.ufoai/files/../lib/libmxml.so 0x4801da00
D/dalvikvm(17078): Added shared lib /data/data/net.sourceforge.ufoai/files/../lib/libmxml.so 0x4801da00
D/dalvikvm(17078): No JNI_OnLoad found in /data/data/net.sourceforge.ufoai/files/../lib/libmxml.so 0x4801da00, skipping init
I/System.out(17078): libSDL: Loading settings
I/System.out(17078): libSDL: Settings.Load(): enter
I/System.out(17078): libSDL: old cfg version 24005, our version 24005
I/System.out(17078): libSDL: Settings.Load(): loaded settings successfully
I/System.out(17078): libSDL: 3000-msec timeout in startup screen
I/ActivityManager( 2463): Displayed activity net.sourceforge.ufoai/.MainActivity: 490 ms (total 490 ms)
D/alogcat (17054): stopping ...
D/alogcat (17054): stopped
D/dalvikvm( 2463): GC_EXPLICIT freed 20059 objects / 1182256 bytes in 212ms
W/PowerManagerService( 2463): Timer 0x3->0x3|0x0
I/AudioHardwareALSA( 2359): Output standby called!!. Turn off PCM device.

Continued in next post...
Title: Re: UFO:AI Android port
Post by: zotje on December 10, 2011, 02:58:09 pm
Code: [Select]
I/System.out(17078): libSDL: Timeout reached in startup screen, process with downloader
I/System.out(17078): libSDL: Starting data downloader
I/System.out(17078): libSDL: Starting downloader
I/System.out(17078): libSDL: Initializing video and SDL application
V/SDL     (17078): GLSurfaceView_SDL::EglHelper::start(): creating GL context
D/libEGL  (17078): loaded /system/lib/egl/libEGL_POWERVR_SGX540_120.so
D/libEGL  (17078): loaded /system/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
D/libEGL  (17078): loaded /system/lib/egl/libGLESv2_POWERVR_SGX540_120.so
V/SDL     (17078): GL config 0: R5G6B5A0 depth 0 stencil 0 type 1 (GLES) caveat none nr 0 pos 2
V/SDL     (17078): GL config 1: R5G6B5A0 depth 24 stencil 8 type 1 (GLES) caveat none nr 0 pos 0
V/SDL     (17078): GL config 2: R5G6B5A0 depth 24 stencil 8 type 1 (GLES) caveat none nr 0 pos 0
V/SDL     (17078): GL config 3: R8G8B8A8 depth 0 stencil 0 type 1 (GLES) caveat none nr 0 pos 18
V/SDL     (17078): GL config 4: R8G8B8A8 depth 0 stencil 0 type 1 (GLES) caveat none nr 0 pos 18
V/SDL     (17078): GL config 5: R8G8B8A8 depth 24 stencil 8 type 1 (GLES) caveat none nr 0 pos 16
V/SDL     (17078): GL config 6: R8G8B8A8 depth 24 stencil 8 type 1 (GLES) caveat none nr 0 pos 16
V/SDL     (17078): GL config 7: R8G8B8A8 depth 24 stencil 8 type 1 (GLES) caveat none nr 0 pos 16
V/SDL     (17078): GL config 8: R8G8B8A8 depth 24 stencil 8 type 1 (GLES) caveat none nr 0 pos 16
V/SDL     (17078): GLSurfaceView_SDL::EGLConfigChooser::chooseConfig(): selected 1: R5G6B5A0 depth 24 stencil 8 type 1 (GLES) caveat none nr 0 pos 0
V/SDL     (17078): GLSurfaceView_SDL::EglHelper::createSurface(): creating GL context
I/System.out(17078): libSDL: DemoRenderer.onSurfaceCreated(): paused false mFirstTimeStart true
I/System.out(17078): libSDL: DemoRenderer.onSurfaceChanged(): paused false mFirstTimeStart false
I/libSDL  (17078): Physical screen resolution is 800x480, virtual screen 800x480
I/System.out(17078): libSDL: DrawLogo
D/dalvikvm(17078): GC_EXTERNAL_ALLOC freed 15147 objects / 377440 bytes in 25ms
D/dalvikvm(17078): Trying to load lib /data/data/net.sourceforge.ufoai/lib/libapplication.so 0x4801da00
D/dalvikvm(17078): Added shared lib /data/data/net.sourceforge.ufoai/lib/libapplication.so 0x4801da00
D/dalvikvm(17078): No JNI_OnLoad found in /data/data/net.sourceforge.ufoai/lib/libapplication.so 0x4801da00, skipping init
D/dalvikvm(17078): Trying to load lib /data/data/net.sourceforge.ufoai/lib/libsdl_main.so 0x4801da00
D/dalvikvm(17078): Added shared lib /data/data/net.sourceforge.ufoai/lib/libsdl_main.so 0x4801da00
D/dalvikvm(17078): No JNI_OnLoad found in /data/data/net.sourceforge.ufoai/lib/libsdl_main.so 0x4801da00, skipping init
I/System.out(17078): libSDL: setting envvar LANGUAGE to 'en_GB'
I/System.out(17078): libSDL: accelerometer start required: true
D/SensorManager(17078): ====>>>>>Num Sensor: 1
D/SensorManager(17078): ====>>>>>Num Sensor: 2
D/SensorManager(17078): ====>>>>>Num Sensor: 3
D/SensorManager(17078): ====>>>>>Num Sensor: 4
D/SensorManager(17078): ====>>>>>Num Sensor: 0
E/SensorManager(17078): ####### akmd2 started!!!
I/System.out(17078): libSDL: starting accelerometer
E/SensorManager(17078): registerListener 0:SMB380 delay:60
E/SensorManager(17078): =======>>>Sensor Thread RUNNING <<<========
D/sensor_stub( 2363): sensor_stub_activate sensors[00000001] mask[00000001]
D/sensor_stub( 2363): sensor_stub_activate current_active[00000010]
D/sensor_stub( 2363): sensor_stub_activate IN , LightSensor_enable: 1
D/sensor_stub( 2363): sensor_stub_activate OUT changed:0
D/sensor_stub( 2363): sensor_set_delay [60]
I/libSDL  (17078): Changing curdir to "/mnt/sdcard/app-data/net.sourceforge.ufoai"
I/libSDL  (17078): Calling SDL_main("sdl")
I/libSDL  (17078): param 0 = "sdl"
I/UFOAI   (17078): ---- endianness initialization -----
I/UFOAI   (17078): found little endian system
I/UFOAI   (17078):
I/UFOAI   (17078): ---- filesystem initialization -----
I/UFOAI   (17078): Adding game dir: ./base
I/UFOAI   (17078): Could not load './base/0base.pk3'
I/UFOAI   (17078): Added packfile ./base/0music.pk3 (65 files)
I/UFOAI   (17078): Added packfile ./base/1base.pk3 (4101 files)
I/UFOAI   (17078): Adding game dir: /mnt/sdcard/app-data/net.sourceforge.ufoai/.ufoai/2.4-dev/base
I/UFOAI   (17078): using /mnt/sdcard/app-data/net.sourceforge.ufoai/.ufoai/2.4-dev/base for writing
I/UFOAI   (17078): couldn't execute filesystem.cfg
I/UFOAI   (17078): couldn't execute default.cfg
I/UFOAI   (17078): couldn't execute config.cfg
I/UFOAI   (17078):
I/UFOAI   (17078): ----- network initialization -------
I/UFOAI   (17078): libcurl/7.21.3 zlib/1.2.3 initialized.
I/UFOAI   (17078):
I/UFOAI   (17078): ------ server initialization -------
I/UFOAI   (17078):
I/UFOAI   (17078): ----- console initialization -------
I/UFOAI   (17078): Console initialized.
I/UFOAI   (17078):
I/UFOAI   (17078): ------- video initialization -------
I/UFOAI   (17078): SDL version: 1.2.14
I/UFOAI   (17078): I: desktop depth: 16bpp
I/UFOAI   (17078): I: video memory: 131072
I/UFOAI   (17078): I: Available resolutions: 800x480 800x600 640x480 640x400 320x240 320x200 256x224 533x320 400x240 480x320 800x480 544x332 640x350 (13)
I/UFOAI   (17078): I: video driver: android
I/UFOAI   (17078): I: setting mode -1
I/UFOAI   (17078): I: set multisample buffers to 0
I/UFOAI   (17078): I: set swap control to 0
E/libSDL  (17078): ERROR: No video mode large enough for 1024x768
I/UFOAI   (17078): SDL SetVideoMode failed: No video mode large enough for 1024x768
I/UFOAI   (17078): Failed to set video mode 1024x768 fullscreen.
I/UFOAI   (17078): I: set multisample buffers to 0
I/UFOAI   (17078): I: set swap control to 0
I/libSDL  (17078): SDL_SetVideoMode(): application requested mode 800x480 OpenGL 2 HW 0 BPP 16
I/UFOAI   (17078): I: 800x480 (fullscreen: no)
E/libSDL  (17078): ERROR: GL_GetAttribute not supported
E/libSDL  (17078): ERROR: GL_GetAttribute not supported
E/libSDL  (17078): ERROR: GL_GetAttribute not supported
E/libSDL  (17078): ERROR: GL_GetAttribute not supported
E/libSDL  (17078): ERROR: GL_GetAttribute not supported
E/libSDL  (17078): ERROR: GL_GetAttribute not supported
E/libSDL  (17078): ERROR: GL_GetAttribute not supported
E/libSDL  (17078): ERROR: GL_GetAttribute not supported
I/UFOAI   (17078): GL_VENDOR:
I/UFOAI   (17078): Imagination Technologies
I/UFOAI   (17078):
I/UFOAI   (17078): GL_RENDERER:
I/UFOAI   (17078): PowerVR SGX 540
I/UFOAI   (17078):
I/UFOAI   (17078): GL_VERSION:
I/UFOAI   (17078): OpenGL ES-CM 1.1
I/UFOAI   (17078):
I/UFOAI   (17078): GL_EXTENSIONS:
I/UFOAI   (17078): GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_single_precision GL_OES_matrix_get GL_OES_read_format GL_OES_compressed_paletted_texture GL_OES_point_sprite GL_OES_point_size_array GL_OES_matrix_palette GL_OES_draw_texture GL_OES_query_matrix GL_OES_texture_env_crossbar GL_OES_texture_mirrored_repeat GL_OES_texture_cube_map GL_OES_blend_subtract GL_OES_blend_func_separate GL_OES_blend_equation_separate GL_OES_stencil_wrap GL_OES_extended_matrix_palette GL_OES_framebuffer_object GL_OES_rgb8_rgba8 GL_OES_depth24 GL_OES_stencil8 GL_OES_compressed_ETC1_RGB8_texture GL_OES_mapbuffer GL_OES_EGL_image GL_EXT_multi_draw_arrays GL_OES_required_internalformat GL_IMG_read_format GL_IMG_texture_compression_pvrtc GL_IMG_texture_format_BGRA8888 GL_EXT_texture_format_BGRA8888 GL_IMG_texture_stream GL_IMG_vertex_program
I/UFOAI   (17078):
I/UFOAI   (17078): OpenGL version detected: 1.1
I/UFOAI   (17078): GL_ARB_multitexture not found
I/UFOAI   (17078): Overriding GL_ARB_multitexture - it is always present in GLES
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glActiveTexture"): 0xac202b50
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glClientActiveTexture"): 0xac202c2c
I/UFOAI   (17078): GL_OES_texture_npot not found
I/UFOAI   (17078): GL_EXT_texture_filter_anisotropic not found
I/UFOAI   (17078): GL_EXT_texture_lod_bias not found
I/UFOAI   (17078): GL_ARB_vertex_buffer_object not found
I/UFOAI   (17078): GL_ARB_fragment_shader not found
I/UFOAI   (17078): GL_ARB_shading_language_100 not found
I/UFOAI   (17078): GLSL shaders unsupported by OpenGL implementation.
I/UFOAI   (17078): found GL_###_framebuffer_object
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glIsRenderbufferEXT"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glIsRenderbufferOES"): 0xac2037e4
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glBindRenderbufferEXT"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glBindRenderbufferOES"): 0xac2037fc
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glDeleteRenderbuffersEXT"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glDeleteRenderbuffersOES"): 0xac203810
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glGenRenderbuffersEXT"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glGenRenderbuffersOES"): 0xac203824
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glRenderbufferStorageEXT"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glRenderbufferStorageOES"): 0xac203838
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glRenderbufferStorageMultisampleEXT"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glRenderbufferStorageMultisampleOES"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glRenderbufferStorageMultisampleARB"): 0x0
I/UFOAI   (17078): glRenderbufferStorageMultisample### not found
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glGetRenderbufferParameterivEXT"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glGetRenderbufferParameterivOES"): 0xac20384c
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glIsFramebufferEXT"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glIsFramebufferOES"): 0xac203860
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glBindFramebufferEXT"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glBindFramebufferOES"): 0xac203878
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glDeleteFramebuffersEXT"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glDeleteFramebuffersOES"): 0xac20388c
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glGenFramebuffersEXT"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glGenFramebuffersOES"): 0xac2038a0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glCheckFramebufferStatusEXT"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glCheckFramebufferStatusOES"): 0xac2038b4
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glFramebufferTexture1DEXT"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glFramebufferTexture1DOES"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glFramebufferTexture1DARB"): 0x0
I/UFOAI   (17078): glFramebufferTexture1D### not found
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glFramebufferTexture2DEXT"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glFramebufferTexture2DOES"): 0xac2038e0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glFramebufferTexture3DEXT"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glFramebufferTexture3DOES"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glFramebufferTexture3DARB"): 0x0
I/UFOAI   (17078): glFramebufferTexture3D### not found
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glFramebufferRenderbufferEXT"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glFramebufferRenderbufferOES"): 0xac2038cc
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glGetFramebufferAttachmentParameterivEXT"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glGetFramebufferAttachmentParameterivOES"): 0xac2038f4
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glGenerateMipmapEXT"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glGenerateMipmapOES"): 0xac203908
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glDrawBuffers"): 0x0
I/libSDL  (17078): ANDROID_GL_GetProcAddress("glBlitFramebuffer"): 0x0
I/UFOAI   (17078): using GL_ARB_framebuffer_object
I/UFOAI   (17078): max draw buffers: 1
I/UFOAI   (17078): max render buffer size: 2048
I/UFOAI   (17078): max color attachments: 1
I/UFOAI   (17078): Invalid value for cvar r_programs
I/UFOAI   (17078): Invalid value for cvar r_postprocess
I/UFOAI   (17078): max supported vertex texture units: 0
I/UFOAI   (17078): max supported lights: 8
I/UFOAI   (17078): max texture units: 4
I/UFOAI   (17078): max texture coords: 4
I/UFOAI   (17078): max vertex attributes: 8
I/UFOAI   (17078): max varying floats: 202861916
I/UFOAI   (17078): max fragment uniform components: 202861916
I/UFOAI   (17078): max vertex uniform components: 202861916
I/UFOAI   (17078): max texture size: detected 2048
I/UFOAI   (17078): Using low resolution globe textures as requested.
I/UFOAI   (17078): not using GLSL shaders
I/UFOAI   (17078): SDL_image version 1.2.11
I/UFOAI   (17078): Could not load environment map 0
I/UFOAI   (17078): FS_RemoveFile: remove /mnt/sdcard/app-data/net.sourceforge.ufoai/.ufoai/2.4-dev/base/keys.cfg
I/UFOAI   (17078): There are still 1 opened files
I/UFOAI   (17078): Backtrace (run command "arm-eabi-gdb libapplication.so -ex 'list *0xaabbccdd'" where aabbccdd is a stack address below):
F/UFOAI   (17078): Error: Shutdown
D/Zygote  ( 2358): Process 17078 exited cleanly (1)
W/ISensorClient( 2363): transact([00000001]) failed
W/SensorService( 2363): gWeakClients->notify failed
D/alogcat (17054): stopping ...
D/alogcat (17054): canceling periodic saves
V/alogcat (17054): started
V/alogcat (17054): resumed
D/alogcat (17054): starting ...
D/dalvikvm(17054): GC_FOR_MALLOC freed 3510 objects / 517792 bytes in 66ms
I/dalvikvm(17054): Jit: resizing JitTable from 4096 to 8192
D/dalvikvm( 2463): GC_EXPLICIT freed 4573 objects / 221728 bytes in 205ms
W/PowerManagerService( 2463): Timer 0x3->0x3|0x3
D/GTalkService( 7380): [RosterMgr] roster not modified
D/GTalkService( 7380): [OtrMgr] OTR not modified
W/PowerManagerService( 2463): Timer 0x3->0x3|0x0
E/imdg81  ( 2463): IsShutDownStarted()
E/imdg81  ( 2463): IsShutDownStarted()
V/WindowManager( 2463): Dsptch > Window{48378100 AtchDlg:org.jtb.alogcat/org.jtb.alogcat.LogActivity paused=false}
V/WindowManager( 2463): Dsptch > Window{48378100 AtchDlg:org.jtb.alogcat/org.jtb.alogcat.LogActivity paused=false}
Title: Re: UFO:AI Android port
Post by: pelya on December 10, 2011, 09:04:15 pm
Seems like your 0base.pk3 got corrupted. Your log has line:
Quote
I/UFOAI   (17078): Adding game dir: ./base
I/UFOAI   (17078): Could not load './base/0base.pk3'
I/UFOAI   (17078): Added packfile ./base/0music.pk3 (65 files)
I/UFOAI   (17078): Added packfile ./base/1base.pk3 (4101 files)

while it should be

Quote
Adding game dir: ./base
Added packfile ./base/0base.pk3 (4078 files)

Could you please delete the directory app-data/net.sourceforge.ufoai on your SD card so it will re-download data files?
Also please deselect "Additional maps" and "Music" packages from the SDL startup config -> Downloads menu, I was testing it only with base files (you can always select them back later). The package size grew because of additional maps, and because I've included some hi-res textures into the "base" package (the earth image mainly, and by "hi-res" I mean 512x256, all other textures are resized to 256x256 or lower).
Title: Re: UFO:AI Android port
Post by: zotje on December 11, 2011, 12:44:18 am
Yep, redownloading 0base.pk3 solved the issue.
Everything loads fine now (including when music and extra maps are included).
Graphics problem from 2.4.0.4 is also fixed in this version.

The game crashed on going into the battlescape though.
If you want i can try this with the logger on again as well.

As for the interface. The laptop mouse effect worked well enough.
The only 2 real problems i had was when placing a base, the world was spinning at such a speed it was difficult to control where to place your base, and the rotate world/zoom buttons were very unresponsive in worldscape.
Title: Re: UFO:AI Android port
Post by: pelya on December 11, 2011, 01:22:34 am
Most probably it crashes because it eats up all memory.
How much RAM does your device have?
I could run skirmish mode with "training_a" map on my HTC Evo, which has something near 500 Mb RAM. There were no sounds installed (they are inside additional map pack, and instantly eat smth like 20 Mb RAM on load), and I've used "initial" weapon setting for both teams - that will give only knives to the soldiers, and won't load other weapon models.
My device can run UfoAI with bigger maps, but then it will kill all background processes, and if UfoAI itself is put to background - it will also immediately kill it, just to load back desktop. That's the reason behind "base pack" with only smallest maps.
Also, you can rotate the Earth by touching your device screen with two fingers, and sliding them.
Also it should support pinch-to-zoom and rotate on the battle map, however the speed is too fast for my device with it's 2-3 FPS - I've tried to modify default settings, but there's seems to be some hard limit on camera speed in source code.
Title: Re: UFO:AI Android port
Post by: H-Hour on December 11, 2011, 02:21:13 pm
Pelya, would you like an even simpler map with fewer textures to load? What eats up the RAM in the battlescape most? I could try reducing lightmap size and other things if it will help.
Title: Re: UFO:AI Android port
Post by: zotje on December 12, 2011, 05:43:13 pm
Yeah, i suspect so, it's only 304 MB.
Still, 500 MB bare minimum for a phone is quite steep.
Maybe you should consider reducing the textures even more instead of going for some hi-res ones.
Title: Re: UFO:AI Android port
Post by: pelya on December 13, 2011, 11:47:11 am
I don't know what eats that much RAM - when I'm loading the training_a map the UfoAI process eats 270 Mb RAM, when I put it to background all OpenGL textures are destroyed and it takes up 200 Mb RAM. So textures occupy only 70 Mb, everything else should be internal game structures, I wonder why it's that many.
I can try one lame-ass optimization - when loading map restart UfoAI process so it won't load any menu and earthscape data, only the battlescape, but I don't think it will change things dramatically.
There are some huge structures allocated for map BSP tree and for pathfinding, as far as I understood by reading sources halfyear ago.
Android 2.3 official device requirements document requires device to have at least 128 Mb userspace RAM (that is, not used by device drivers), Android 4.0 document requires 340 Mb userspace RAM - that's enough for most maps in UfoAI I guess.

Edit: training_a map launched from Skirmish menu, with multiplayer equipment takes 330 Mb RAM with sounds, and 280 Mb without them (I've removed sounds from 1base.pk3, add or remove few megabytes due to randomized item generation). lake_ice map did non load with sounds at all, but it loaded without them, and used 330 Mb RAM (but crashed after a while). And bunker map crashes even without sounds (I remember playing it halfyear ago though)

335 Mb is the limit of my HTC Evo, when it kills foreground app, it could be higher if the stock firmware wasn't preloaded with lot of crap, the home screen process is the biggest among them and takes up 70 Mb RAM. And the actual RAM accessible to user space is 425 Mb, as shown by "adb shell cat /proc/meminfo".
Title: Re: UFO:AI Android port
Post by: Sayman on May 28, 2012, 03:34:04 am
Hello.android port is still supported? i have problem with version 2.4.0.5 - sounds not working. if i set initialization all sounds, then game is crashed. my device is acer a500 with cusmnor rom by Thor (v14.2).
Title: Re: UFO:AI Android port
Post by: bayo on May 28, 2012, 09:16:59 am
No idea, but do you have 512MB of RAM?
Title: Re: UFO:AI Android port
Post by: Sayman on May 28, 2012, 10:13:29 am
no. have 490mb (max 502mb can free). but all previous versions have sounds (but have other bugs, like screen artifacts in 2.4.0.4 or just not readable fonts or uncontrolable UI).
Title: Re: UFO:AI Android port
Post by: Crystan on May 28, 2012, 12:21:29 pm
sounds not working
The most important part of the game does not work! Revolution!!!!! :D
Title: Re: UFO:AI Android port
Post by: pelya on May 28, 2012, 01:31:39 pm
Yeah, enabling sounds crashes the game, it's a bug, and this does not depend on the amount of RAM.
I'm gonna fix that someday, but right now I'm laaaaaaazy.
Title: Re: UFO:AI Android port
Post by: CyberSA on September 27, 2012, 10:06:52 am
Manual Download of PK3 files.

Hi Guys I do not want to download the files via my 3g account and trying via Wirless on my Xoom and it keeps dropping the line and says "Error Writting to . . ."

I have downloaded the files form the Website to my PC and even though I copy them to the tablet it keeps downloading them again and over writing the files i manually copied to the device.

Question: How do I copy the files to the Xoom and make sure the Program sees that the Files are allready downloaded?

Thanks for your help.

(also I would like to mod the PK3 files too so I hope your answer will help me to do this)
Title: Re: UFO:AI Android port
Post by: pelya on September 27, 2012, 01:24:57 pm
In the startup screen press the "Change device config" button, click "Downloads" -> "Additional downloads", and unselect all checkboxes.
Title: Re: UFO:AI Android port
Post by: CyberSA on September 28, 2012, 07:24:24 am
In the startup screen press the "Change device config" button, click "Downloads" -> "Additional downloads", and unselect all checkboxes.

Thanks - eventually worked that out - lol

Anyway great port - love it.
Title: Re: UFO:AI Android port
Post by: adonys on October 31, 2012, 06:10:46 pm
I've installed it on an ASUS TF700, but the game is only displayed in the bottom left part of the screen, and no matter what I've tried (changing resolutions for example), it won't run in full screen.

anyone has any idea about how to fix this, please?
Title: Re: UFO:AI Android port
Post by: raybutts82 on November 06, 2012, 09:09:31 pm
Is the sound working...anyone?

I think it runs pretty smooth on my open pandora, but when I activate sound the game crashes.

Any chances it's gonna get fixed? Or does anybody have a solution? It seems to be a common problem...

The game has still a great potential on android devices!!
Title: Re: UFO:AI Android port
Post by: Graiden on November 13, 2012, 05:10:31 pm
Hi everyone. I'd like to try version 2.5.0.06 from sourceforge but it fails to install. Some one have same issue?
Title: Re: UFO:AI Android port
Post by: pelya on November 16, 2012, 10:11:50 pm
I've published an update on Google Play, version 2.5.0.06. Your old savegames will not work, also it now requires 1Gb RAM (it never really worked on devices with 512Mb RAM anyway), and it will download 1Gb data from the net (it will remove old data files, and you cannot disable downloading, sorry. If you want to put your own data files - let it download once, then replace files on SD card).
There are bunch of improvements, I'm most proud of the fix for properly restoring it from the background.
The mouse is now in the tablet mode by default, you can enable relative movement/laptop mode from SDL menu.

Google Play page (https://play.google.com/store/apps/details?id=net.sourceforge.ufoai)
Android package file (http://sourceforge.net/projects/libsdl-android/files/UFOAI/)

Edit: and the very first review is that it won't run on the Galaxy Tab 2, with 687 Mb RAM - the user got scared with warning dialog (SDL reads /proc/meminfo to get that number, and it may vary on different devices and even different ROMs, because some part of RAM is used for kernel and GL textures), however I'm pretty much sure it will run, the mem usage on my device was under 400 Mb even on large maps. So I've updated it to version 2.5.0.07, the only change is that it will show warning, when there's less than 640 Mb total RAM. Also, you may now disable downloads by killing process, launching it again, going to SDL menu and unchecking all checkboxes inside downloads dialog.
Title: Re: UFO:AI Android port
Post by: Tempestine on November 20, 2012, 03:30:04 am
Hi,

Thank you for the update. Restoring from background is definately the best improvement!

Still having a problem where it crashes when loading one of my base maps when I am being invaded. I have played previous base invasion missions with no problem, but this one no matter what I do (i have turned all graphics right down and disabled sound) and it still crashes..

I also had a few issues with other maps such as skyscraper where it didnt load correctly.

Currently running on Asus tf300 with android 4.1.

Would attach a log of the crash or even a savegame but I cant seem to find them..
Title: Re: UFO:AI Android port
Post by: ShipIt on November 20, 2012, 06:35:49 am
Still having a problem where it crashes when loading one of my base maps when I am being invaded. I have played previous base invasion missions with no problem, but this one no matter what I do (i have turned all graphics right down and disabled sound) and it still crashes..

There was a recent problem with the base map crashing when you select more than eleven soldiers to defend the base.
Title: Re: UFO:AI Android port
Post by: Tempestine on November 20, 2012, 03:22:37 pm
Only selecting 8 soldiers to defend out of 13... I'll try again with reducing the number of soldiers.

Cheers

**Edit**

Unfortunately its still crashing... Could this be a ram issue?
Title: Re: UFO:AI Android port
Post by: pelya on November 21, 2012, 02:59:41 pm
I would be grateful if someone would go through all in-game dialogs, and write down all buttons/UI controls that need to be made bigger, to use with touchscreen (or just make few screenshots, here's how (http://www.makeuseof.com/tag/6-ways-to-take-screenshots-on-android/)).
I've modified only Market, Transfer, Research and Production dialogs, and soldiers/pilots lists in the Aircraft dialog. I probably won't touch Options dialogs - it's too big, and I don't expect anyone to modify video settings anyway. I'll try to fix other dialogs, most-used ones first.
Title: Re: UFO:AI Android port
Post by: stk2008stk on January 04, 2013, 11:49:38 pm
Hi all

Just registered here to say I have tested latest Android version on me Nexus 7 and it runs great but as said the gui is really hard on touch.

I have eased one issue by ticking (confirm movement) so now when I try to rotate the screen or move it at least my men wont wonder off LOL.

I all so noticed there is no way to pan and tilt the camera we can rotate and move it but not pan and tilt or can we?.

Thanks devs this is a great game and I am sure it will get much better for Android with further updates I look forward to them.
Title: Re: UFO:AI Android port
Post by: Starosta on January 30, 2013, 04:56:17 pm
I registered only to write comments about android version. I have v. 2.5.0.07 installed from Android Market on LG P990 (Optimus 2X) with 4 inch screen.

Immediately after start:
1. It is very dark everywhere, in geoscape and in base mode.
2. All font are very small. They should be approximately twice bigger.
3. Control is very hard. It is not touch-friendly. Very small touch area, I spent 2 h just trying to re-equip soldiers at the base.
4. Even clicking to load correct game is a challenge.

Geoscape mode.
5. Zoom work very bad. Game often starts to zoom back-forward or go to somewhere below earth surface.
6. Sending aircraft to intercept UFO is also a BIG challenge. You need to do a "double click" with fingers to a few pixel area. Nearly impossible. On average I need 10-20 attempts.
7. Going back to base-mode. The same problem. Will be nice to have separate button.

Combat mode.
7. I don't know I reached UFO one time only, and game crashed entering the combat.

General problem - control and interface is not touch oriented.

PocketUFO for Windows Mobile was much more playable.

Addition. May be it is not a bug, but: when Interceptor and dropship set to target one UFO, then after Interceptor shot UFO down, and start to return to base, dropship also starts to go back to base, instead of going to crash site.
Title: Re: UFO:AI Android port
Post by: geever on January 30, 2013, 05:26:07 pm
While I fully understand, that the interface-handling problems can be annoying, you should also understand that the the game was designed for PCs and the UI was optimized for monitors - and the port lacks some devs who would implement a new UI.

I would like to mention, that You could help making the Android version better too. These issues can be solved by editing some text based script-files.

-geever
Title: Re: UFO:AI Android port
Post by: H-Hour on January 30, 2013, 06:45:32 pm
As geever mentioned, the Android port is just that, a straight-up port from the PC. It needs some dedicated work to get it running well, and if you wanted to work on that you'd probably make a lot of people happy.
Title: Re: UFO:AI Android port
Post by: Starosta on January 31, 2013, 06:10:50 pm
Unfortunately, my area of competency is far from programming at all.
Title: Re: UFO:AI Android port
Post by: geever on January 31, 2013, 09:48:20 pm
Unfortunately, my area of competency is far from programming at all.

This is how a menu script looks like: https://github.com/ufoai/ufoai/blob/master/base/ufos/ui/market.ufo#L1

Mostly setting up widgets and actions.

-geever
Title: Re: UFO:AI Android port
Post by: Emoticon on April 02, 2013, 10:52:16 am
Would android port be supported with new versions?
EDIT: saw android.mk in git. Might invest some time into it myself.
Title: Re: UFO:AI Android port
Post by: DiS on April 07, 2014, 01:45:30 am
Great game, plays awesome on my ASUS HD10. The only Problem i have is that i can not turn my soldiers to a direction after a turn. Is it possible to add a small button to the Android ui for turning soldiers around? I get killed all the time because my soldiers are facing the walls all the time after a turn Lol. Otherwise awesome tablet game.
Title: Re: UFO:AI Android port
Post by: pelya on April 07, 2014, 10:13:44 am
I did not update that port for almost two years, how are you people doing?
I saw new GUI and some support for SDL2.
It's now possible to transfer ownership of apps between developers on Google Play, so if someone more active than me got a dev account there, I can do that (however it got 3 star rating, so you may wish to publish it as a new app).
Title: Re: UFO:AI Android port
Post by: Mattn on April 07, 2014, 06:24:13 pm
I'm having an account there, too. Feel free to transfer it. I would like to release a SDL2 version some day.
Title: Re: UFO:AI Android port
Post by: DiS on April 08, 2014, 12:20:36 am
So would any of you guys mind to add the "rotate" button to the Android ui? This would be awesome :-)
Title: Re: UFO:AI Android port
Post by: pelya on April 08, 2014, 08:26:01 pm
It is transferred, now Android UfoAI release is a property of Mattn (and trouble. And, heck, opportunity for advertisements, although I hope there won't be any).

Mattn, please use script contrib/installer/android/sign.sh to sign the app before release, the certificate should be the same as in the already released version.
Title: Re: UFO:AI Android port
Post by: DiS on April 08, 2014, 09:33:10 pm
Please post here whenever the New Version is available on the market  :)
Title: Re: UFO:AI Android port
Post by: rambo919 on September 12, 2014, 04:14:07 pm
Trying to get this for a friend that does not have internet, can a offline install be achieved with the apk and "ufoai-2.5-data.tar" file?
Title: Re: UFO:AI Android port
Post by: CharCamOlson on September 29, 2014, 08:45:41 pm
I'm reposting this here as well as an answer to anyone having control issues with the Android version of UFOAI:

"Okay, working off some comments from the makers who ported this to android, I have figured out some basics for making UFOAI playable on an ANDROID. Note that this is all done on by Galaxy Note 8.0, and Android Tablet. I don't know how you would do this on something the size of a phone.

So, first, you have to hit the Change Device Configuration button at the loading screen.

Next, hit the button for Mouse Emulation and then go to Calibrate Touchscreen Pressure. The program is going to ask you to drag your finger across the screen at typical pressure.

DON'T DO THIS.

Instead, drag your finger across the screen at a firm pressure that you wouldn't normally use. This calibrates the game so it will interpret your regular touch as a VERY LIGHT pressure.

Now, after calibrating for a high pressure, go to Left Mouse Click. I have left mouse click set to "Touch Screen With Force". As the screen is calibrated to a high pressure, it will now only interpret your touch as "with force" when you very deliberately press on it. If your press isn't recognized for a click, then either recalibrate OR use a different type of touch. The screen actually doesn't read force as much as it reads the contact area of your finger. A tiny contact is light force, a large contact is heavy force. So, if you use a fingertip to press on the screen, when it's calibrated for high pressure, it will always read that as light force. But, if you use the flat pad of your finger, or a thumb, then it will read that large contact as HIGH force.

This means that you can move the mouse with your fingertip and then click distinctly with your finger pad or your thumb. It takes some finesse, but it works. Also, to SCROLL, lightly move the mouse cursor to the edge of the screen in the direction you want to go. Move the curse back when you get where you want to go.

For RIGHT CLICK (which is the click you need to CHANGE THE DIRECTION YOUR SOLDIERS ARE FACING, among other things) go to the RIGHT CLICK option in the Mouse Calibration menu.

Once there, set it to Touch Screen with Second Finger.

With this option set, you can now put the mouse cursor on something with the tip of your index finger, then lightly tap the screen with your middle finger and get a RIGHT CLICK. It works great once you figure it out. Note: it is not a two finger press. You move the mouse cursor with your main finger with a light touch, then with your main finger still on the screen you bring your other finger down onto the screen as well.

Now, back out of Mouse Emulation and go to Remap Physical Keys. On my pad there are two physical keys besides the power and home buttons: Up Volume and Down Volume. I set these to be Page Up and Page Down. That means I can zoom in and zoom out with my Volume buttons when I am playing the game.

Now, you already got this one Cantor, but for anyone else, exit the configuration menu and get into the game. Once in the main game menu, open OPTIONS and go to GAMEPLAY. In gameplay, under Battlescape Settings, set Confirm Actions to YES. This makes it a lot less likely that you will give your troops the wrong order while you are trying to finesse the controls.

Okay, that's all I've figured out so for. It's still not perfect, but those changes do take the game from impossible to playable."