Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP w/ Cloggy's D3D plugin] Basis of a gesture system

Author
Message
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 24th Jul 2007 13:03
Hey all!

Think this is a gesture system anyway! Use the mouse to trace the shape and see what percentage accuracy you get. This could be used as a gesture system where, if your accuracy is high enough then an action takes place based on what gesture you traced.

It is far from perfect so if you have any suggestions then please make them!



I'll attach the image I used for testing as well.

Attachments

Login to view attachments
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 24th Jul 2007 14:30
Well I have improved it slightly. The drawing is now a bit better.



TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 31st Aug 2007 12:22
No one? Wah!

Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 31st Aug 2007 14:01
Wooh It's amazing!! That opens a lot of possibilities for homemade games

TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 31st Aug 2007 15:46
Sarcasm? If not then thanks!

If anyone doesn't get the idea then I'll try explaining again. This allows for the user to draw a shape with the mouse and then checks it against an image. It then returns a percentage of correctness. This could then be used either very simply as a tracing kind of game or as a gesture system. For example, if the player drew a heart then they could regain health.

As I mentioned it is far from perfect and I would really like others to test it and suggest improvements.

Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 31st Aug 2007 17:44
TEH_CODERER I'm being truhfully, I'm thinking of puzzle games, and quests in RPG and fighting games...

TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 31st Aug 2007 19:59
OK. I wasn't sure. Lol! Well in that case then thanks!

HeavyAmp
18
Years of Service
User Offline
Joined: 25th Oct 2006
Location: Castle in the Sky!
Posted: 1st Sep 2007 16:27 Edited at: 1st Sep 2007 16:27
This was one of my ideas for a magic attack. If the player wants to do a magic attack they have to wave their Hand i.e cursor in the shape of the magic attack the higher the percentage of accuracy the higher the attack damage. I haven't got around to creating a rpg yet so I have never implemented the idea but if i ever do ill probably use your code for it. Good job TEH_CODERER!

Better to be dead, than to live your life afraid.
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 1st Sep 2007 18:21
Thanks! Hope you find it useful.

Code Dragon
18
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 1st Sep 2007 18:54
Very cool, could be pretty useful in making mouse gesture systems.

Mortus
17
Years of Service
User Offline
Joined: 14th Dec 2006
Location: Illinois
Posted: 5th Sep 2007 06:49
this is dbpro right?

im haveing a "Could Not Understand Command a Line 12" error
line 12 says --- "d3d_init"

i have no clue what that means im sort of a beginner can anyone help?
calcyman
17
Years of Service
User Offline
Joined: 31st Aug 2007
Location: The Uncertainty Principle
Posted: 5th Nov 2007 15:46
You need a plugin I believe

Your signature has been erased by a hyper-intelligent pan-dimensional being (a mod)
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 5th Nov 2007 18:01
Quote: "[DBP w/ Cloggy's D3D plugin]"

Yep. You need to get Cloggy's D3D plugin. Really, you are probably going to want that plugin whether you use my code or not. It is incredibly useful.

Login to post a reply

Server time is: 2024-11-22 13:00:52
Your offset time is: 2024-11-22 13:00:52