Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: KQ_SQ_BC_PQ_fan on Fri 27/03/2009 07:12:22

Title: Speech Recognition Software with AGS Games
Post by: KQ_SQ_BC_PQ_fan on Fri 27/03/2009 07:12:22
I've found that Windows Vista's "click that" command and Dragon NaturallySpeaking’s "mouse click" command don't work with any games that were created using Adventure Game Studio.  However, I've engineered a script that enables me to circumvent the problem.

Using Dragon NaturallySpeaking Legal, Medical, or Professional, you will be able to create voice commands that launch the scripts below.

Launching the following script will cause an AGS game to recognize a left mouse click at the current mouse position.

Sub Main

RememberPoint
Wait .001
DragToPoint 1
   
End Sub

Launching the following script will cause an AGS game to recognize a right mouse click at the current mouse position.

Sub Main

RememberPoint
Wait .001
DragToPoint 2
   
End Sub

These scripts work only when the game is run in a window; they do not work when the game is run full-screen.
Title: Re: Speech Recognition Software with AGS Games
Post by: Pumaman on Fri 27/03/2009 18:16:54
I'd be interested to know in what sort of scenarios you'd use voice recognition for a mouse click?
Title: Re: Speech Recognition Software with AGS Games
Post by: KQ_SQ_BC_PQ_fan on Sat 28/03/2009 16:42:32
You'd want to use it if you had tendinitis that was aggravated by clicking a mouse.  You should be thankful that you don't.
Title: Re: Speech Recognition Software with AGS Games
Post by: KQ_SQ_BC_PQ_fan on Sun 05/04/2009 03:24:39
I didn't realize that it was you, Chris!  I'm new here.  While playing Infamous Adventures' Kings Quest's III remake, I discovered that the game recognized a mouse click when I issued a "mouse mark" voice command followed by a "mouse drag" voice command.  Then, I discovered that AGDI's Kings Quest's I and II remakes and DreamMaster's The Black Cauldron remake worked the same way.  The Dragon NaturallySpeaking "mouse mark" and "mouse drag" voice commands are commonly used to drag and drop.  The "RememberPoint" and "DragToPoint 1" (1 indicates left click) are the equivalent Dragon NaturallySpeaking script commands.  The "Wait" script command ensures that the drag will be from the mark point remembered immediately beforehand.  It's probably required only due to a Dragon NaturallySpeaking bug.

There are a lot of people using speech recognition software these days.  Do you think that you'll be able to implement a change that will make AGS games compatible with Windows Vista's "click that" command and Dragon NaturallySpeaking’s "mouse click" command?
Title: Re: Speech Recognition Software with AGS Games
Post by: Pumaman on Sun 05/04/2009 14:05:47
Interesting, thanks.

AGS uses DirectX for reading the mouse, so it could well be that the way DirectInput handles mouse clicks is different to normal Windows applications. However I don't think this is something I would be able to change -- do you have the same issue with other DirectX-based games?
Title: Re: Speech Recognition Software with AGS Games
Post by: KQ_SQ_BC_PQ_fan on Mon 06/04/2009 06:26:26
I've never experienced the problem while playing a non-AGS game, but I'm not certain that any of the games that I've successfully used Dragon NaturallySpeaking’s "mouse click" voice command with were DirectX-based.  Can you point me to a non-AGS game that you know to be DirectX-based?
Title: Re: Speech Recognition Software with AGS Games
Post by: Pumaman on Mon 06/04/2009 18:52:40
Heh, not easily; most games, especially those that run full-screen, use DirectX but it's hard to tell.

It sounds like you've managed to create a script that will work around this issue, and since it's quite a niche problem I'm not sure it's something I would be able to look into in detail.