[Scummvm-devel] Android port: mouse/touchscreen improvements

yotam barnoy yotambarnoy at gmail.com
Thu Aug 5 22:02:22 CEST 2010


I recently received an iPhone and I was surprised at how difficult it
was to play ScummVM games with touch controls. You'd think they would
be ideal for playing a point and click game. However, the fact that a)
a finger is too imprecise to hit small objects and b) once you do
click, your finger obscures the screen so you can't see what's going
on in the most important area of the screen means that it's really not
that great of an interface for point and click games.

Fortunately, there's no need to reinvent an interface for Android. the
iPhone dev (vinterstum) has already come up with a very good
interface. One of the 2 modes on the iPhone turns the screen into a
touchpad just like the one on a laptop. It's very clever, because it
means your finger is on a different part of the screen and you can
then aim precisely. Tapping with the touchpad finger is a left click,
and touching with another finger anywhere on screen is a right click.
I find this to be very good and efficient. This can easily be
implemented on the Andriod, or even better -- refactored into a base
class since it seems like touch controls are the wave of the future.

Another option is to do what the iPhsoft guys do in their mod (at
least this is what I think from the screenshots on their App Store
pages) and create a small zoom box right above where the finger is
touching so you can see that part precisely. However, that forces your
finger into a certain orientation, so I'm not too fond of that option
(though I haven't tried it).

Yotam


On Thu, Aug 5, 2010 at 6:51 PM, Michael Nicholls <nicholls.mc at gmail.com> wrote:
> Hi,
>
> I wanted to see if I could lend a hand with the Android port and help
> Gus with the excellent work he has done, unfortunately I am not
> familiar with the ScummVM code and so would like to run an idea past
> you guys before I start work on a patch.
>
> I have been in touch with Gus and it would seem that mouse input needs
> a few fixes.
>
> Firstly the right click needs a way to be invoked from the touchscreen
> as not all phones have a camera/search button and it would be nicer to
> do it via the touch screen. Gus suggested a long press on the screen
> should invoke a right click. This seems sensible as long press on
> Android typically brings up context menus and so can be thought of as
> a right click.
>
> Also click and drag support. At the moment all dragging on the
> touchscreen represents a click and drag (I think). I guess this isn't
> always desirable and Gus suggested maybe a double tap will initiate a
> click drag.
>
> I have seen in the forum that people have complained they manage to
> click the wrong thing as there fingers are a lot bigger than the item
> they are clicking on. It was suggested that perhaps we only respond to
> releasing the touchscreen, thereby allowing the user to fine tune
> where they want to click before letting go and initiating the click.
>
> Based on all of this, as a starting point, I would like to propose the
> following:
>
> - An initial touch on the screen does nothing (except be stored to
> look for long presses/double taps).
> - If released before a long press timeout, we simply pass a left
> button down to the vm and a left button up.
> - If pressed again within the double tap timeout, we send the vm a
> left button down and continue to pass the move events until released
> where we pass a left button up to the vm.
> - If held down past the long press timeout (without enough movement to
> signify this isn't a long press) we send a right button down.
> - Once the finger is released we send relevant left button up or right
> button up messages depending on the state.
>
> The main thing is I am unfamiliar with the vm and how the engines use it.
>
> Will the above work for all the games use cases?
> Is click and drag useful in some of the games?
> Is it useful to be able to avoid click and drag by default as the
> above scheme outlines?
>
> Any feedback would be great, I can then get to work to try to implement it.
>
> Cheers,
> Mike
>
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://p.sf.net/sfu/dev2dev-palm
> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scummvm-devel
>




More information about the Scummvm-devel mailing list