Author Topic: Android Port (Old)  (Read 86792 times)

Offline sir_nacnud

  • Captain
  • ***
  • Posts: 54
    • View Profile
Android Port (Old)
« on: January 23, 2011, 01:49:46 am »
I have been working on porting OpenXcom to Android.  I am happy to report that I have OpenXcom running on Android!  With the except of tracking down a crash due to a bug in Surface::setPixel(), this wasn't too difficult, it was done in a couple evenings, less than a week.  In the YouTube video below you will see it running on a Samsung Fascinate.  It will be interesting to see how it performs on slower hardware.

This port uses a SDL port for android:
https://www.anddev.org/code-snippets-for-android-f33/sdl-port-for-android-sdk-ndk-1-6-t9218.html.

Repository is on github:
https://github.com/sirnacnud/openxcom-android

Progress of the port:
  • Virtual keyboard support. The SDL port has some support for a virtual keyboard, but not for so how we want to handle this.  I faked out the keyboard input in the video for naming a new base since the Fascinate doesn't have a physical keyboard.
  • UI usability with touch screen.  You will notice in the video I have a magnifying mouse cursor, this is provided by the SDL port.  The buttons are so small it makes them very hard to use with your finger, the magnification helps out some.  In the end I think a better solution would be to make the UI more finger friendly, while maintaining a look that is true to the original.
  • Wide chacter support. Android doesn't support wide characters.  With a recent change, openxcom now uses wide characters for Unicode.  This doesn't work on Android.

Here is a video of the port in action:
https://www.youtube.com/watch?v=J073Ej_g9gM

« Last Edit: February 12, 2014, 05:34:33 am by SupSuper »

Offline pmprog

  • Commander
  • *****
  • Posts: 647
  • Contributor
    • View Profile
    • Polymath Programming
Re: Android Port
« Reply #1 on: January 23, 2011, 11:27:00 am »
Looks rather awkward to use IMHO, but well done on the port

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Android Port
« Reply #2 on: January 23, 2011, 01:14:12 pm »
A pen would probably work better, but I'm guessing the screen only works with fingers? Anyway, it looks promising.

Offline sir_nacnud

  • Captain
  • ***
  • Posts: 54
    • View Profile
Re: Android Port
« Reply #3 on: January 23, 2011, 08:08:04 pm »
It is a capacitive touch screen, so you can only use your finger.  Pretty much all smart phones now days use capacitive touch screens.

I will be looking in to why touch input is working so poorly.  I think some of it has to do with the UI buttons being small, but I think there is problem with the SDL port as well.  It will be improved so you don't have to use the goofy magnifying mouse cursor.

Keep in mind this is a first pass/proof of concept demo, it is not in a state that I would consider releasable/playable.

Offline Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: Android Port
« Reply #4 on: January 24, 2011, 01:55:13 am »
i think you will need change UI of game to work better with big fingers :>
e.g. menu buttons should be hided and only one with "<" will show. when you click it will show menu (3x or more in size)
problem will be with battlescape because of multiple buttons in UI.

Offline michal

  • Commander
  • *****
  • Posts: 629
    • View Profile
Re: Android Port
« Reply #5 on: January 27, 2011, 03:36:26 pm »
I also afraid that without making alternative UI, it will be very hard to play openxcom on touch screens.

I guess you could look how Pocket Ufo guys made theirs ui.

There were also version for normal PC / windows but i can't find it anymore :(

Offline hsbckb

  • Colonel
  • ****
  • Posts: 275
  • Gill Man
    • View Profile
Re: Android Port
« Reply #6 on: January 28, 2011, 04:47:00 am »
Hi,

You can download the PC version of Pocket UFO by following this URL:

https://pocket-ufo.en.softonic.com/pocketpc/download


Please take a look ;D



Offline sir_nacnud

  • Captain
  • ***
  • Posts: 54
    • View Profile
Re: Android Port
« Reply #7 on: January 29, 2011, 02:17:33 am »
Thanks, I will check it out.

Offline sir_nacnud

  • Captain
  • ***
  • Posts: 54
    • View Profile
Re: Android Port
« Reply #8 on: January 31, 2011, 02:35:08 am »
The repository for my port is now up on github.  See first post for details.

Offline liamdawe

  • Sergeant
  • **
  • Posts: 27
    • View Profile
Re: Android Port
« Reply #9 on: February 06, 2011, 12:26:22 pm »
Wicked port idea, i will be buying an Android tablet, maybe the Motorola Xoom so this is one on my radar :D

Offline sir_nacnud

  • Captain
  • ***
  • Posts: 54
    • View Profile
Re: Android Port
« Reply #10 on: February 28, 2011, 02:37:22 am »
Just got sounds and music working!

Offline hsbckb

  • Colonel
  • ****
  • Posts: 275
  • Gill Man
    • View Profile
Re: Android Port
« Reply #11 on: February 28, 2011, 05:25:10 am »
Just got sounds and music working!

Congratulation. Do you think the UI design of Pocket UFO is useful?

Offline sir_nacnud

  • Captain
  • ***
  • Posts: 54
    • View Profile
Re: Android Port
« Reply #12 on: February 28, 2011, 06:35:34 am »
Just got sounds and music working!

Congratulation. Do you think the UI design of Pocket UFO is useful?

I checked it out on PC.  I thought the way they did the globe was interesting.  Overall, the UI seemed like it was supposed to be used with a stylus, rather than a finger.  I noticed buttons were still fairly small.  I will probably poke around with it some more.

Right now my plan with the android port is to try and keep the look consistent with OpenXcom, but improve the UI to be more finger friendly.  This will mainly involve increasing the size of the buttons and moving UI elements around to better suit finger use.  I also plan on adding dragging to certain aspects of the UI, like the globe on the Geoscape and probably the map on the Battlescape.

Offline michal

  • Commander
  • *****
  • Posts: 629
    • View Profile
Re: Android Port
« Reply #13 on: February 28, 2011, 02:15:26 pm »
I also plan on adding dragging to certain aspects of the UI, like the globe on the Geoscape and probably the map on the Battlescape.

Some of that features probably could be merged back to pc openxcom as well. Btw, where you will be coding those? In your fork/branch on github or in another project?

Edit:

Hmm, i just found that project https://github.com/sirnacnud/openxcom-mine

Why another project? Why not fork of https://github.com/SupSuper/OpenXcom ?

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2159
    • View Profile
Re: Android Port
« Reply #14 on: February 28, 2011, 02:58:23 pm »
He probably made it before OpenXcom officially moved to Git.

I also use a stylus with my smartphone so I don't have a big issue with X-Com's interface (plus phones are 320x200 so there's not a whole lot of room for improvement). However, an alternative would be to change the game's input system so, instead of checking which button is exactly under the cursor, it checks which button is *closest* to the cursor (up to a certain distance), therefore allowing a bigger margin of error which comes from "finger pressing".