Skip to main content
gamedev.net
🔒 Locked

Gesture-Based combat

Started by JohnHurt 12 replies 3.2k views
Original Post
JohnHurt
JohnHurt
Sorry if this has been discussed before (haven't really found anything searching the forums), but is there any sword-fighting/rpg game out there that has some kind of gesture-based combat system. By that i mean that the way in which you move the mouse directly relates to the way you swing your weapon. I'm not talking about a complete inverse kinetic method, like in Trespasser or... (oh, what was that game called) Die by the Sword(?), but just something that gives you a good intuitive way of pulling of different moves. I was looking forward to the new Prince of Persia's "Freeform combat system", only to find that they just use combinations of button presses. Anyway, sorry if this is old hat, I'm new here!
rootisreal
rootisreal
The original Morrowind had this for melee combat. You could preform overhead swings, stabs and slashes with this feature.

Arx Fatalis had this for the casting of spells.
Coz
Coz
I wanna add, I didn't liked Morrowind's gesture based combat. Maybe because I found it hard to use.
Armand
Armand
Silver used a very simple mouse control for sword play.

When in combat mode:
A Left-drag across(left or right) the screen gave you a slash attack (left or right).
A Left-drag up the sceen gave you a thrust,
and A Left-drag down, spun the hero 180 while downing a different slash attack

Right click, was raise sheild and defend.

I found this system worked quite well.

Armand.
Armand -------------------------It is a good day to code.
Derakon
Derakon
I've seen this done a couple of times, but I've never seen it done well. The gestures tended to get reduced to a few basic movements anyway (e.g. sideways swing, overhead swing, or stab), which would be much more easily-performed with a keyboard. If you can think of a way that using the mouse would actually add to the gameplay, though (perhaps, aiming at specific weak points?), then you'd have a better excuse for doing this.
Jetblade: an open-source 2D platforming game in the style of Metroid and Castlevania, with procedurally-generated levels
smitty1276
smitty1276
I always thought that it would be cool to do a system like this, and what I had in mind sounds a lot like the one mentioned by Armand. No left button would be pressed for basic attacks, however. I was thinking shift or something, to keep the mouse buttons free for other things.

-- Slashes would be performed by a left or right motion.

-- A downward "chop" type attack (what's this called?) would be performed with a simple downward mouse gesture.

Basically, with no modifiers (left button, as below) the sword would simply move in a manner consistent with the mouse.

-- Thrusts.... that's where the left button comes into play. If you want to thrust you would hold down the left button and move the mouse in the direction that correlates to the intended target area of the thrust... head would be a strong upward motion... chest, a small upward motion... side, a slight sideways motion... etc.

-- I wouldn't want the mouse gesture to cause the player to perform some acrobatic moves (spins or whatever), because the whole purpose is to enhance the immersiveness of the game. The mouse should correlate somewhat logically to what the hand would actually be doing in a melee situation. You can't move your hand in a circle and do some crazy spin move in real life, so why should you in the game? Maybe with a key-mouse combo... a way to "escape" the sword-play context.

-- Right button would result in a parry.

-- Space bar (or something) would raise shield, if any.

The coolest part, I think, would have been the fact that your personal skill level (overall and with various weapons) as well as your strength would affect your ability to use various weapons. If you were a weak, skinny-boy, you wouldn't have much luck with a large two-handed longsword. It would respond very slowly, if at all, to your gestures. Stronger players would have more success with it and it would be more responsive (and deal much damage). A smaller sword--a rapier, perhaps--would respond with lightening speed and a players dexterity would then come into play regarding the accuracy with which they could wield it. Of course, it would be far less devastating, blow-for-blow, than the large swords, but more strike opportunities exist.

It would be very tedious to implement (that's why I never got around to it), but I always thought it would rock.




frostburn
frostburn
Heh. Cool.. I was thinking about this very subject a couple of days ago.. :)

EDIT: This got way off topic, since the question was "Have you seen a game that..." [smile]. It is my ideas on how such a game could be made though, so it's very Game Design related.

My idea was very close to full IK. I haven't played any game with IK based swordfighting, so I'm not sure how it compares.

The mouse controls the blade. Move the mouse to the left and the blade moves to the left - It also controls the body however, so if you keep moving the mouse to the left the character will spin in a circle. Move the mouse down and the blade goes down. The character doesn't bend over, but he might change his stance to move his body closer to the ground (move legs further from each other and bend them a bit). A bit of tweaking is needed to make the sword move naturally. In an attack the body usually moves first (legs, hips, shoulder, arm, sword - think boxing, but minus the sword [smile]). Speed of the mouse could be used to decide if the player is making a slash or just moving his arm to get in position for a different thrust/slash. A modifier, button or key, could also be used to decide what kind of manouver the character is performing.
The mouse manouvers should be used in tandem with the movement keys to get the correct manouver.
The problem is that the sword can be moved both up/down, left/right and in/out, so we're missing a degree of freedom. Also the sword can be held in different ways, so we have to let the game make some assumptions until a neural interface becomes available [smile].

Real life example:

The basic slash from Posa di Donna, a stance where the swordman stands with his left leg in front of the right and holds the sword "nonchalantly" on his right shoulder, goes from the right/overhead to low left (aimed so that the slash goes through the opponents head to his teeth and ends up on the right side of his abdomen), while the foot stance change to right foot in front. At the end of the slash the blade should be pointing slightly upward from the crotch of the swordman. This stance is called Boar's Tooth and is ideal to stab the enemy in the guts/chest.


In a computer game:

When the character has the sword on his right shoulder move the mouse swiftly left and down while simultaneously using the forward-button (usually w) to step toward the the enemy. A modifier could be used to choose between a "chopping" motion where the sword goes straight down, or a slashing motion where the edge of the sword goes close to straight down. This is the correct way of doing it. You've probably seen it in movies with katanas, but it's the preferred motion with longswords as well. Swords are most effective as slashing weapons or thrusting weapons, not chopping. Use axes for that.

Parrying should also be done with the gestures, but perhaps with a modifier key so that the game doesn't think you're trying to attack. Basically the player must position the sword so that the enemy's sword must pass through his to hit him. If his sword has velocity towards the enemy's sword at the time of impact this could knock the enemy's sword away and perhaps make him lose it (if it's a simple opponent). From the parray the player should be able to attack directly - his sword is usually between the enemy's sword and the body and the enemy is close to defenseless. He can dodge though.

Opposing mouse motion: The mouse gesture gives the sword momentum and it keeps building up until the mouse motion stops. When it does it'll take a few moments for it to stop unless the player moves his mouse in the opposite direction. See below on stamina/con.

Character skill:

Dexterity or agility is used to determine how fast the character can change stance and plays part in accuracy in his movement (very useful for thrusting). Also plays part in speed of attack and damage in a slash attack.

Strangth determines what happens during a parray. If the character is weak his sword is knocked back by the attack. He could also loose the sword. It also determines the damage in a chopping or thrusting attack and to a lesser degree the damage in a slashing attack.

Stamina or constitution is used to determine fatigue. A missed attack causes twice as much fatigue as a successfull attack since the attacker must stop his sword from flying or crashing into the ground. If the sword is magical and can't break or get stuck it may actually be better to let it crash. It's worse if the attack is horizontal - the momentum would want to turn the character around. Instead of trying to stop the sword, the player could continuing with the spin and try to hit the enemy on the next round :)
The character also gets fatigued by dodging or other foot movements and parry/block. The fatigue could be "area-specific", and simulate build up of lactic acid in the muscles. It IS possible to beat an enemy into submission even if he's just holding up his sword or shield and blocking all attacks. Problem is the attacker might get tired first :)


Controlling both the sword and a shield might be kinda hard to do in a computer game, so a simple keystroke could be used to raise his shield or hit his opponent's sword with it (bucklers are used in this fashion). Sword motion should be possible even with the shield up, though it'll restrict his motions.

For simplicity the sword should always be treated as a lethal weapon (a light saber in SW is the perfect analogy). It should always hit the enemy with the edge. Single edged swords are a bit tricky in real life, since the sword must be turned to face the enemy. In a game this would be too much realism.


Damage:

The damage should be determined from the following:
How fast the sword is moving. This includes footwork of course.
How much force is behind the movement. If the mouse motion isn't continued "into" the attack, this lessens. Footwork also plays part especially in a thrust attack.

Speed alone doesn't do much. A whip can reach the speed of sound, but it wouldn't do anything to a guy in armor since the weight behind it is nil. Speed * force is a simple equation though it might be too simple. A slashing attack doesn't have as much force as a chopping attack but against an unarmored opponent it can do more damage. The sword would quickly grind to a halt with a chopping attack but a slashing attack doesn't slow down noticably.


The armor of the enemy:

If he's wearing a chain mail, only a thrust would succed and that's only with luck. A chop might break bones, but only a magic sword would pierce the maille. A slashing attack is useless unless the sword is enchanted. The chain mail wouldn't necessarilly have any unprotected spots, though in RL it usually only reached the warrior to mid thigh. Leathers would do for the legs, or they'd be unprotected there.

If he's wearing full plate mail, only eyes, part of neck and insides of shoulders, elbows, crotch, knees is unprotected. Other tactics should be used, such as trying to tire him or knock him down (hooking his leg is very efficient, or hamstringing if you're very lucky). An un-enchanted sword wouldn't pierce the armor even with a thrusting attack (2mm of steel stops a lot). Some axes or especially War-Hammers (hammer with a spike) would bring lot of hurt though.

Hard leather armor "Cuirboilli": Thurst is very efficient. Slashing attacks would also probably succed, but depending on the thickness of the padding the attack might only produce a flesh wound. Chopping attacks might break bones but not penetrate very deep. A horizontal chop at the abdomen would probably not penetrate the muscles whereas a slash would probably gut him.

Soft leather armor: Today this would be a thick leather jacket. It'd help some, but not much. Much lighter and unrestrictive than the other kinds though. Ideal for quick agile character that prefers to not get hit.

Scale armor: The scales are overlayed downwards like fish scales. A downward attack would be much less efficient than an upward attack as this would go between the scales. The most effient attack would be an upward thrust.

Lamelle armor or splint mail: Think roman legionnaires. This is a kind of light plate armor. It's got chinks though, and a good thrust might find it. Obvious areas would be unprotected like with the full plate.

Both hard and soft leather armors can also come with sewn-on rings. This allows better protection against slashing attacks without adding much weight, restricting movement and decreasing stealth. The rings might reflect light though, and a thief might choose invisibility over added protection.

It'd also be possible to protect the insides of shoulders, elbows, crotch and knees with chain mail, but this would add to weight.


Hmm.. This wound a bit off topic, but the info should be interesting for anyone interested in medival combat, so hey :)
Ravuya
Ravuya
IMO, this is much better suited to a controller with two analogue joysticks, that way you could rotate the second stick for the sword attack (slow upper arc for an overhead slam, left-to-right really fast for a quick slash).

It doesn't really have the same sort of effect on the PC. It would be amazing in a sidescrolling PS2 game, though. A different system would have to be devised for the PC, and I would imagine it could work much the same thanks to a mouse but it wouldn't have the same sort of feel as I imagine.

I seem to remember Die By The Sword had macros in multiplayer, same with Jedi Knight II. Perhaps that's the better way to go: your character gets x amount of moves and can program them in and save them to his character, Hybrid-Heaven style.
frostburn
frostburn
Quote:
Original post by Ravuya
IMO, this is much better suited to a controller with two analogue joysticks, that way you could rotate the second stick for the sword attack (slow upper arc for an overhead slam, left-to-right really fast for a quick slash).


If this is regarding my idea, I disagree. Personally I hate controllers, though an analogue "keyboard" (normal keyboard but with pressure sensitive keys for use in games. At least a, w, s, and d) would be nice. The accuracy needed to control the sword in the way I imagine it wouldn't be possible with a controller unless the game was s_l_o_w. A mouse with an addtional axis of control would also be nice. If you could rotate the mouse on the table to twist the upper body or something that would be cool, but it's not neccessary to make my idea work.
Derakon
Derakon
If you want more degrees of freedom, you should look into haptic input devices. Problem is, you need programs specifically designed to use them (alternatively, everyone who wants to use your program would need one or a workaround). They're primarily used for designing 3D worlds, where the extra degree of freedom eliminates a lot of mode-switching.
Jetblade: an open-source 2D platforming game in the style of Metroid and Castlevania, with procedurally-generated levels
Iron Chef Carnage
Iron Chef Carnage
For a simple, but fairly intuitive example, take a look at "The Chronicles of Riddick: Escape from Butcher Bay". Different weapons have different moves, and are more or less effective against different enemies with different equipment. Analog stick controls the type of swing, and long combos or devastating blows are possible with a little practice. I find that I am able to use basic principles regarding distance and timing that I learned in martial arts and fencing, which is very satisfying.
Rosecroix
Rosecroix
Just a side note, Morrowing in all its glory, but the first 3D RPG to use this was the first textured freemovement RPG ever made, Ultima Underworld. I also seem to remember Arx Fatalis was never named Ultima Underworld III, but that was what the team originally wanted to make. Easy thing to belive too, if you play them booth.

/Rosecroix
NoahAdler
NoahAdler
To add on to what Derakon mentioned, there are some haptic feedback devices which would be ideally suited to this. At my old office we had a Sensable Phantom, which was meant to be used to surgery simulation, but I always thought it would be top-notch for a sword-fighting simulation. Grip the handle not like a pen or scalpel but like a sword handle, and it would be fantastic. The additional benefit of the actual haptic feedback device (i.e., when you hit into an opponent, the device's arm applies pressure in the opposite direction) would be nice too :-) Unfortunately, these devices are still far out of the consumer price range, and don't seem to show any indication of coming down any time soon. I believe lack of good input devices is the number one issue hindering gaming today, though hopefully Nintendo will continue with their trend started by DS and maybe someday we'll all have haptic feedback devices sitting next to our mice :-)
-bodisiw
Madster
Madster
Quote:
Original post by frostburn
--8<-- snip --8<--
Speed alone doesn't do much. A whip can reach the speed of sound, but it wouldn't do anything to a guy in armor since the weight behind it is nil. Speed * force is a simple equation though it might be too simple. A slashing attack doesn't have as much force as a chopping attack but against an unarmored opponent it can do more damage. The sword would quickly grind to a halt with a chopping attack but a slashing attack doesn't slow down noticably.
--8<-- snip --8<--


you're looking for power and/or momentum

momentum: m*v
power: 1/2 m*(v^2)

momentum will let you know how much damage your move can make (speed of your swing times the mass of your weapon) at any given time

power will let you know how much energy is needed to execute a move.... integrated.. um... on second thought, leave power alone and go with momentum.
a whip is light and speedy. a morning star is heavy and rather slow.
Still a whip can't harm someone with armor, so if you add piercing/blunt tags to each weapon (maybe with level... say piercing 5 beats armor 4) i believe that you'll be able to get the result that you want.

edit: now last sentence makes sense when read out loud :oops:

[Edited by - Madster on December 27, 2004 6:49:32 PM]
Working on a fully self-funded project

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.