Difference between revisions of "Android port (OpenXcom)"

From UFOpaedia
Jump to navigation Jump to search
Line 1: Line 1:
There is a work-in-progress port to Android of OpenXcom here: [https://github.com/cpages/OpenXcom/tree/android github link]
+
=v1.0=
 +
 
 +
There is a work-in-progress port to Android of OpenXcom here: [https://github.com/sfalexrog/OpenXcom/ github link]
  
=Installation instructions=
+
==Installation instructions==
 
* Install OpenXcom on your PC/Mac and make sure it's working. You'll need original data for this step.
 
* Install OpenXcom on your PC/Mac and make sure it's working. You'll need original data for this step.
 
* Get the OpenXcom apk from the [http://openxcom.org/downloads/ official site] or [http://openxcom.org/forum/index.php?topic=1864 android port forum thread] and install it on your device. Note that the builds in the forum thread are signed with a debug certificate, so you'll need to uninstall first if you're coming from an earlier build.
 
* Get the OpenXcom apk from the [http://openxcom.org/downloads/ official site] or [http://openxcom.org/forum/index.php?topic=1864 android port forum thread] and install it on your device. Note that the builds in the forum thread are signed with a debug certificate, so you'll need to uninstall first if you're coming from an earlier build.
Line 7: Line 9:
 
* That's it! You're good to go.
 
* That's it! You're good to go.
  
=I just want to play=
+
=v0.9=
 +
 
 +
There is a work-in-progress port to Android of OpenXcom here: [https://github.com/cpages/OpenXcom/tree/android github link]
 +
 
 +
==I just want to play==
 
Ok, so if you're too lazy to build it ;) and just want to give it a try, here are the steps you should follow:
 
Ok, so if you're too lazy to build it ;) and just want to give it a try, here are the steps you should follow:
 
* Get the beta3 apk [http://openxcom.org/download/mobile/OpenXcom-v0.9-beta3.apk from here] and install (you'll have to trust me on this, but it only asks for filesystem access)
 
* Get the beta3 apk [http://openxcom.org/download/mobile/OpenXcom-v0.9-beta3.apk from here] and install (you'll have to trust me on this, but it only asks for filesystem access)
Line 14: Line 20:
 
* Another, easier way to get the proper data would be to install the desktop version of OpenXcom, then copy the contents of its data folder to /sdcard/openxcom/data. Note that you STILL need the original data during the desktop OpenXcom installation.
 
* Another, easier way to get the proper data would be to install the desktop version of OpenXcom, then copy the contents of its data folder to /sdcard/openxcom/data. Note that you STILL need the original data during the desktop OpenXcom installation.
  
=Building from sources (linux)=
+
==Building from sources (linux)==
 
So you're in for the hard route. It's been a while since I set up my build env so I might miss some detail, but I'll try to give an overview of how to build and point out the main caveats you may encounter:
 
So you're in for the hard route. It's been a while since I set up my build env so I might miss some detail, but I'll try to give an overview of how to build and point out the main caveats you may encounter:
 
* Install android sdk & ndk
 
* Install android sdk & ndk
Line 40: Line 46:
 
* If you have your android device plugged in, 'ant debug install'
 
* If you have your android device plugged in, 'ant debug install'
  
=Differences with PC version (battlescape)=
+
==Differences with PC version (battlescape)==
 
* Path preview is enabled by default
 
* Path preview is enabled by default
 
* Shoot works in the same way as path preview, first press to aim, second to shoot
 
* Shoot works in the same way as path preview, first press to aim, second to shoot
Line 47: Line 53:
 
* Swipe from selected soldier to make him turn and open doors
 
* Swipe from selected soldier to make him turn and open doors
  
=Known issues=
+
==Known issues==
 
* Don't leave the game while in text enter mode. When going back, it won't reappear and you'll be stuck editing the text.
 
* Don't leave the game while in text enter mode. When going back, it won't reappear and you'll be stuck editing the text.
 
* On a few devices, the colors appear wrong (shades of pink). It can be worked around by disabling the 'hardware overlay' in 'developer settings'
 
* On a few devices, the colors appear wrong (shades of pink). It can be worked around by disabling the 'hardware overlay' in 'developer settings'
  
=Changelog=
+
==Changelog==
 
* beta3 (13/05/14)
 
* beta3 (13/05/14)
 
** Update to upstream 9d292a2a82
 
** Update to upstream 9d292a2a82
Line 68: Line 74:
 
** [https://drive.google.com/file/d/0B3hKlvL6jSs8Rkpla0s3SGJYSEk data + music]
 
** [https://drive.google.com/file/d/0B3hKlvL6jSs8Rkpla0s3SGJYSEk data + music]
  
=Contact=
+
==Contact==
 
You can post on the [http://openxcom.org/forum/index.php?topic=1864.0 forum thread] or try to reach me on irc channel openxcom@freenode (nick 'page').
 
You can post on the [http://openxcom.org/forum/index.php?topic=1864.0 forum thread] or try to reach me on irc channel openxcom@freenode (nick 'page').
  
 
[[Category:OpenXcom]]
 
[[Category:OpenXcom]]

Revision as of 15:59, 14 June 2014

v1.0

There is a work-in-progress port to Android of OpenXcom here: github link

Installation instructions

  • Install OpenXcom on your PC/Mac and make sure it's working. You'll need original data for this step.
  • Get the OpenXcom apk from the official site or android port forum thread and install it on your device. Note that the builds in the forum thread are signed with a debug certificate, so you'll need to uninstall first if you're coming from an earlier build.
  • Copy the contents of your data folder from PC/Mac to /sdcard/OpenXcom/data on your device.
  • That's it! You're good to go.

v0.9

There is a work-in-progress port to Android of OpenXcom here: github link

I just want to play

Ok, so if you're too lazy to build it ;) and just want to give it a try, here are the steps you should follow:

  • Get the beta3 apk from here and install (you'll have to trust me on this, but it only asks for filesystem access)
  • Get the OpenXcom data. Unzip all of this in your phone under /storage/sdcard0/openxcom (you should have a /sdcard simlink, so /sdcard/openxcom should work too). If you have an external sd card, you can also place it there (/storage/extSdCard/openxcom).
  • You also need a copy of the original data (you can get that in many places if you don't have it, like steam). Copy the following folders in the same place (/sdcard/openxcom/data): GEODATA GEOGRAPH MAPS ROUTES SOUND TERRAIN UFOGRAPH UFOINTRO UNITS
  • Another, easier way to get the proper data would be to install the desktop version of OpenXcom, then copy the contents of its data folder to /sdcard/openxcom/data. Note that you STILL need the original data during the desktop OpenXcom installation.

Building from sources (linux)

So you're in for the hard route. It's been a while since I set up my build env so I might miss some detail, but I'll try to give an overview of how to build and point out the main caveats you may encounter:

  • Install android sdk & ndk
  • Check out the android branch from my github clone mentioned above
  • Put all the dependencies sources in the jni folder. Simlinks come in really handy, mine ended up looking like this:
[page@leaf:~/dev/OpenXcom/android]$ ls -l jni/
total 10
-rw-r--r--  1 page users   37 13 mai 21:43 Android.mk
-rw-r--r--  1 page users  216 18 mai 02:19 Application.mk
lrwxrwxrwx  1 page users   64 11 nov  2013 boost -> /nix/store/jqahwzcg7lags4k21vhr2d8zq931c359-boost-headers-1.54.0
lrwxrwxrwx  1 page users   37 16 nov  2013 libmikmod -> SDL2_mixer/external/libmikmod-3.1.12/
lrwxrwxrwx  1 page users   34 16 nov  2013 libwebp -> SDL2_image/external/libwebp-0.3.0/
lrwxrwxrwx  1 page users   28 11 nov  2013 SDL -> /home/page/dev/3rdparty/SDL/
lrwxrwxrwx  1 page users   21 11 nov  2013 SDL2_image -> /tmp/SDL2_image-2.0.0
lrwxrwxrwx  1 page users   21 16 nov  2013 SDL2_mixer -> /tmp/SDL2_mixer-2.0.0
drwxr-xr-x 10 page users 1736  1 mai 17:20 SDL_gfx
lrwxrwxrwx  1 page users   33 16 nov  2013 smpeg -> SDL2_mixer/external/smpeg2-2.0.0/
drwxr-xr-x  2 page users  120 18 mai 02:19 src
lrwxrwxrwx  1 page users   20 11 nov  2013 yamlcpp -> /tmp/yaml-cpp-0.5.1/
  • SDL version used is written in the changelog below
  • Notice that it's SDL_gfx, not SDL2_gfx. Also, you need to apply this patch (only present in svn, not latest tarball) for it to compile against SDL2.
  • Go to android folder and run 'ndk-build' and 'ant debug' (for release you need to setup a key)
  • If you have your android device plugged in, 'ant debug install'

Differences with PC version (battlescape)

  • Path preview is enabled by default
  • Shoot works in the same way as path preview, first press to aim, second to shoot
  • Phone back button acts as right button (quits shooting mode, for instance)
  • Swipe map to scroll
  • Swipe from selected soldier to make him turn and open doors

Known issues

  • Don't leave the game while in text enter mode. When going back, it won't reappear and you'll be stuck editing the text.
  • On a few devices, the colors appear wrong (shades of pink). It can be worked around by disabling the 'hardware overlay' in 'developer settings'

Changelog

  • beta3 (13/05/14)
    • Update to upstream 9d292a2a82
    • Update SDL2 to 8767
    • OGG music is no longer needed (thanks to upstream)
    • Music no longer plays when entering background
    • Fixed turning on change soldier bug
    • Swiping map to scroll doesn't update destination position
  • beta2(r1) (21/02/14)
    • Update to upstream 0d04dcc
    • Update SDL2 to 8225
    • Exiting the app now works (thanks to SDL update)
    • Fixes #460 (exit units stats page with back button)
  • beta1

Contact

You can post on the forum thread or try to reach me on irc channel openxcom@freenode (nick 'page').