Not logged in
Register | Login


Game Maker Extensions Menu:

av. 8/10 | Who rated

Credit to Kyle_Solo

Downloads: 3360


Get a refer button for this extension!


html [example]

Advanced Gesture Recognition System

Posted by Kyle_Solo on July 24, 2007

Ever played Black and White? If so, you must remember the innovative spell system, which required you to trace a spell's symbol to cast it. My gesture system allows just that. With just a few lines of code, you can add shape recognition to your games. It will take you no more than a few minutes to master the system. The help file also has an easy to follow step-by-step tutorial that will guide you through the process of recognizing a shape.

1. Automatically scales your shapes. If you define a square, it doesn't matter if the user draws a huge square or a tiny one, the system will recognize it.
2. You can make your own shapes! From Spirals to Stars, Squares to Letters, anything you want.
3. Easy to use! Only 6 essential scripts to learn, but very powerful!
4. Easy to use shape creator allows you to skip the time-consuming process of hard coding your shapes (get it on the GMC).
5. The tutorial in the help file will walk you through creating a simple shape and recognizing it. Someone with little or no code experience could easily figure it out.
6. Lots of new functions!

The download includes the gesture extension (.gex), the demo (.gmk registered), and the source!


» Add a Screenshot



This function is used when you want to start defining a shape. It adds point (0,0) to the shape. It also clears existing shapes, if you want to redefine one.
Higher cutoff, more likely the computer will pick this shape. Use a higher cutoff value on bigger, more complicated shapes. A good guess is about 3/4 of the average of the shape's width and height.
The width of the shape (should fit the shape nicely, no extra room on the edges)
The height of the shape

Returns The id of the shape


Arguments are same as above. You can use this to change a shape’s cutoff, name, width, and height after it is created. You do not need to use this function, only if you want to change a shape you've already defined without clearing it.


Adds point x,y to the shape. Note that the order you add the points in is important. Points should be added in the same order you want the player to draw the shape in.


Adds more points to the shape. Makes the recognition very slightly slower but much more accurate. Optional.


Starts capturing points that will be compared to the shapes in gesture_capture_end(). Use only once each time you capture.


Captures points.


Ends capturing and returns one of the following values:
a. A zero (0) if no shape has been detected
b. The id of the shape that was detected
You need to enable your shapes for them to be returned

Returns Winning shape id or 0 for none


Returns the percent chance (0-1) that this shape was the one that was drawn.

Returns Percent


Enables the shape(s) so they is scanned for in gesture_capture_end


Disables the shape(s) so they will not be scanned for in gesture_capture_end


Enables all shapes


Disables all shapes


Allows you to redefine an id. Essentially the same as gesture_shape_create, except it clears an existing id.


Draws the shape at x,y.

You not logged on! It is recommended you logon before commenting so we can tell who you are!


12:47pm, 24 Jul 2007

Awsome! This is one of the best ones yet! I gave it 5/5.

BTW I also re-cached the images so now this works (get code on the right):
User submitted image

8:04pm, 30 Jul 2007

I think you are right, people are jealous. BTW I have done both your suggestions. They were great ideas.

3:21pm, 17 Aug 2007

Ooh, you added function descriptions. I also added a screenshot uploader to the site and I took the liberty of uploading a screenshot of this (hope that's ok). Look right below your description and you'll see it.

6:58am, 20 Aug 2007


3:19am, 3 Sep 2007

i could use this it's like that gii extension.

9:53am, 10 Sep 2007

I've updated it to version 5.

3:06pm, 11 Sep 2007

Cool. What's been changed?

6:54pm, 11 Sep 2007

I've made it work much more like GM's particle system. You can also enable and disable gestures now. The help file has more info.

9:04pm, 28 Sep 2007

I've released Shapemaker. Check it out here:

6:10pm, 8 Oct 2007

Update to Version 5.1
Added a function for drawing shapes and optimized another.

11:05pm, 10 Nov 2007

This makes me think Nintendo DS

3:48pm, 20 Nov 2007

it says when i load the game it cant recognize the code

7:02pm, 20 Nov 2007

Please post on the GMC. Be sure to include the specific error in your post.

8:24am, 29 Nov 2007

Version 5.2 out. New functions and better accuracy.

2:54pm, 6 Jan 2008

Nintendo DS GM Native Emulatie for GM DS Clone'i'es!

(Ill make a DS Program which loads GM Games and allows them to run like a ds by loading script files containing shapes!)

2:47pm, 22 Feb 2008


5:10am, 24 Aug 2010