Jump to content


Photo

Tablet Dll


  • Please log in to reply
32 replies to this topic

#1 npc3232

npc3232

    GMC Member

  • GMC Member
  • 125 posts
  • Version:Unknown

Posted 12 October 2007 - 03:46 AM

This is simple dll based off of the code from here. It reads the data from the pen/touch tablet, such as pressure, xyz, etc. It should be compatible with most or all tablets, although some may not output data for all functions. I will probably add more features later on but the following are the current functions:
tabletInitDLL
tabletInit
tabletUpdate
tabletId
tabletType
tabletButtons
tabletX
tabletY
tabletZ
tabletPressure
tabletTpressure
Download (52kbyte) - fixed Oct 08, 2008

Edited by npc3232, 29 December 2011 - 12:40 AM.

  • 0
Midi Notes Dll(V1.4a 08/03/29)
Tablet DLL(V1.0 07/10/11)

(Note: I have not used Game Maker or actively participated in the GMC since early 2008 - PM if needed but I cannot guarantee replies)

#2 dark_master4

dark_master4

    GMC Member

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

Posted 12 October 2007 - 06:46 AM

OMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMGOMG YOU'RE MY SAVIOR! I didn't think you could do that OMG I'm just amazed!! YOU are the best!!

Are you a girl or a guy? If you're a girl, I hug you and kiss you everywhere!!! If you're a guy well, I hug you and kiss you on the cheeks!! You... You're my new best friend! :GM044:

As I decided to go commercial, I find it pretty outraging since you did the MIDI DLL and the tablet DLL... I must give you credit and if I get to a finished product and really want to sell it, part of the profits too.

Keep up the excelent work!!

OMG I just tried the example even though it's only numbers it makes me all excited!

Guys reading this, npc3232 is my idol! Try this DLL and use it for every drawing applications or anything that requires mouse control!


...Awsome...

[edit]
You're CRAZY!

[edit2]
Question ;) What are the following functions for exactly? {tabletId, tabletType, tabletButtons, tabletTPressure}

Suggestion: tabletUpdate stores the {x,y,z,pressure} to local variables {tablet_x,tablet_y,tablet_z,tablet_pressure} to dodge excessive DLL calls. I read somewhere that Wintab API calls are CPU expensive. I'm not sure about tpressure so I didn't mention it.

[edit3]
Oh wait, tpressure is tangeant pressure! ... But I still don't know what it's for.. Lol!

Edited by dark_master4, 12 October 2007 - 09:22 AM.

  • 0

My YoYoGames Marketplace (Has scripts, shaders and poker chips)


GM:Studio
Desktop Intel i5-4440 3.1ghz, 8gb RAM, NVIDIA GeForce GTX 770 2gb
Laptop AMD Athlon x64 2.1ghz, 4gb RAM, 256mb shared VRAM


#3 zedman1000

zedman1000

    GMC Member

  • New Member
  • 715 posts

Posted 12 October 2007 - 07:04 AM

*Gets sedative for dark_master4 ready*
  • 1

#4 dark_master4

dark_master4

    GMC Member

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

Posted 12 October 2007 - 07:13 AM

You won't get meeeeeeeee!! *Runs as fast as he can...*

*Zedman1000 receives a phone call* YOU'LL NEVER FIND ME!! *click*

Hey npc3232! I found a glitch and a work around! :GM046: When I try to update the pressure at a room_speed of 100, it returns 0 once every half step. I worked around updating it only 50 times per second even at room_speed of 100 so it's ok!

You're sick! ;)

[edit]
Oh BTW I'm done implementing the DLL in my engine! Now the only thing that's needed is an GUI! You've made my day! No wait... My year!! And maybe a couple of Eclipse's shows! :GM023: If not all :GM044:

Edited by dark_master4, 12 October 2007 - 07:15 AM.

  • 0

My YoYoGames Marketplace (Has scripts, shaders and poker chips)


GM:Studio
Desktop Intel i5-4440 3.1ghz, 8gb RAM, NVIDIA GeForce GTX 770 2gb
Laptop AMD Athlon x64 2.1ghz, 4gb RAM, 256mb shared VRAM


#5 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 12 October 2007 - 08:15 AM

hahaha dark_master4 calm down!

Heya, I was actually going to wrap one lib I had found and make a similar dll, (it actually had more functions like getting the tilt and eraser feel) well it seems that'll save me the work. ;) Going to test on my home computer with my tablet.

Edited by Sindarin, 12 October 2007 - 08:42 AM.

  • 0
GM 8.1 / GM:HTML5 User

#6 zephroelectro

zephroelectro

    GMC Member

  • New Member
  • 265 posts

Posted 12 October 2007 - 02:39 PM

heck that was a fast DLL release O.O
  • 0

#7 npc3232

npc3232

    GMC Member

  • GMC Member
  • 125 posts
  • Version:Unknown

Posted 12 October 2007 - 06:11 PM

dark_master4: Your excitement is a little over the top. You don't have to pay me anything for the dlls, and I am male, to answer your question. Honestly, I do not know the exact user of this data ("tabletId, tabletType, tabletButtons, tabletTPressure"), but I figured I would add them anyway as someone may want them. As for that little glitch that you are finding, it is not related to the work-arround, it is an issue that the data isn't updated by the hardware as fast you are checking. I tested it, and it seams that it is update 60 times per second, or most likely the monitors refresh rate. The work-around fixes an issue where the tablet data isn't read once the game loses focus, the only side-effect of this, is the first click from the tablet may be ignored after the window regains focus. The performance of the dll is not bad when called 30 times a second (<2% cpu). The dll updates variables when you call the tabletUpdate, and the other functions simply return the data.

Sindarin: The lib I'm using supports most of this I think. I will try to implement those things for the next version.

Edited by npc3232, 12 October 2007 - 06:11 PM.

  • 1
Midi Notes Dll(V1.4a 08/03/29)
Tablet DLL(V1.0 07/10/11)

(Note: I have not used Game Maker or actively participated in the GMC since early 2008 - PM if needed but I cannot guarantee replies)

#8 freko

freko

    The Professional

  • GMC Member
  • 504 posts
  • Version:GM8

Posted 12 October 2007 - 07:10 PM

Wht the bloody hell it doesn't work.
Its throws an error :- 'unable to defie external functions'
even though I checked for the file names..
  • 0

#9 npc3232

npc3232

    GMC Member

  • GMC Member
  • 125 posts
  • Version:Unknown

Posted 12 October 2007 - 07:44 PM

Please tell me your system specs. Like I warned, you need windows 2000 or better with .net framework 2.0 installed; this is the most common issue with VC2005 binaries. I am currently unable to compile the dll with mingw, but I will look for the required libraries.

Edited by npc3232, 12 October 2007 - 07:45 PM.

  • 0
Midi Notes Dll(V1.4a 08/03/29)
Tablet DLL(V1.0 07/10/11)

(Note: I have not used Game Maker or actively participated in the GMC since early 2008 - PM if needed but I cannot guarantee replies)

#10 Rixeno

Rixeno

    The One 'n' Only

  • New Member
  • 513 posts

Posted 12 October 2007 - 07:50 PM

The download link didn't work for me :angry:, I don't have a tablet but I'd like to try it, can you post a mirror?
  • 0
Do you need an example? You can PM me a request and I'll try my best.
Creations:
- Extra String Functions - Sprite Chroma Key - String at Position - Word Censor - Draw_Line_Width (Unreg GM6-) - Shadowed Text - Draw N-Gon - PIXEL PERFECT COLLISION ENGINE-

#11 freko

freko

    The Professional

  • GMC Member
  • 504 posts
  • Version:GM8

Posted 12 October 2007 - 08:41 PM

Please tell me your system specs. Like I warned, you need windows 2000 or better with .net framework 2.0 installed; this is the most common issue with VC2005 binaries. I am currently unable to compile the dll with mingw, but I will look for the required libraries.

<{POST_SNAPBACK}>


I have windows XP SP-2, .net framework 2.0 installed.
  • 0

#12 dark_master4

dark_master4

    GMC Member

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

Posted 12 October 2007 - 09:31 PM

Rixeno: You can implement it without having a tablet, but if you don't, you won't be able to test the functionnalities you can get with it. Pressure, tangeant pressure (Still don't know what it's for), z position (distance from pen to tablet). Also, the origin when calling the [x,y] positions of the tablet (Which aren't the same as the mouse_x/y) have their origin placed at bottom left and range from 0 to 1 (1 being top or right).

ID I believe is the recorded ID the tablet sends when you connect it. Usually it would change per fabricant, but there's no enforcement that keeps one from putting Wacom there even if it's not a Wacom. Same thing for type.

Buttons I guess would be the number of buttons on the pen &| tablet.
  • 0

My YoYoGames Marketplace (Has scripts, shaders and poker chips)


GM:Studio
Desktop Intel i5-4440 3.1ghz, 8gb RAM, NVIDIA GeForce GTX 770 2gb
Laptop AMD Athlon x64 2.1ghz, 4gb RAM, 256mb shared VRAM


#13 npc3232

npc3232

    GMC Member

  • GMC Member
  • 125 posts
  • Version:Unknown

Posted 12 October 2007 - 10:17 PM

I have recompiled the dll with mingw, it should run on windows 98+. Download (52kbyte)


Freko: I don't know what the problem is exactly but now it should work now.

Rixeno: The link is fixed (mediafire likes changing things), I'll make a mirror soon though.
  • 0
Midi Notes Dll(V1.4a 08/03/29)
Tablet DLL(V1.0 07/10/11)

(Note: I have not used Game Maker or actively participated in the GMC since early 2008 - PM if needed but I cannot guarantee replies)

#14 dark_master4

dark_master4

    GMC Member

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

Posted 12 October 2007 - 10:27 PM

Great! No more .NET 2.0 boundary! You're the best.
  • 0

My YoYoGames Marketplace (Has scripts, shaders and poker chips)


GM:Studio
Desktop Intel i5-4440 3.1ghz, 8gb RAM, NVIDIA GeForce GTX 770 2gb
Laptop AMD Athlon x64 2.1ghz, 4gb RAM, 256mb shared VRAM


#15 Obiki_San

Obiki_San

    GMC Member

  • New Member
  • 136 posts

Posted 13 October 2007 - 04:03 AM

I didn't exactly try it, but I could see this as good use for a GM Nintendo DS clone. I should try that one day :angry:
  • 0

#16 Ruud v A

Ruud v A

    Games programmer

  • New Member
  • 417 posts

Posted 13 October 2007 - 11:16 AM

Wow, this is great :D

I have an Intuos3, which supports an eraser too, by turning your pen up-side-down. Is there a way to detect if the user is using the pen or eraser?

Great DLL :huh:.
  • 0

#17 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 13 October 2007 - 12:01 PM

Worked for my wacom tablet. :D
  • 0
GM 8.1 / GM:HTML5 User

#18 npc3232

npc3232

    GMC Member

  • GMC Member
  • 125 posts
  • Version:Unknown

Posted 13 October 2007 - 04:41 PM

It seems that the dll already supports the eraser/pen tips, and also gives a different reading for the mouse if included. Add the following line in the example's draw event and you'll see what i mean.
draw_text(0,48,"Press Type: "+string(tabletType()));

It would be useful for the gm nds clone, but if the clone wrapped Palib it would be even more useful.

Edited by npc3232, 13 October 2007 - 04:43 PM.

  • 0
Midi Notes Dll(V1.4a 08/03/29)
Tablet DLL(V1.0 07/10/11)

(Note: I have not used Game Maker or actively participated in the GMC since early 2008 - PM if needed but I cannot guarantee replies)

#19 Ruud v A

Ruud v A

    Games programmer

  • New Member
  • 417 posts

Posted 13 October 2007 - 07:17 PM

I tried that myself already, but I didn't notice that :D
Great dll :huh:
  • 0

#20 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 21 October 2007 - 07:52 AM

Great one!
  • 0

#21 death-droid

death-droid

    GMC Member

  • GMC Member
  • 2600 posts

Posted 05 October 2008 - 12:36 AM

The files still uploaded but mediafire has changed the way they link stuff since then.
Here you go.

http://www.mediafire...php?4mznmnnnjtx

Now to test this out
  • 0

Posted Image


#22 mrsmes

mrsmes

    GMC Member

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

Posted 25 October 2008 - 04:42 AM

this could be used for a form of pressure switch to enhance security systems, and show the results of the pressure replaced with the appropriate pressure required and trigger a alarm set off a security alert... if this tablet DLL is used... I'll have to remember this for my security system at home, or in my own company one day... the more pressure switches and mechanisms being used for security the harder it will make it for the intruder to escape, but it can proove making it impossible for the intruder to escape so long as there are more than enough security control and detection devices put in place...

Edited by mrsmes, 25 October 2008 - 04:45 AM.

  • 0

Assuming I helped you out in a questions and answers topic won't you return the favour by helping me with one my coding problems, or recommend some one who can chat to me over pms about helping and how to overcome my obstacles, after all lets just say I did help you or them or many people with similar problems, in that topic.

Here i have a topic for those of you struggling with type writer text and mugshots in your games especially if it is a rpg see the link below for more info

http://gmc.yoyogames...howtopic=619103

almost no code needed, only uses two events.

click here for the l8est version of feed the alien pizza, it has some major polished up features.


#23 IceMetalPunk

IceMetalPunk

    InfiniteIMPerfection

  • GMC Elder
  • 9603 posts
  • Version:GM:Studio

Posted 11 November 2008 - 04:53 AM

I recently bought a Wacom Bamboo tablet. I love it, and this DLL just adds to the possibilities. Thanks for making it.

-IMP :) :P
  • 0

:GM123: Are you an artist who likes creating original creature designs? Maybe you can help out with Elementa here! Give it a look; you might like the idea :)

:bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny:


#24 theartofmax

theartofmax

    GMC Member

  • New Member
  • 5 posts

Posted 02 December 2008 - 09:32 PM

A tablet veteran says thanks for this DLL! I did a quick test to figure out some
of the things that were unanswered in the first post that might help everyone:

tabletType : 1=Pen Mode 2=Eraser Mode
tabletButtons : Detects single buttons and button combinations, here's the results for my Intuos2:

1= Pen/Eraser contact (Also shows up as a left mouse click)
2= Side Bottom Button Clicked
3= Side Bottom Button Clicked + Pen/Eraser contact
4= Side Top Button Clicked
5= Side Top Button Clicked + Pen/Eraser contact

tabletTPressure : Couldn't get anything to show up, the wacom "6D" pen has full 360 tilt detection, it might be related to that.
tabletZindex : I imagine this is only used if you are using the pricey but awesome airbrush (http://www.wacom.com...Accessories.cfm)

If you ever update this again, the only thing it could use is a function for the tilt angle.
  • 0

#25 npc3232

npc3232

    GMC Member

  • GMC Member
  • 125 posts
  • Version:Unknown

Posted 14 December 2008 - 04:21 PM

I haven't been very active on these forums in recent months (change of interests), but I may be able to update the dll eventually if I can find my source. When I originally got the library to work I just added all the functions that there were (there maybe more in the library now or I may have forgotten some) and tested them. tabletZ and Tpressure didn't work for me, I left them in, figuring that my tablet is too cheap.
  • 0
Midi Notes Dll(V1.4a 08/03/29)
Tablet DLL(V1.0 07/10/11)

(Note: I have not used Game Maker or actively participated in the GMC since early 2008 - PM if needed but I cannot guarantee replies)

#26 zebranator

zebranator

    GMC Member

  • New Member
  • 1 posts

Posted 03 April 2009 - 12:47 AM

I will be getting a tablet soon because it seems like a great idea. How exactly do I run this? I saved the file then extracted the file and it came up with a gamemaker file called Tablet. Do I just build my game off of that?
  • 0

#27 zero44

zero44

    GMC Member

  • New Member
  • 10 posts

Posted 23 May 2010 - 04:31 PM

It didnt work or me i have a m200 tablet pc has a wacom digitizer i think the problem is that the dll isnt being read anyone know what i can try?

Edited by zero44, 23 May 2010 - 06:25 PM.

  • 0

#28 blendman

blendman

    GMC Member

  • GMC Member
  • 43 posts

Posted 17 December 2010 - 09:53 PM

Hi.

I know it's an old topic, but I'm very interested by this DLL.

Could someone post (upload) the dll again , please ?

The link is broken :(.


Thank you very much.

Edited by blendman, 17 December 2010 - 09:55 PM.

  • 0

#29 dark_master4

dark_master4

    GMC Member

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

Posted 14 March 2011 - 01:11 AM

I'd also like to get it back... I'm kind of an old fan, if you know what I mean. I even made a program using 2 of this guy's DLL... I can easily get the DLLs back but not the GML functions... If this can help anyone, please tell me by PM.

Edit:
Be wary as I may take a very long time to reply...

Edited by dark_master4, 14 March 2011 - 01:12 AM.

  • 0

My YoYoGames Marketplace (Has scripts, shaders and poker chips)


GM:Studio
Desktop Intel i5-4440 3.1ghz, 8gb RAM, NVIDIA GeForce GTX 770 2gb
Laptop AMD Athlon x64 2.1ghz, 4gb RAM, 256mb shared VRAM


#30 Primoz128

Primoz128

    GMC Member

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

Posted 14 March 2011 - 05:04 AM

Why respond to so old thread... just PM him...
  • 0

Looking for a coding partner for my space RTS solar conquest project. More information: http://gmc.yoyogames...opic=563123&hl=


#31 mecool1

mecool1

    GMC Member

  • GMC Member
  • 407 posts

Posted 20 March 2011 - 02:27 AM

ok so what exactly are you supposed to use this for? so can you take gm executables and put them on windows tablets or something??
  • 0

sig.png


#32 Recreate

Recreate

    Furry

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

Posted 28 March 2011 - 11:13 PM

All of the links are broken, does anybody here still have a copy perhaps? I'd like to try this.
  • 0

If the post that you are reading was created prior to 2011. For the safety of the general public, It is not to be regarded under any circumstances.
Please don't ask me to join your group at anything.


#33 blendman

blendman

    GMC Member

  • GMC Member
  • 43 posts

Posted 25 May 2015 - 02:05 PM

Hi

 

I know it's a very old thread ^^, but it seems this dll doesn't work with Win8, I have an error :

 

 

ERROR in
action number 1
of Create Event
for object object0:

Error defining an external function.


Edited by blendman, 25 May 2015 - 02:06 PM.

  • 0