I'd like to introduce you to my gesture based casting system for SC2 which is, as far as I'm aware, the first of its kind.
For those who have played the game 'Black and White' before, the concept of gesture based casting should be very familiar! For those who aren't, gesture based casting involves the player drawing a particular symbol on the screen using their cursor. If the symbol drawn matches a spell in the players spell book, the associated spell is cast.
Here's a short demonstration video to show the prototype I've developed thus far, in which a High Templar (in the bottom right hand side of the screen) casts a variety of spells upon some hapless marines. Each spell used has a unique symbol which triggers it (unfortunately the video recorder I was using hides the cursor, but you can use the raised supply depots as an indicator of the cursor path and the symbol used as the trigger).
Each spell was cast in a single pass. All I needed to do was to click and hold down a mouse button, draw the shape I wanted and then release the mouse button to signal that the drawing was complete.
If you're curious in using this system, it will be released as a public asset in the future, once I have it working to my satisfaction. I'll post new updates as I continue to refine the system :D
23/10/10 V2.0
v2.0 of the gesture based casting system is done! I've included a video of the new system here. Enjoy!
The way i see it, it might be a smarter idea for you to put the "cast" button onto space, since nobody uses it to check "alerts" in sc2... Well I don't use it for sure.
Hold Space and you can draw on the screen... Maybe where ever your cursor is on, you will start drawing a "trail" to see how it will look like.
Problem is the actual drawing, how do you make the game recognize a trail as a drawing of any sort?
To be more specific on your question, you save the unit that is highlighted into the drawing line, then show it as depot up/down for visible purpose. In a real game you might need some fancy thing like lights or runes..
I played black and white 2, but unfortunately, I didnt buy gestures cuz they are a total waste of your hard earned money. But this is very cool...Can you explain the basics of how you pulled this off? Also, it would be cool if you created some sort of models as you drag the mouse so you can see the path in-game.
Hmmm...I'm not sure if it is feasible, but could this work if you made the activating key function as a unit spawning key? Example: Make the key you hold down spam spawn a unit like, for example a zerg egg with the properties adjusted to make it neutral and the time frame before it bursts and disappears reduced. My thinking is you would then have a visual indicator and it would look cool if you time the burst to match the gesture completion time frame.
The problem with that video before is that it requires units for you to move the cursor above... I'm talking freeform gestures that you can find in Black and White 1+2.
@ChromiumBoy: Go
How are you recognizing your gestures? Is it more or less hard coded or do you train certain gestures and then match against them in some way?
The supply depots are just placeholders. In the released version, there will invisible 'trigger' units at each grid position on the screen, much like the cursor tracers which have been previously developed. As the units are highlighted some sort of lighting or glow effect will be placed on top of the trigger unit, lending the appearance that the cursor is tracing out a mystic symbol.
@dra6o0n:
Unfortunately there's no real support for cursor detection atm, hence the major work around. See OneTwoSC's thread for details on the detection system: http://forums.sc2mapster.com/resources/tutorials/11010-video-diablo-camera-movement/. TehWildCard seems to have also created a cursor detection system, but I don't have any details on how it works.
@AzothHyjal:
All will be reveled with time ;) Basically I have the game break the drawn symbol into its component parts. It then proceeds to search through the spell list and if it manages to match each listed part (in order) to a listed spell, in all particulars, that spell is selected and the search ceases.
In its current form, implementing a new symbol that the computer recognises is actually quite simple (about one, short trigger command per component of the symbol) though this could potentially increase depending on the complexity of the symbol. But I want to design the system it so that a user can implement a new symbol and the associated spell quite easily. The spell effects will be the real challenge, however :D
The problem with that video before is that it requires units for you to move the cursor above... I'm talking freeform gestures that you can find in Black and White 1+2.
The only way you can currently track mouse movement in game is by using units....... Theres fancier ways it could be done, but the point is that you need units......
Theres a ton of info about this on the forum.....
What he has show as a demo, is pretty cool.
if you were gonna do these in the normal game you would prolly have to shrink it down and spawn it in a spot on the screen relative to the players camera position.
You would then also want to activate your "spell grid" by the means of a hot key (dummy ability on hero, key events, dialog button,)
I can already imagine a few interesting ways you could use this.
What id like to know is how he recognizes partial matches..... because it didnt look like people had to draw the letters perfectly because the "N" was the crappiest drawn N ever.
if you were gonna do these in the normal game you would prolly have to shrink it down and spawn it in a spot on the screen relative to the players camera position.
You would then also want to activate your "spell grid" by the means of a hot key (dummy ability on hero, key events, dialog button,)
What id like to know is how he recognizes partial matches..... because it didnt look like people had to draw the letters perfectly because the "N" was the crappiest drawn N ever.
Thanks :P The N is back to front, like: "|/|". No particular reason for this, except to look like more runic or something. Matching was achieved in the first version by determining whether the angle between the start and end point of each line of the symbol was within a tolerance limit built into the processing trigger, rather than have a rigid shape to match the symbol to. The inverted V (i.e. /\) I think was a very good example of the matching system in action, cos I didn't draw it particularly well at all :P
I've found first processing system to be a bit limiting (it was throwing up miscasts more often then I would like) and an overhaul is in the works. I expect the newest version to be complete within a few days. I'll update this post with a new video too.
Greetings all,
I'd like to introduce you to my gesture based casting system for SC2 which is, as far as I'm aware, the first of its kind.
For those who have played the game 'Black and White' before, the concept of gesture based casting should be very familiar! For those who aren't, gesture based casting involves the player drawing a particular symbol on the screen using their cursor. If the symbol drawn matches a spell in the players spell book, the associated spell is cast.
Here's a short demonstration video to show the prototype I've developed thus far, in which a High Templar (in the bottom right hand side of the screen) casts a variety of spells upon some hapless marines. Each spell used has a unique symbol which triggers it (unfortunately the video recorder I was using hides the cursor, but you can use the raised supply depots as an indicator of the cursor path and the symbol used as the trigger).
Each spell was cast in a single pass. All I needed to do was to click and hold down a mouse button, draw the shape I wanted and then release the mouse button to signal that the drawing was complete.
V1.0
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/o_v45jbs8pI?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/o_v45jbs8pI?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>
If you're curious in using this system, it will be released as a public asset in the future, once I have it working to my satisfaction. I'll post new updates as I continue to refine the system :D
23/10/10 V2.0
v2.0 of the gesture based casting system is done! I've included a video of the new system here. Enjoy!
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/lQy8SJBo_lI?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/lQy8SJBo_lI?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>
Thats a sexy system >.< looks great great job
OMG my duck morphed into a monkey - BLACK MAGIC
@ChromiumBoy: Go
Yep. Creative developers could come up with some cool mini games using this concept, or embed it in a modular aspect for some part of their map.
Is the mouse tracking done with the unit highlight event?
@Bibendus: Go
I would guess so, but it could be done using anything really :/
@Bibendus:
Yup, unit highlight events are the key, much like the Diablo movement system OneTwoSC made :)
i'm wondering if you got this idea from black and white?
@aGoomba: Go
You know he mentions the game by name right in the description...so...yes.
cast inferno than raise dead than bunnies than... wait wrong game
The way i see it, it might be a smarter idea for you to put the "cast" button onto space, since nobody uses it to check "alerts" in sc2... Well I don't use it for sure.
Hold Space and you can draw on the screen... Maybe where ever your cursor is on, you will start drawing a "trail" to see how it will look like.
Problem is the actual drawing, how do you make the game recognize a trail as a drawing of any sort?
@dra6o0n: Go
This kind of system, :)
http://forums.sc2mapster.com/resources/trigger-libraries/11481-library-realtime-mouse-tracking-system/
To be more specific on your question, you save the unit that is highlighted into the drawing line, then show it as depot up/down for visible purpose. In a real game you might need some fancy thing like lights or runes..
I played black and white 2, but unfortunately, I didnt buy gestures cuz they are a total waste of your hard earned money. But this is very cool...Can you explain the basics of how you pulled this off? Also, it would be cool if you created some sort of models as you drag the mouse so you can see the path in-game.
@ChromiumBoy: Go
love not getting credit!
Hmmm...I'm not sure if it is feasible, but could this work if you made the activating key function as a unit spawning key? Example: Make the key you hold down spam spawn a unit like, for example a zerg egg with the properties adjusted to make it neutral and the time frame before it bursts and disappears reduced. My thinking is you would then have a visual indicator and it would look cool if you time the burst to match the gesture completion time frame.
Just an idea.
The problem with that video before is that it requires units for you to move the cursor above... I'm talking freeform gestures that you can find in Black and White 1+2.
@ChromiumBoy: Go How are you recognizing your gestures? Is it more or less hard coded or do you train certain gestures and then match against them in some way?
The supply depots are just placeholders. In the released version, there will invisible 'trigger' units at each grid position on the screen, much like the cursor tracers which have been previously developed. As the units are highlighted some sort of lighting or glow effect will be placed on top of the trigger unit, lending the appearance that the cursor is tracing out a mystic symbol.
@dra6o0n:
Unfortunately there's no real support for cursor detection atm, hence the major work around. See OneTwoSC's thread for details on the detection system: http://forums.sc2mapster.com/resources/tutorials/11010-video-diablo-camera-movement/. TehWildCard seems to have also created a cursor detection system, but I don't have any details on how it works.
@AzothHyjal:
All will be reveled with time ;) Basically I have the game break the drawn symbol into its component parts. It then proceeds to search through the spell list and if it manages to match each listed part (in order) to a listed spell, in all particulars, that spell is selected and the search ceases.
In its current form, implementing a new symbol that the computer recognises is actually quite simple (about one, short trigger command per component of the symbol) though this could potentially increase depending on the complexity of the symbol. But I want to design the system it so that a user can implement a new symbol and the associated spell quite easily. The spell effects will be the real challenge, however :D
The only way you can currently track mouse movement in game is by using units....... Theres fancier ways it could be done, but the point is that you need units......
Theres a ton of info about this on the forum.....
What he has show as a demo, is pretty cool.
I can already imagine a few interesting ways you could use this.
What id like to know is how he recognizes partial matches..... because it didnt look like people had to draw the letters perfectly because the "N" was the crappiest drawn N ever.
Both of these are already in the works ;)
Thanks :P The N is back to front, like: "|/|". No particular reason for this, except to look like more runic or something. Matching was achieved in the first version by determining whether the angle between the start and end point of each line of the symbol was within a tolerance limit built into the processing trigger, rather than have a rigid shape to match the symbol to. The inverted V (i.e. /\) I think was a very good example of the matching system in action, cos I didn't draw it particularly well at all :P
I've found first processing system to be a bit limiting (it was throwing up miscasts more often then I would like) and an overhaul is in the works. I expect the newest version to be complete within a few days. I'll update this post with a new video too.
v2.0 of the gesture based casting system is done! I've included a video of the new system in the original post, as well as here. Enjoy!
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/lQy8SJBo_lI?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/lQy8SJBo_lI?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>