[TouchMod] Touchpad like control-scheme

Subforum for discussion and help with ScummVM's Android port

Moderator: ScummVM Team

das_weezul
Posts: 23
Joined: Thu Sep 09, 2010 9:02 pm

[TouchMod] Touchpad like control-scheme

Post by das_weezul »

Hi there!

As I already suggested some alternative input-strategies a while ago (http://forums.scummvm.org/viewtopic.php?t=8386) and some other people mentioned similar ideas, I decided to dive into the scummvm sources myself and play around a bit. With some help from the great folks at the #scummvm IRC channel I managed to build the sources myself.

I whipped up a scummvm version with the control scheme I mentioned in the other thread:

* You move the cursor like you would by using a touchpad
* A left-click is being executed by tapping
* A right-click is being executed by bringing down your finger and holding it in position for 500ms

That's it, easy as pie :D

I tested it with the floppy version of "Beneath A Steel Sky" on an HTC Magic running Android 2.2 (Cyanogenmod 6). Please try my Mod and tell me what you think!

I've compiled the scummvm.apk and (most) engine plugins. You can find them in the download-section on the TouchMod google-code page:

http://code.google.com/p/scummvm-android-touchmod/

v0.04
* ADDED: UPPER_RIGHT corner region now brings up the soft-keyboard (hopefully)

v0.03
* ADDED: Corner regions. UPPER_LEFT=MENU; UPPER_RIGHT=i; LOWER_LEFT=left-click; LOWER_RIGHT=right-click
* FIXED: Built with MP3 (libmad) and OGG (libogg, libvorbis) enabled

v0.02
Fixed:
* Now a left click won't be executed by lifting the finger after a right-click

v0.01

Note:
There is a known issue with the svn version of scummvm: Please set the audio in "Options > Audio" to something different than "default" or "MT-32 Emulator".

Cheers,
das_weezul

P.S.: All the hard work setting up the toolchain and porting ScummVm to android has been done by Gus and other folks from ScummVM! Thanks for that!
Last edited by das_weezul on Tue Dec 07, 2010 1:28 pm, edited 7 times in total.
dr_manhattan
Posts: 6
Joined: Fri Nov 26, 2010 10:23 am

Post by dr_manhattan »

Works - can access the inventory now in BASS now - thanks! UI also much easier to use, as your finger isn't directly over the thing you're trying to select. Perhaps integrate a 'keyboard' button somewhere in the screen corner. I have a Galaxy S by the way. Thanks again for your great work!

Edit: BASS would not run originally until I changed the audio settings to another audio emulator. Kept giving me an error 'MT-32.rom not supported' or something.

Also, how do I get other games to run? Doesn't detect other game folders
das_weezul
Posts: 23
Joined: Thu Sep 09, 2010 9:02 pm

Post by das_weezul »

Thanks for testing!
Also, how do I get other games to run? Doesn't detect other game folders
As I wanted to upload ASAP I only included what I already compiled: My modified scummvm.apk + the scummvm-engine-sky.apk (The BASS Engine). I'll add the plugins for the other engines soon. Meanwhile you could try if the "official" engine-plugins from the market work with my summvm.apk ...
Edit: BASS would not run originally until I changed the audio settings to another audio emulator. Kept giving me an error 'MT-32.rom not supported' or something.
That's a known problem with the svn version (see posting here) I had the same problem, thanks for pointing that out!

Cheers,
das_weezul
mintfresh
Posts: 7
Joined: Wed Nov 24, 2010 10:23 am

Post by mintfresh »

I have tested this with the engines from the market and it does not work...... :(
Bluddy
ScummVM Developer
Posts: 145
Joined: Sun Nov 18, 2007 8:43 am

Post by Bluddy »

While I agree that relative motion is best for small touch devices like Android phones, the right click method is problematic. Scumm games like Full Throttle and COMI use a left-click-and-hold to bring up the verb menu.

I recommend designating a corner of the screen as the right click. Maybe even both lower corners for ease of use. To right click, click in that/those corner(s).
das_weezul
Posts: 23
Joined: Thu Sep 09, 2010 9:02 pm

Post by das_weezul »

Bluddy wrote:Scumm games like Full Throttle and COMI use a left-click-and-hold to bring up the verb menu.
I'm planning to implement a per-game mapping of input-symbols and gestures to the corresponding ScummVM events, so that the user can fine tune the input to his/her needs.
Bluddy wrote:I recommend designating a corner of the screen as the right click. Maybe even both lower corners for ease of use. To right click, click in that/those corner(s).
The corner-clicking events are a good idea! I'm also planning to include flicking, tap-hold etc. Right now I've got not much time on my hands, but I'll add new features step by step and keep you informed!
das_weezul
Posts: 23
Joined: Thu Sep 09, 2010 9:02 pm

Post by das_weezul »

Hey there!

As expected, the engine-plugins from the market do not work with the base svn version of scummvm. Therefore I've compiled (most) engines for you to try and have fun with ;)

As mentioned in the (edited) first posting, you can find the source-code and the binaries on the TouchMod google-code project page:
http://code.google.com/p/scummvm-android-touchmod/

Cheers,
das_weezul
bgoblin
Posts: 2
Joined: Thu Nov 25, 2010 1:56 pm

Post by bgoblin »

Very Nice!

Can actually play this time.

Well, fate of atlantis talkie version is not-so-talkie without MT-32 emulation, or maybe my other settings are just wrong.
das_weezul
Posts: 23
Joined: Thu Sep 09, 2010 9:02 pm

Post by das_weezul »

Well, fate of atlantis talkie version is not-so-talkie without MT-32 emulation, or maybe my other settings are just wrong.
Well I don't know wether it's an issue with the android port (does MT-32 work with the market version?) or maybe I forgot some "magic" build flag. I see what I can find out :D

EDIT:
As the MT-32 Emulation is "just" a module emulating the Roland MT-32 Hardware, which is just a synthesizes restricted to its own soundbank, the talkie versions should work by using the AdLib or the Creative Emulator. I'll try the same with my DOTT talkie version.
dr_manhattan
Posts: 6
Joined: Fri Nov 26, 2010 10:23 am

Post by dr_manhattan »

For some reason in BASS, when I access the 'f5' menu (used to change the game speed etc.), the cursor is unable to select anything.
das_weezul
Posts: 23
Joined: Thu Sep 09, 2010 9:02 pm

Post by das_weezul »

dr_manhattan wrote:For some reason in BASS, when I access the 'f5' menu (used to change the game speed etc.), the cursor is unable to select anything.
I just checked with the PC version of ScummVM. It's because you have to drag the slider and I haven't implemented dragging yet. But it's the next feature on my list ;) Allthough it is strange that you can't click the buttons ...
das_weezul
Posts: 23
Joined: Thu Sep 09, 2010 9:02 pm

Post by das_weezul »

Hi folks!

I just dived deep into cross-compiling libraries for android ;) I've compiled a new version of the TouchMod with MP3 and OGG support enabled (@bgoblin: Now the talkie versions should be talkie again ;)). I also added corner-regions. By now they are hard-coded:

UPPER_LEFT=MENU
UPPER_RIGHT=i (For COMI)
LOWER_LEFT=left-click
LOWER_RIGHT=right-click

The special aspect about the lower corners is that if you press e.g. the lower left corner its the same as pressing the mouse-button (without releasing) ... releasing the corner therefore is the same as releasing the mouse-button. That means you can now use functions like tap-holding etc. naturally.

Please tell me whether the upper-right corner brings up the inventory in COMI, as I have no working version of it (maybe it just doesn't work with my build ...)

EDIT:
I did a few tests myself and I'm not very content with version v0.03. As I've got to recompile all the engines anyway, I'll swap the "i" corner (which isn't working anyway) with the mechanism to bring up the keyboard. Then I'll compile a monolithic version, so that you can (at least) enjoy talkie-versions the touchpad-way ;)

Stay tuned!

Cheers,
das_weezul
dr_manhattan
Posts: 6
Joined: Fri Nov 26, 2010 10:23 am

Post by dr_manhattan »

Can't download v0.3 from that link.
das_weezul
Posts: 23
Joined: Thu Sep 09, 2010 9:02 pm

Post by das_weezul »

Can't download v0.3 from that link.
Sorry guys, real life strikes again! I deleted the binaries as v0.03 wasn't working as expected and the download section was a mess anyway. I already made some minor improvements and I'll upload v0.04 ASAP!

Cheers,
das_weezul
das_weezul
Posts: 23
Joined: Thu Sep 09, 2010 9:02 pm

Post by das_weezul »

Hi!

ScummVM TouchMod v0.04 is available for download now!

I decided to map the upper right corner to bring up the soft-keyboard. The upper left corner still brings up the scummvm menu, the lower right corner emulates a left-click, the lower right corner emulates a right click.

As there are several hardware-dependent problems associated with the software-keyboard, so I need your feedback to determine whether my solution works for all devices. The problem is that, depending on which android device you use, the software-keyboard is being triggered differently. Things that could happen:

* The keyboard won't show up
* The keyboard won't disappear
* instant peace-on-earth

Cheers,
das_weezul
Post Reply