Sword Fighting

Started by
42 comments, last by Silvermyst 21 years, 11 months ago
Interesting. I've been working on something similar for a third person action/rpg Ive been designing, that is designed around far-fetched sword fighting (ala Crouching Tiger, Hidden Dragon).

I'm still perfecting the controls so I wont go into specifics, but I'm using two generic shift keys. It has the basic fps "WSAD" controls, but it uses two modifiers that can be combined with the generic attack, movement, and mouselook to provide a large amount of possibilities without too many controls.

For example if you push a mouse button, it attacks with that hand. Hold down shift1 and click and it will block (also depends on where you aim). Also things like the movement keys becoming dodge keys when you hold down a shift button. So you can quickly avoid swings.

I think if will work pretty well. I am concerned about it requiring too much dexterity to pull off several moves in a row. It wont work well if to swing than dodge left, and then doing a cartwheel to the left would require pushing a dozen buttons in exactly right order.

[edited by - phriction on May 12, 2002 1:08:28 AM]
Advertisement
Hmmm... everyone is describing proactive swordplay. What about reactive swordplay?

A mouse based sword game where a player simply chose targets would be simple yet engaging. Time delay (m.a..t...r....i..x style) might be necessary to make the game playable, however.

The problem would be developing pre-rendered models to handle the range of target choices. Incremental variations on a basic movement set might be able to handle this problem.
Ok. Anybody that says their are different styles of swordplay are right, but for the wrong reason. There is a massive difference in tournament fighting and combat fighting. That is the difference. I have been sword fighting for nearly 13 years. Everything from boken and shinai to standard european sword/shield. When you are fighting to kill, they all work within the same basic structure. It is only when you start dueling for points or touches or some other artificially civil construct that things change.

Also, rapiers have edges for a reason... Yes they are mostly thrusting weapons, but draw and sabre style cuts are nearly as good as a solid thrust.

Action mapping from mouse gestures would be the best way to go, in my opinion. I would, however, have a crosshair or cursor of some sort linked to a button that would be the target point for a thrust. For instance:

I make the gesture for a downward cut going from shoulder to hip. As my sword travels across the targets body, he raises his shield. I hit my thrust button and my sword-tip snaps up into the targets jaw.

Also, EVERY weapon can thrust. Even a hammer. Some are just better for thrusting than others.

My thoughts,
Landsknecht

P.S. Anybody that knows where my name came from might figure out why I am so vehement on this topic.
My sig used to be, "God was my co-pilot but we crashed in the mountains and I had to eat him..."
But folks whinned and I had to change it.
I think Sandmans "gesture recognition" system is worth consideration. It is similar to the method used to cast spells in Black & White, which works well, and is worth checking out.
Basically, your input system looks for definite gestures, such as a thrust from left to right aross the screen, in the mouse movement and converts these into a list of actions for the character to carry out. This prevents every mouse action being converted into a sword movement, which usually results in the player character looking like a twitching moron! It would probably be hard to get the timing just right, as the characters actions may lag slightly behind the players input, but this is acceptable given the benefits.
The player would still feel as though they had direct control over the characters actions, and yet in reality it would just be a number of preset moves performed in sequence, making collision detection a helluva lot easier.

As for the problem of whether to use the mouse for looking or fighting: why not use both!
The mouse could be used to look around while the character is traversing an empty part of the level. Then, when the character comes across an enemy (say within 20 metres of it) the game enters "fight mode" (there should be some on-screen indication of which mode the game is in).
Control of the camera would be taken over by the game, and the mouse could then be used for fighting. While in this fight mode, the camera would position itself above and behind the player character, and the player character would automatically turn so that it always faced the enemy. If needed the player could still control the camera, perhaps by pressing the middle mouse button and then moving the mouse. If there were multiple enemies another button could be used to swap the camera between them.
This system can be found in the Zelda games on N64, where holding the Z trigger makes Link always face the closest enemy, making fighting much easier. The player character could move towards and away from the enemy using W, and S, respectively. Pressing A and D would make the player character circle the enemy, keeping him constantly in your sights!
I think Sandmans "gesture recognition" system is worth consideration. It is similar to the method used to cast spells in Black & White, which works well, and is worth checking out.
Basically, your input system looks for definite gestures, such as a thrust from left to right aross the screen, in the mouse movement and converts these into a list of actions for the character to carry out. This prevents every mouse action being converted into a sword movement, which usually results in the player character looking like a twitching moron! It would probably be hard to get the timing just right, as the characters actions may lag slightly behind the players input, but this is acceptable given the benefits.
The player would still feel as though they had direct control over the characters actions, and yet in reality it would just be a number of preset moves performed in sequence, making collision detection a helluva lot easier.

As for the problem of whether to use the mouse for looking or fighting: why not use both!
The mouse could be used to look around while the character is traversing an empty part of the level. Then, when the character comes across an enemy (say within 20 metres of it) the game enters "fight mode" (there should be some on-screen indication of which mode the game is in).
Control of the camera would be taken over by the game, and the mouse could then be used for fighting. While in this fight mode, the camera would position itself above and behind the player character, and the player character would automatically turn so that it always faced the enemy. If needed the player could still control the camera, perhaps by pressing the middle mouse button and then moving the mouse. If there were multiple enemies another button could be used to swap the camera between them.
This system can be found in the Zelda games on N64, where holding the Z trigger makes Link always face the closest enemy, making fighting much easier. The player character could move towards and away from the enemy using W, and S, respectively. Pressing A and D would make the player character circle the enemy, keeping him constantly in your sights!
I have only seen one game that actually found a decent way of implementing sword fights: Alone in the Dark 1.

It allowed several moves: you could draw back your sword arm to the left, right or over your head and strike, the further you moved it back before striking the bigger impulse it had on striking the opponent. On its own, this wouldn't make for good gameplay, but the AITD team made two refinements that made it perfect.

First, they used proper polygon based collision detection on both the opponents, and their swords. It sounds obvious, but not many games actually do this.

Second, they used some kind of inverse kinematics system on the characters. Eg: If you drew your arm to the right to strike then changed to overhead striking mode, the sword would move directly to the new position over your head. This allowed very advanced moves to be made up from only the three I mentioned here, the most effective of which was the feint. Only noticable in the fight with the pirate fairly late in the game, if you drew your sword to your right, he'd move his to block it. If you then swung the sword quickly over your head to the top or left position before he moved his sword to match, you could strike him with ease. This is the only effective way to beat him, as he blocks any direct attack with his own sword.

I strongly suggest to anyone wanting to develop a decent sword fight system that they take a good long look at this game.

[edited by - Captain Insanity on May 12, 2002 5:33:33 AM]
"If you go into enough detail, everything becomes circular reasoning." - Captain Insanity
Some great ideas so far.

I''ll have some more time to look at everything in more detail (and respond) when I get home from work, but for now...

LOCATIONAL ATTACKS

I''ve been trying to figure out how best to let a player really choose the location of an attack. I guess the best way to do this would be to just have the enemy''s body on the screen as large as possible. First Person View would be perfect for this.

But, as in a sword fight, you really want to see both combatants (I found that out when I tried First Person View in Bushido Blade) to get a better feel of the combat, First Person View might not be the best solution. Sure, you could show both combatants in a minimized form in a box in a corner of the screen, but for now let''s try to figure out how the view should be for a combat game that focuses on locational attacks.

Oh, and let''s for now keep this purely combat. No adventuring, no picking up items etc. Just two sword fighters trying to kill each other.
You either believe that within your society more individuals are good than evil, and that by protecting the freedom of individuals within that society you will end up with a society that is as fair as possible, or you believe that within your society more individuals are evil than good, and that by limiting the freedom of individuals within that society you will end up with a society that is as fair as possible.
The only way to make Locational Attacks meaningful is by allowing the player to select them with a mouse _on_the_target_ (reactive). Choosing attacks _from_the_player_ will not work (proactive).
quote:The only way to make Locational Attacks meaningful is by allowing the player to select them with a mouse _on_the_target_


Yes, but HOW does this work? How does a player select his target with his mouse? What viewpoint does he get to work with? How big is the target? Etc.
You either believe that within your society more individuals are good than evil, and that by protecting the freedom of individuals within that society you will end up with a society that is as fair as possible, or you believe that within your society more individuals are evil than good, and that by limiting the freedom of individuals within that society you will end up with a society that is as fair as possible.
I have to agree that the fighting system in Zelda 64 is absolutely wonderful. You can jump around, dodge, stab, slash, and it never gets repetitious.
Love that game...

/John
/John

This topic is closed to new replies.

Advertisement