TouchScreen Support

Started by Yuri Patrick, Tue 03/03/2015 04:27:16

Previous topic - Next topic

Yuri Patrick

I am very curious, over the last two years I have finally gotten into the world of touchscreen. My Desktop PC has two touchscreens and windows 8, my Surface Pro 3 is touch and Windows 8.1. The only thing left in my house that is NOT touch capable is my Macintosh. However, Apple is talking about having a touch capable iMac in the works, so it seems that it would behoove our creators and gamers to make AGS touch capable.

I have seen a few threads on touchscreen capabilities, but it seems to be just plugins at the moment. Are there any plans to make AGS touch compliant from the core out? Or is this just a pipe dream? From my understanding, once you get past the drivers, which is what Windows and OS X are for, then you can just address the touchscreen as if it were an extension to the mouse. I could be wrong, but it seems like it should be a fairly simple subroutine to add to the code. Not that I can code anymore. :(

Anyway, I was just wondering.

trevize

I'd be interested in this too. I had assumed that touch would work like a mouse press, so all I had to do was change the cursor graphics a bit to support touch (eg. make the cursor invisible but show a little burst when tapped). But to register a click seems to require a double tap, or sometimes even three taps on UI items. The first tap presumably sets the position of the cursor, and the next one or two are the actual click.

RowdyRocket

I know this is an old topic but the problem still remains especially with the growth of touch devices and touch friendly operating systems such as Windows 10.

I have a Windows 10 tablet, when attempting to run an AGS game I am confronted with the no mouse detected message or not configured with DirectInput. If I plug in a hardware mouse the game boots with no issues then I am able to disconnect the hardware mouse and play as I please. Perhaps the mouse check at the beginning could be disabled? Or maybe a port as a Windows Store app?

Once I'm in the game I use TouchMousePointer to control the pointer like a touchpad it's just getting into the game that is the problem.

I have also tried the mousekeys work around (as mentioned in another post) with no luck.


Crimson Wizard

#3
The question is whether it will be enough to remove detection, because in worst case in-game pointer controls won't work without it at all.
Unfortunately, I do not own touch screen device and cannot test this myself.
What if I make a test build with this check disabled, and let you try it?

PS. I could test that game can at least run without mouse initialized.

RowdyRocket

yes please! I'd be happy to test it. Thank you!

Crimson Wizard

Here it is:
http://www.mediafire.com/download/mfpbh97a2ehkbf0/acwin-3.3.5--nomouse-test.zip

What I changed: it does all the same, except it does not immediately quit if the Allegro library failed to initialize the mouse. Instead it puts a warning to the log.
I still want to underline that there is not guarantee that the touch input will work. It may simply be that the underlying library we use requires some actual mouse to be registered in the system to set up pointer controls.

RowdyRocket

I understand. I'll give it a try and let you know. Thanks for your efforts!

RowdyRocket

It seems you were right. I no longer get the error message but the touchscreen doesn't work unless I first plug in a mouse. Everything works fine with the mouse and after unplugging I am able to resume using touch controls. So it seems there is no difference other then the absence of the disclaimer popup.

Don't know if this will help but I also noticed this problem with precious versions of DosBox. Somehow it has been resolved with the latest version. After installing Kings Quest from steam it would not run unless I attached a mouse. I updated DosBox and now all is well. Perhaps there is an answer there?

Thanks again!

Crimson Wizard

I do not believe this may be resolved until we upgrade the library AGS is using, which may take a while...

RowdyRocket

Ok. Thanks for your efforts.

ladymarian

#10
I wonder if there is any news about this.

I am trying to play some AGS adventures on a tablet, and managed to bypass the "no mouse" error by installing Logitech Gaming Software, as it installs a virtual mouse driver. Seems a bit excessive (more than 300 MB for a tablet with very limited storage) but it's the only thing I could find that doesn't require a mouse at all.

After that, the games seems to work, but just when they are windowed. Resizing the window or play in full screen makes the pointer to not move according to the finger movement.

Also, I noticed in a particular game that it has a "agstouch.dll" file, but doesn't work properly in full screen mode either.

Crimson Wizard

#11
Quote from: ladymarian on Thu 01/02/2018 20:33:24
I wonder if there is any news about this.

AGS no longer requires mouse to be present, that's all that has changed. It still does not have any integrated touch screen support, which means that you must have mouse driver installed anyway to have cursor working.

With engine development practically stopped, I do not think there will be anything, unless someone takes on this job.

There is an ongoing work to finish ScummVM port for AGS, which in theory may improve situation to some degree, but it's too early to consider it an actual solution.

ladymarian

Quote from: Crimson Wizard on Thu 01/02/2018 20:46:44
Quote from: ladymarian on Thu 01/02/2018 20:33:24
I wonder if there is any news about this.

AGS no longer requires mouse to be present, that's all that has changed. It still does not have any integrated touch screen support, which means that you must have mouse driver installed anyway to have cursor working.

With engine development practically stopped, I do not think there will be anything, unless someone takes on this job.

There is an ongoing work to finish ScummVM port for AGS, which in theory may improve situation to some degree, but it's too early to consider it an actual solution.

Thanks for answering.
Just out of curiosity, why do AGS games work pretty well with a touch screen when they are windowed and stop working properly when the window is maximized or in fullscreen mode?

Crimson Wizard

Quote from: ladymarian on Fri 02/02/2018 12:18:05
Just out of curiosity, why do AGS games work pretty well with a touch screen when they are windowed and stop working properly when the window is maximized or in fullscreen mode?

I have no idea, to be honest. Maybe it is also related to how the virtual mouse driver works?
Or maybe it's related to how the window resizing is done. Did you perform it through AGS config, or some tablet system interface?

ladymarian

#14
I don't think it's related to the mouse driver, it did the same thing before installing it, with a bluetooth mouse connected.
I change between window or fullscreen mode with the AGS config utility in the game folder. I've tested several commercial games, from different years, and they all behave the same.
I maximize with an external program since the window itself has the maximize button disabled. But considering it behaves the exact same way as when it is in fullscreen mode, I don't think that's the problem.
I will upload a video showing the behaviour. Considering it works in windowed mode, maybe it's not very difficult to make it work in fullscreen.

SMF spam blocked by CleanTalk