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.
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 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.
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
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.