Author Topic: Android Port (SDL2)  (Read 111570 times)

Offline balbaroth

  • Squaddie
  • *
  • Posts: 2
    • View Profile
Re: Android Port (SDL2)
« Reply #135 on: June 20, 2014, 04:45:42 pm »

Well, that won't work with any binary mod, but since Shoes has opensourced his changes, I guess it's just a merge and a build away. The real trouble is that I don't really want to get too far away from the main source tree (there are already enough things that may and will break in the future), and I've screwed with the build process too much without documenting anything. I'll try to provide the build instructions and scripts "soon" (well, as soon as I make them anyway, I'm still doing some things by hand).


Thanks for the fast reply :) ill be following your progress! Amazing work

Offline HunterZ

  • Sergeant
  • **
  • Posts: 33
    • View Profile
Re: Android Port (SDL2)
« Reply #136 on: June 20, 2014, 05:02:10 pm »
I see the appeal of the back button, but I'm not convinced. Back buttons, like many other Android things, are not as standard as you'd want: for example, I'm using a custom ROM with PIE controls (the ones that kinda "slide out" instead of always being on screen). The back button on these controls is not caught by the game, but instead screws up the game's window. Personally, I like the idea of "long tap to turn" much more. As for other things - doesn't the back button already cancel the current action? (yeah, I know I should know better, but hey, ROM screwing and all that  :) )
The back button does nothing right now as far as I can tell.

Maybe you could wire both long press and back button actions to simulate a right click? That would allow people to use either method for turning and canceling.

Offline kiksy

  • Squaddie
  • *
  • Posts: 6
    • View Profile
Re: Android Port (SDL2)
« Reply #137 on: June 21, 2014, 10:18:33 am »
Does anyone else have issues buying/selling items in the base screen? If I click to buy, quite often the button will get stuck and just max out. I kind of remember this may have been a bug in the original version?

Had a look around on here and no one else seems to have mentioned it though.

Offline HunterZ

  • Sergeant
  • **
  • Posts: 33
    • View Profile
Re: Android Port (SDL2)
« Reply #138 on: June 21, 2014, 05:08:32 pm »
Does anyone else have issues buying/selling items in the base screen? If I click to buy, quite often the button will get stuck and just max out. I kind of remember this may have been a bug in the original version?

Had a look around on here and no one else seems to have mentioned it though.
I haven't had that happen on my 2012 Nexus 7.

Offline Xuio

  • Squaddie
  • *
  • Posts: 3
    • View Profile
Re: Android Port (SDL2)
« Reply #139 on: June 21, 2014, 06:03:37 pm »
Does anyone else have issues buying/selling items in the base screen? If I click to buy, quite often the button will get stuck and just max out. I kind of remember this may have been a bug in the original version?

Had a look around on here and no one else seems to have mentioned it though.

Yes, i've noticed it too (and wrote about it few pages ago), especially with galaxy note 3 s-pen, but it happens also with finger control. 

Offline HunterZ

  • Sergeant
  • **
  • Posts: 33
    • View Profile
Re: Android Port (SDL2)
« Reply #140 on: June 21, 2014, 08:24:29 pm »
Converted the 48khz MT-32 OGGs to 44khz using Audacity and they still don't work on the Android version. Oh well, the SC-55 soundtrack is passable and I play with the sound off most of the time anyway.

Offline sfalexrog

  • Captain
  • ***
  • Posts: 56
    • View Profile
Re: Android Port (SDL2)
« Reply #141 on: June 23, 2014, 11:29:38 pm »
The back button does nothing right now as far as I can tell.

Maybe you could wire both long press and back button actions to simulate a right click? That would allow people to use either method for turning and canceling.

That's funny, because I didn't change a line of code concerning back button handling! Must be an SDL2 thing. Maybe that's also the case of Android not being too standard across the wide range of devices.

Converted the 48khz MT-32 OGGs to 44khz using Audacity and they still don't work on the Android version. Oh well, the SC-55 soundtrack is passable and I play with the sound off most of the time anyway.

That's strange; I've tried converting the files to 44khz and they worked. Maybe it's the bitrate issue? I didn't set the highest quality. Here's my files: https://dl.dropboxusercontent.com/u/732324/mt32-44khz.zip

Does anyone else have issues buying/selling items in the base screen? If I click to buy, quite often the button will get stuck and just max out. I kind of remember this may have been a bug in the original version?

Had a look around on here and no one else seems to have mentioned it though.


Yes, i've noticed it too (and wrote about it few pages ago), especially with galaxy note 3 s-pen, but it happens also with finger control. 

Huh, I remember making some changes to fix that kind of behavior, but either forgot to post it or the workaround didn't really work. Anyway, there were some recent changes within SDL2 that might've fixed the issue.

So, what am I missing... Oh, right.
New build everyone!
It's synched with the current nightly, so expect fixes and features from that to be present here.
For my part, the changes are minor:
 - Selected (aiming) weapon is highlighted by a red border (replacing the default blue-ish)
 - You can now long press to turn your unit in addition to swiping. Long press duration is 500 ms.

My Dropbox link is here: https://dl.dropboxusercontent.com/u/732324/OpenXcom-1.0-25a50398dc-bundle.apk
Also, I've tried putting the build as a mod on the mod portal: https://www.openxcom.com/mod/openxcom-android-nightly - but I'm not sure if I've done everything correctly.

Offline HunterZ

  • Sergeant
  • **
  • Posts: 33
    • View Profile
Re: Android Port (SDL2)
« Reply #142 on: June 24, 2014, 12:05:00 am »
Regarding the nightly:

Does it include the corresponding version of the data files from the OpenXcom Git repo?

What is the difference between the two files linked on the mod page?

Offline sfalexrog

  • Captain
  • ***
  • Posts: 56
    • View Profile
Re: Android Port (SDL2)
« Reply #143 on: June 24, 2014, 12:17:49 am »
Regarding the nightly:

Does it include the corresponding version of the data files from the OpenXcom Git repo?

What is the difference between the two files linked on the mod page?

Yes. I've hacked together a kind-of-auto-updater (the .apk has the data, translations and "universal" patch embedded inside it as .zips), so it checks if the files need updating and does that. No more worries about updating your data!

There is no difference, the file was not working for me the first time I've uploaded it, so I've tried to reupload (since the system told me I had no files) and bam - two files! (I'm good with computers, I swear!  :) )

Offline Xuio

  • Squaddie
  • *
  • Posts: 3
    • View Profile
Re: Android Port (SDL2)
« Reply #144 on: June 24, 2014, 01:11:22 am »
Huh, I remember making some changes to fix that kind of behavior, but either forgot to post it or the workaround didn't really work. Anyway, there were some recent changes within SDL2 that might've fixed the issue.

Wow it's fixed now, even with s-pen :-) Thank You!

Offline HunterZ

  • Sergeant
  • **
  • Posts: 33
    • View Profile
Re: Android Port (SDL2)
« Reply #145 on: June 24, 2014, 03:15:44 am »
That's strange; I've tried converting the files to 44khz and they worked. Maybe it's the bitrate issue? I didn't set the highest quality. Here's my files: https://dl.dropboxusercontent.com/u/732324/mt32-44khz.zip
Thanks, I'll give those a try. It looks like yours are 224kbps and mine turned out to be 160kbps.

Update: It works, thanks!
« Last Edit: June 24, 2014, 04:33:39 am by HunterZ »

Offline Minotaton

  • Squaddie
  • *
  • Posts: 4
    • View Profile
Re: Android Port (SDL2)
« Reply #146 on: June 25, 2014, 04:52:23 pm »
Great port. Works great apart from the space key doesn't work my plug in USB keyboard. Works fine outside the game. Also I can't download the nightly build from the mod portal. Says temporarily unavailable.

Offline meltyman

  • Squaddie
  • *
  • Posts: 2
    • View Profile
Re: Android Port (SDL2)
« Reply #147 on: June 25, 2014, 06:03:05 pm »
My tablet is Ramos i10 pro.

I have found following issues:
-Save/load -menus don't show date when game was saved. Only ???? where date should be
-When clicking "Don't reselect unit"-button in battle screen and all soldiers have been selected at once, game crashes.
-Battlescape scape doesn't work correcty: Only original-mode works. If i select full display and load battlescreen, I get blak screen. In other modes the action buttons are not visible.

Offline sfalexrog

  • Captain
  • ***
  • Posts: 56
    • View Profile
Re: Android Port (SDL2)
« Reply #148 on: June 26, 2014, 10:15:37 am »
I have found following issues:

Which version are you using? These issues sound suspiciously like the ones I've fixed some time ago. At the very least I couldn't reproduce them on my recent build.

Currently the thread for the new version is here: https://openxcom.org/forum/index.php?topic=2428.

Offline papamaanbeer

  • Sergeant
  • **
  • Posts: 47
    • View Profile
    • Twitch papamaanbeer
Re: Android Port (SDL2)
« Reply #149 on: September 05, 2014, 12:54:06 am »
i would love if some people that know how to do it would pick this up