Nothing entered.
[http://sourceforge.net/p/ufoai/patches/592 Item 592] imported from sourceforge.net tracker on 2013-01-28 20:43:43
Hi.
I\'ve made a port of UFO:AI to Android mobile platform.
It\'s largely unusable as of now:
- the colors are all messed up, many textures are over-brightened
- loading skirmish or battle crashes it with out-of-memory error - \"top\" on the device shows 514 Mb total and 311 Mb RSS RAM for ufoai process before crash, my device (HTC Evo) has 420 Mb total, and you\'re allocating 190 Mb tempMap buffer inside CMod_LoadRouting(), no wonder it crashes.
- GUI is unsuited for touchscreen, there are nice big buttons in main menu but you cannot buy anything on market because you cannot hit that tiny \"+/-\" buttons.
- There are many memory alignment errors, ARM CPU does not tolerate that - the most abusing code is inside Com_ParseValue() and other functions in scripts.c
- sound in intro video is choppy
- also it starts up for ages.
- but you can start the single-player game and load planet-view, it\'s totally messed up of course.
I will push the source code into separate Git branch if you\'ll allow me write access to your Git.
You should decide if you need Android support at all - I can fix the GFX bugs, but I won\'t redesign GUI and I won\'t optimize memory usage.
I can publish it to Market, however after publishing several apps I can tell that most of Android users are spoiled rich kiddos, so you have to polish the usability before publishing the app, or you\'ll quickly get below-the-floor ratings and it will be hard to fix your app karma after that.
Compiled package:
https://sites.google.com/site/xpelyax/Home/ufoai-tech-demo.apk?attredirects=0&d=1
Application data will be downloaded from the net on the first launch (it\'s 800 Mb), if you don\'t want that you can download it to your device SD card manually - put *.pk3 files from data2.zip in directory app-data/net.sourceforge.ufoai/base
http://sourceforge.net/projects/libsdl-android/files/UFOAI/data2.zip/download
and put the file libsdl-DownloadFinished-0.flag in directory app-data/net.sourceforge.ufoai
https://sites.google.com/site/xpelyax/Home/libsdl-DownloadFinished-0.flag?attredirects=0&d=1
===== Comments Ported from Sourceforge =====
====== pelya (2011-01-13 16:44:42) ======
Android-specifc patches, made from UFOAI master branch
====== pelya (2011-01-13 16:46:17) ======
Attached a patch and added quick build instructions to https://github.com/pelya/commandergenius/tree/sdl_android/project/jni/application/ufoai
====== bayo-fr (2011-01-13 21:56:25) ======
About Com_ParseValue, the big think to understand is the buffer is prealigned (not postaligned) outside of the function (for historic reason, and interface reason). THe job is done by Com_AlignPtr, then some call of this function can be missing, or vt_aligns can contain wrong values for ARM.
I can take a look at it.
BTW if you are interested, you should work to compile testall, it should be more interesting for us to extend unittests, with alignment checking or thing like that. If we v got the base code, of it we v got simulator of our buildbot it can became very interesting (dont know if it is possible).
====== bayo-fr (2011-01-13 22:30:35) ======
It looks like i wrongly align my ui_node in the memory. I dont know how i do it, but i commit a fix (5d3db6c7234457f327899dd8f5f8b2fc58f78598). I dont remove the debug code, cause it can be usefull to check regressions.
====== tlh2000 (2011-01-14 05:53:21) ======
i've given you write access to the git repo, but please use another branch (as you said)
====== tlh2000 (2011-01-14 06:00:58) ======
btw. if you can do that, it would be cool to only have one rendering of "polygons" and "quad" - it would be fine to render them all as triangles imo. it would also improve the compatibility for other egl based systems.
====== tlh2000 (2011-01-14 07:36:49) ======
i've extended the render initialization code to cleanup the OES string checks in function callbacks and extension strings.
====== pelya (2011-01-14 10:51:46) ======
$ git push origin master:android
Total 0 (delta 0), reused 0 (delta 0)
Pushing denied. Please contact mattn or tron to unlock you. (You are pelya.)
To ssh://pelya@ufoai.git.sourceforge.net/gitroot/ufoai/ufoai
! [remote rejected] master -> android (pre-receive hook declined)
error: failed to push some refs to 'ssh://pelya@ufoai.git.sourceforge.net/gitroot/ufoai/ufoai'
Seems like I cannot create branches. Please someone create a branch for me.
====== bayo-fr (2011-01-14 22:56:33) ======
There is an "android" branch now, maybe mattn create it
====== tlh2000 (2011-01-15 08:35:57) ======
indeed, i've created it for you. let me know if there are any other problems with it.
====== tlh2000 (2011-01-15 08:40:30) ======
we should note that some of your patches are no longer needed now.
* the mem alignment should be fixed, if not, see the ALIGN_PTR macro.
* the extension checking is also no longer needed
both were added to master already
instead doing something like this:
+#ifndef ANDROID
if (r_wire->integer)
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+#endif
i would rather do it like this:
#define glPolygonMode(param1, param2) {}
otherwise it would clubber the code too much imo.
====== nobody (2011-01-15 18:47:58) ======
I'll merge changes from master branch and push to Android branch in Monday.
====== pelya (2011-01-17 10:25:04) ======
Still cannot push
Pushing denied. Please contact mattn or tron to unlock you. (You are pelya.)
To ssh://pelya@ufoai.git.sourceforge.net/gitroot/ufoai/ufoai
! [remote rejected] android -> android (pre-receive hook declined)
error: failed to push some refs to 'ssh://pelya@ufoai.git.sourceforge.net/gitroot/ufoai/ufoai'
====== tlh2000 (2011-01-17 10:35:42) ======
ah sorry - i've added you to the project, but missed the hook script - give me a few minutes to unlock you. sorry again.
====== tlh2000 (2011-01-17 10:46:50) ======
ok, please try again.
====== pelya (2011-01-17 15:05:34) ======
ERROR: committer's email address <pelya@users.sourceforge.net> is invalid
NOTE: rejecting commit 1872900f40329c34c3bb9c68387a83a42080e12e on branch refs/heads/android
The same error was when I've used address x.pelya.x@gmail.com
====== tlh2000 (2011-01-17 21:19:37) ======
added pelya@users.sourceforge.net
====== pelya (2011-01-21 15:14:54) ======
I've committed my changes, closing the bug. I'll continue to work on that port, don't expect any miracles though - it will take quite some time just to fix the graphics output.