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

Offline Hythlodaeus

  • Colonel
  • ****
  • Posts: 276
    • View Profile
Re: Android Port
« Reply #30 on: December 01, 2013, 11:58:49 pm »
I was thinking Move Unit Up/Down could be made obsolete too, by simply giving a move command to the level directly above/below the unit. Would that work?
It would work, but it would make controlling a hella lot clunkier, especially when going up elevators or using a flying suit

And I'm not sure about removing "Show All Levels." I'd rather not remove functionality, and it is handy for quickly seeing if enemies are on the roof.
Trust me, it's obsolete, and no one likes it. Even PocketUFO removed it.

I do agree that the level up/down looks a bit jarring, but I really don't know a better way to have it. I don't think there's enough room on the bottom bar to put them.
No idea either.

As for the inventory button, I guess that works. If not, Minimap could be pushed into the pause menu as well, I suppose. With that and Prev Unit gone I guess there's room for Level Up/Down on the bottom after all.
Good idea.

While we're at it, can the menu/options button be removed too? I figure since Android phones usually have a dedicated Menu button it can just be called up by that instead.
Not entirely sure. How would that work?


Offline Hythlodaeus

  • Colonel
  • ****
  • Posts: 276
    • View Profile
Re: Android Port
« Reply #31 on: December 02, 2013, 12:08:39 am »
One more thing: you forgot the "Don't reselect unit button". A lot of people use that one for marking down units with all TUs spent.

Offline Tarvis

  • Colonel
  • ****
  • Posts: 111
    • View Profile
Re: Android Port
« Reply #32 on: December 02, 2013, 12:13:04 am »
One more thing: you forgot the "Don't reselect unit button". A lot of people use that one for marking down units with all TUs spent.
Since the goal is to save space, I figured this could be done by long-pressing Next Unit.

EDIT: Well I'm not sure I'm happy with how many buttons are now in the Options Menu, but here's my latest layout:
« Last Edit: December 02, 2013, 12:39:17 am by Tarvis »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3349
    • View Profile
Re: Android Port
« Reply #33 on: December 02, 2013, 02:10:28 am »
Its possible to do some limited transparency effect using palette tricks.

Offline Hythlodaeus

  • Colonel
  • ****
  • Posts: 276
    • View Profile
Re: Android Port
« Reply #34 on: December 02, 2013, 03:10:01 am »
Oh, another idea to save huge amounts of space: pull another pocket UFO and get rid of the stat bars completely. Show numbers only. Make a larger version of the numbers with an icon identifying each, and put the reaction icons on the left side of 'em, on smaller buttons. Like on PocketUFO, name and rank are only shown for a small amount of time when the trooper is selected or in the inventory menu. And don't worry, we have someone working on miniature rank icons.
« Last Edit: December 02, 2013, 03:12:50 am by Hythlodaeus »

Offline kkmic

  • Commander
  • *****
  • Posts: 582
  • Undefined
    • View Profile
Re: Android Port
« Reply #35 on: December 02, 2013, 10:36:48 am »
Where's the "Abort mission" button?

How about having some buttons performing a different task if taped, double-taped or long-taped?

For example, you can open the inventory on a single tap on the soldier's name and center on the soldier on a long tap on the soldier's name.

Speaking of the "abort mission", why not have the abort screen appear on a long tap on the end turn button?

Offline Tarvis

  • Colonel
  • ****
  • Posts: 111
    • View Profile
Re: Android Port
« Reply #36 on: December 02, 2013, 03:36:22 pm »
In that layout, Abort Mission and Minimap are moved to the Options menu. I don't really like it either, but I don't have much of a choice for getting everything to fit in a flush bar at the bottom. I'm fine with it for Abort Mission since you're only going to use it once per deployment (if at all) but I'm not sure about having Minimap there.

EDIT: Anyways. I really don't want to get rid of the graphical stat bars. Having just numbers doesn't really give you a good estimation of what the totals are. If anything, maybe the area could just be half as wide, but that would only add enough room for 1 button. Getting rid of the rank icon and using a mini-one right before the name would add a space for another button. So I guess that way the Center/End Turn buttons can go down on the main bar.

If possible, again the Reserve TUs button could be made into one button that calls up a menu to choose which one/toggle reserve crouching. Or, the Reserve Crouching could be set to be long-press on the Crouch button. I'd have to think of a graphical representation for that, though

I think I'll change the Center button to Minimap, since I think it might be used too often that going through the options menu to get it might be a pain. Centering could be long-pressing that, or as kkmic says, long-pressing the name/bars area instead.
« Last Edit: December 02, 2013, 05:36:00 pm by Tarvis »

Offline page

  • Sergeant
  • **
  • Posts: 20
    • View Profile
Re: Android Port
« Reply #37 on: December 02, 2013, 08:27:46 pm »
Wow, there's quite a lot of movement in here :) Well, first of all, a status update: I set double-click to walk by default, implemented double-click to shoot and scroll with finger sweep, back button to cancel, and some other little details.

Second, the problems:
  • Double click doesn't work particularly well, it's too easy to click on a different cell the 2nd time
  • I consider using the back button a temporary solution. It doesn't feel 'right' to step out of the screen + if someone were to port to ios, I think there is no such button there
  • Sweep to scroll clashes with moving the finger around and updating cursor position to aid in setting destination/objective

So, my short term ideas would be:
  • Add a confirm/cancel button pair, to be used when moving/shooting
  • Sweeping the finger around to set move/fire target
  • Sweep with two fingers to scroll

*And*, and that's a big *and*, I need an idea on how to implement turning the soldier. Without that we're doomed! Perhaps using some button as a kind of 'shift', to simulate right click?

What do you think?

p.s.: using menu button is not such a good idea, some devices don't have it + it would complicate a possible port to ios.
p.p.s.: I'm still not convinced we need long presses and I absolutely dislike double-press :) Not the least because this is not trivial to implement, but well, the UI rework also looks like not trivial tbh.

Offline Tarvis

  • Colonel
  • ****
  • Posts: 111
    • View Profile
Re: Android Port
« Reply #38 on: December 02, 2013, 11:14:14 pm »
We discussed a bit further back that the move/shoot box would work best if you could drag it around with your finger. Then you tap it again to confirm and fire. That way you don't need to have separate buttons, and you don't have to worry about being a tile or two off with your big fat stubby finger since you can drag it around for precision. Tapping elsewhere on the map would only move the move/target cursor, not actually move the unit.

Try out PocketUFO if you want to see how that works

Basically:
-Drag scroll on the map to move camera around. I don't think it should be two-finger scrolling, since some devices don't have multitouch support. Maybe there can be an option for scroll buttons/zones on the edges like PocketUFO?
-Swipe from unit to a direction to turn unit. Would work best if tiles were colored to show the new FOV before letting go of the unit
-Tap selected unit to make move box appear, drag/tap to move cursor, tap cursor to move unit
-Tap gun icon as usual to make shoot cursor appear, drag/tap to move cursor, tap cursor to fire. (Since there's no right click, perhaps a 'Cancel Aiming' option could be added to the firemode menu)


And as for long presses, it's either that or a more cluttered screen due to larger buttons. You could just use the original UI, but then it wouldn't control very well on a phone at all. I don't think the UI rework would be hard, at least if all the buttons are contained within the space of the original HUD. It would just have to be hardcoded, I think, since I don't believe the UI is externalized.

Anyway, I wouldn't have much hope for this going to iOS anyhow. It would be nice, but how would this go in the App Store unless new game content was made from scratch? Unless you can somehow make a deal with Firaxis or whoever owns the IP now to sell the game data with it as well. There's always jailbreaking, but I think that's a tiny fraction of people compared to Android users.
How does the Home button work on iOS anyways? Does it always close the application or does it work as a menu/back button in some apps? I don't have an iPhone so I can't confirm. I don't know what Android devices don't have a menu button, though...
« Last Edit: December 02, 2013, 11:29:20 pm by Tarvis »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3349
    • View Profile
Re: Android Port
« Reply #39 on: December 03, 2013, 12:23:42 am »
weapon button can be 'Cancel Aiming' button. It could work like toggle.

Offline Tarvis

  • Colonel
  • ****
  • Posts: 111
    • View Profile
Re: Android Port
« Reply #40 on: December 03, 2013, 01:32:46 am »
Well anyway. I think the new touch controls should be implemented before the UI changes, since those seem like the easiest task and can just be tweaked whenever down the line

Offline page

  • Sergeant
  • **
  • Posts: 20
    • View Profile
Re: Android Port
« Reply #41 on: December 04, 2013, 12:05:03 am »
Tarvis, so you would either scroll or change move target based on whether a soldier is selected? That doesn't seem really comfortable, as it does not allow to scroll to set the destination target. Same for shooting. Or have I misunderstood?

Otoh, swiping from the unit to turn seems a great idea :)

Offline page

  • Sergeant
  • **
  • Posts: 20
    • View Profile
Re: Android Port
« Reply #42 on: December 04, 2013, 09:27:07 am »
Replying to myself, I think I misunderstood. You only drag the destination/aiming cursor around iff you start dragging from the current cursor position. Is that right? That makes more sense.

Offline sidav

  • Sergeant
  • **
  • Posts: 19
    • View Profile
Re: Android Port
« Reply #43 on: December 04, 2013, 11:45:28 am »
Wow, true hope for a port! Guys, you're awesome! But my English skill doesn't allow me to clearly understand: all the talk in the topic is just a theoretical thoughts or someone really works on a port?
« Last Edit: December 04, 2013, 11:50:25 am by sidav »

Offline Tarvis

  • Colonel
  • ****
  • Posts: 111
    • View Profile
Re: Android Port
« Reply #44 on: December 05, 2013, 03:23:57 am »
Tarvis, so you would either scroll or change move target based on whether a soldier is selected? That doesn't seem really comfortable, as it does not allow to scroll to set the destination target. Same for shooting. Or have I misunderstood?

Otoh, swiping from the unit to turn seems a great idea :)
No no, my idea is swiping the map will ALWAYS move the camera. To drag the move/target box around you'd have to drag from the actual box/target itself, or tap (not swipe) on the map to move the box there instantly ala PocketUFO. So yeah, just like your second post

It'd take quite a bit of checking in code to do this, but it would handle great, I think. The hardest part would be untying the move/shoot cursors from the actual cursor (which would be the touch input) and selective scrolling based on where exactly you're swiping.

One thing I was thinking of though is that these changes can be coded for the PC version first, then ported over. Of course porting it to Java would take some effort, but testing it in Windows would be a lot easier and probably save time. The only thing you couldn't do on the PC is the multitouch pinch-zooming which probably will only happen on the geoscape anyhow.

Wow, true hope for a port! Guys, you're awesome! But my English skill doesn't allow me to clearly understand: all the talk in the topic is just a theoretical thoughts or someone really works on a port?
From what I understand, the porting itself is mostly complete (besides it being based on an older version of OpenXcom for now because it has to be ported from C to Java). Right now we're just discussing theoretically how to change the user interface to suit touchscreens/fingers. Currently it's just a 1:1 port of the PC version which might be okay for tablets but not phones with 4-5inch screens.
« Last Edit: December 05, 2013, 03:32:36 am by Tarvis »