Jump to content


Photo

GM Touch


  • Please log in to reply
7 replies to this topic

#1 Master Xilo

Master Xilo

    GMC Member

  • GMC Member
  • 396 posts
  • Version:GM8

Posted 23 June 2012 - 09:15 PM

This small extension adds 5 functions to deal with multiple touch inputs.
 

  • touch_has_new() Returns 1 if there have been new touch input events (because the finger has moved or is held down) since the last call to this function.
  • touch_get_count() Returns the amount of touch input changes registered in the last update.
  • touch_get_x(index) index should be between 0 and touch_get_count()-1.
  • touch_get_y(index)
  • touch_get_id(index) Can be used to identify and track touch points. Actual range of values device specific.

Download the GM Touch Extension, including source files and example


gamemakertouchextension.png

I only tested it with a device that supports two touchpoints (x220t) but it should support any amount.

Other than the mouse input to which touch input is mapped, this recognises a single touch point also before moving the finger.

I'd also have liked to add the builtin Windows gesture recognition, but I couldn't get it to send WM_GESTURE to my window consistently. And adding digitizer/stylus pressure sensitivity appears to be non-trivial as well (need to use driver specific apis?).

Btw. this ("Multitouch Extension") appears to do the same for GMHTML5. I guess these could be combined to an extension for GM:Studio (?).

I hope you like it!

- Paul


Edited by Master Xilo, 23 August 2015 - 02:09 PM.

  • 1

#2 mrpeanut188

mrpeanut188

    GMC Member

  • GMC Member
  • 814 posts
  • Version:GM8

Posted 23 June 2012 - 09:38 PM

Whoah! Nice. I loved your 3D Terrain engine too.
  • 1
Posted Image

#3 Master Xilo

Master Xilo

    GMC Member

  • GMC Member
  • 396 posts
  • Version:GM8

Posted 20 September 2012 - 10:54 PM

Finally figured out how to deal with COM's IRealTimeStylus, meaning I will be able to write a plugin that supports a tablet-stylus, alongside with pressure measurement.
  • 0

#4 prestodomino

prestodomino

    GMC Member

  • GMC Member
  • 20 posts
  • Version:GM:Studio

Posted 02 April 2014 - 05:16 PM

I am interested in your extension but link is dead  :pirate:

 

Could you please re-up ?? 


  • 0

#5 Master Xilo

Master Xilo

    GMC Member

  • GMC Member
  • 396 posts
  • Version:GM8

Posted 02 April 2014 - 09:17 PM

Done. Have fun!


  • 0

#6 prestodomino

prestodomino

    GMC Member

  • GMC Member
  • 20 posts
  • Version:GM:Studio

Posted 03 April 2014 - 05:30 PM

Thank you !!

 

I have tried your extension with GM 8.1 on Windows 8 64 bits but have no luck to make it recognize my fingers...

Is your extension limited to Windows 7 or is it something with 64 bits OS ?

 

I am interested in keeping GM 8.1 on Windows 8 (even if I have GMS master) because it can load external DLL I am working with...


  • 0

#7 Master Xilo

Master Xilo

    GMC Member

  • GMC Member
  • 396 posts
  • Version:GM8

Posted 03 April 2014 - 09:20 PM

It doesnt work for me on win 8 either, they must have changed something. It did work on win 7 64 bit so its not that by itself.
  • 0

#8 prestodomino

prestodomino

    GMC Member

  • GMC Member
  • 20 posts
  • Version:GM:Studio

Posted 04 April 2014 - 08:24 PM

thanks for the feedback :thumbsup:


  • 0