
How to implement 'realistic' swordfighting in video games. - jamongkad
http://www.shamusyoung.com/twentysidedtale/?p=188
======
thristian
If I've learned nothing else from Dan Cook of <http://lostgarden.com> it's
that just thinking up a game-mechanic is practically useless - you have to
make a prototype, play with it (as a game) and tweak it (as a coder) to bring
out the fun. Like any other fiendishly complicated, non-linear function, the
psychological response to 'fun' is not something you can just sketch out on a
napkin and say 'yeah, that'll work'.

Here's hoping someone with a bit of time on their hands will take this spec,
stick it into some RAD game tool and see what happens.

~~~
patio11
_'yeah, that'll work'_

"That won't work", on the other hand, is easy. Here's why "realistic" fights
with lethal weapons don't work for, e.g., a Star Wars game: George Lucas can
fiat that Obi Wan never eats a lightsaber until it is dramatically
appropriate, but in the game, for there to be challenge there has to be the
illusion of risk, and if you're risking insta-death lightsaber cuts then a lot
of kids and casual gamers (bread and butter for Star Wars) are going to get
cut into pieces by mooks. That is going to be deeply unsatisfying to them.
Nethack has a subculture who loves it dearly ("Hah, drunk the potion on level
one without first testing to see whether it is a cursed potion? Man, you must
be new at this. _rolls_ Oh, you're stoned. Time to restart!"), but the
"physics" for Star Wars are very, very different.

The reason D&D doesn't have the fighter die after a hit with a giant club
isn't because we're capable of suspending disbelief as long as we don't see it
happen. Its because, given that D&D is based around having most shots by
competent opponents connect (there is another problem with the other way),
having one-shot instasquish makes the heroes seem markedly less heroic, and
would result in e.g. the defining D&D encounter with a dragon get skipped
totally by rational players. (At least until they could find a suitably non-
dramatic low-risk way to dispose of the dragon without ever being perceived by
him, such as having the wizard Wish him out of existence.)

[On reflection, the "game fiats you do not die when you as the player fail to
dodge an insta-kill attack" gets around this objection, although one wonders
if you're sacrificing player agency for "making sense", since a player who
literally abandons his controller will see the animation system play his
character _flawlessly_ for a minute until his stamina runs out. "Wait, what
was I adding to this performance?" is not something I'd want to cause a player
to think.]

~~~
lacker
_if you're risking insta-death lightsaber cuts then a lot of kids and casual
gamers (bread and butter for Star Wars) are going to get cut into pieces by
mooks._

It wouldn't just be insta-death. In the article he explains how a "focus" bar
would replace a "health" bar, with the only real difference in terms of the
logical mechanics being that you don't just lose focus when you get hit.

------
nonrecursive
The game Dragon Realms (play.net/dr) implements a system very much like this.
It's actually a mud and not a video game, but that actually doesn't make a
significant difference in this context.

DR has balance, so that the better balanced you are the better you can attack
and defend. Some weapons are better than other at unbalancing an opponent, and
you can also use spells to gain balance or unbalance something else.

It also has stamina, so that when you swing a sword over and over eventually
you'll start swinging wildly, and eventually you'll fall over from exhaustion.
This also negatively affects your balance.

The mechanic of position is also used, and as you play you learn how to
respond to attacks or execute sequences of attacks to gain a better position.

Benzim mentioned having thrust, slash, etc, and DR implements this idea with
thrust, jab, chop, sweep, slash, charge, etc.

The DR system differs from the one in the article in that you can face
multiple opponents, though that's a skill you have to level up or else you'll
be overwhelmed.

Overall the combat system is very engaging and different from the typical MUD
system of typing "attack" and watching lines of numbers go by. Worth playing
if you're into that kind of thing.

~~~
stcredzero
A system with balance, focus, and stamina might be interesting. You could
simulate different fighting styles using these quantities. (For example, one
style could emphasize stamina -- it would greatly impact the opponent's
stamina, but at great cost to your own balance.)

------
VBprogrammer
Swordfighting is a lot like sex. Often it's not what you do - but what you
say.

A: Soon you´ll be wearing my sword like a shish kebab! B: First you better
stop waiving it like a feather-duster.

~~~
stcredzero
You're thinking of the "Dashing Swordsman."

<http://oots.wikia.com/wiki/Dashing_Swordsman>

~~~
philh
The original Secret of Monkey Island had a system called "insult
swordfighting". One combatant would taunt the other ("you fight like a dairy
farmer!"); if the recipient came up with a good response ("how appropriate.
You fight like a cow"), they would take a turn. If not, they would get pushed
back. Get pushed far enough back and you lose.

That's what VBProgrammer was referencing. During the Dashing Swordsman
sequence in OOTS, Rich recieved a lot of fan mail for referencing MI, but said
he'd never heard of it before.

~~~
stcredzero
There's also the Pkunk from the Star Control II video game. They recharge
their spacecraft by shouting insults at their enemies to drain "emotional
energy."

<http://wiki.uqm.stack.nl/Pkunk>

------
benzim
Another interesting mechanic would be different types of attacks: thrust,
slash left, slash right, slash down. The player can see the attack beginning
and has a small amount of time to choose the correct defense to that attack.
Choosing the correct defense reduces the amount of focus lost. You could also
add shields. If you press block with a shield it'll block any attack with
minimal loss of focus. Shields would have hit points and break if used too
many times.

Mount and Blade is the closest game I've played to this. It still has hit
points, but that makes sense for a medieval game where you're fighting heavily
armored humans.

~~~
DLWormwood
This discussion is sounding more and more like the card game "En Garde"...

<http://www.slugfestgames.com/games_eg.php>

The only difference I can tell is the game uses the term "poise" instead of
"focus." But the notion of attack variants, responses and improvised gear
pretty closely meshes with what everybody here and at the original post's
thread seem to want.

------
jderick
I think the original Prince of Persia was the most fun swordfighting game I
have played.

~~~
neilk
This one guy, Jordan Mechner, has designed a lot of the interesting martial
arts simulations over the years. Prince of Persia, the Last Express, and even
Karateka (if you were gaming in the 80s).

<http://jordanmechner.com/bio/>

The Last Express was really interesting. It's mostly a Myst-style, er,
mystery, with animated cut-scenes. But even despite the limited interface
there is a cool fight mechanic. You can only survive by predicting what the
opponent's next attack is going to be by subtle shifts in body posture, and
doing an appropriate countermove.

~~~
plinkplonk
"his one guy, Jordan Mechner, has designed a lot of the interesting martial
arts simulations"

How does one even begin to write a martial art simulation? Does one model the
human body (model things like "a human elbow can turn x degrees in 2 planes"
or whatever)? Does anyone have any references to (or demo code on) how to
write a martial arts simulation? Thanks in advance.

~~~
neilk
Well, I really just meant "games". I'm not a game programmer, just an
occasional player.

But, maybe I chose the word "simulation" because his works are always grounded
in ordinary body physics. The typical fight game is really a button-masher
with the reward of seeing a body fall to the ground if you win. Mechner's
fight mechanics are about things like leverage, timing, moves and
countermoves. They aren't really 'realistic' either but he's going one level
deeper.

------
Batsu
I think the author needs to have a look at the latest Prince of Persia. The
elaborate acrobatics plus his suggested system are what make the game
interesting.

However, the other thing that needs to be remembered is that if you want to
play real sword fighting, take up fencing. Better graphics and level of
immersion than you'll find in any game.

~~~
IsaacSchlueter
_However, the other thing that needs to be remembered is that if you want to
play real sword fighting, take up fencing. Better graphics and level of
immersion than you'll find in any game._

I don't know. Fencing is way more effort, harder to master, and I'm not so
sure I agree about "better graphics". I mean, they're higher definition, sure,
but not _nearly_ as awesome.

------
mynameishere
I stopped reading when it seemed like he was trying to reconcile reality with
games. Won't happen. In real life, a .22 caliber cartridge to the pinky will
put you on the medivac. In a game, you keep playing because...the point of a
game is fun, not avoiding sepsis.

------
ChrisXYZ
Bushido Blade for the original PlayStation was a one-on-one game with pretty
realistic weapon fights.

One hit from a sword in a vital area and you were dead. Hits to the legs or
arm would disable that limb.

A lot of the fights were over quickly. But when both players were good, you
could have some pretty tense, tactical duels.

The game mechanics also encouraged you to fight honorably.

------
nazgulnarsil
Love the article and I'd just like to take a moment to lament the lack of
Bushido Blade type games in the last 2 generations of consoles. Easily the
greatest fighting games ever.

you can email me if you can't figure out a way of playing them >_>

------
orionlogic
There was a game called Moonstone which has realtime swordfighting. You could
use 8 way axis of the joystick ( preferably Phyton brand) with two button. It
was fantastic and never surpassed.

I don't understand why you need realistic sword fighting in games where you
play just for fun. If realism needed then probably you need a fencing
simulation.

------
jpd
The best sword-fighting game I've come across has been Defenders of the Crown.
Very quick little fights, mess up three times and you die.

For an example of an original martial arts fighting game, Toribash is worth
checking out and seems very interesting. My computer isn't powerful enough to
play it though, so I can't give a review.

------
alex_c
re: boxing games and stamina. I've never found this game mechanic to be
convincing, just vaguely frustrating. All of us know what it feels like to
push our muscles to the point of exhaustion, until they no longer respond - it
is such an innate experience that for me, it is impossible to convincingly
recreate it with a keyboard or controller and some on-screen meters.

On the other hand, most of us probably don't have experience bludgeoning each
other with sharp or blunt objects to the point of exhaustion or death. This
might mean two things: first, that we don't object to flashy, fun combats,
because they are closest to our fighting experience which comes from watching
movies. Second, that a realistic combat - a tedious, dirty matter of
concentration and endurance - might just not be that much fun to play.

~~~
dfranke
> a tedious, dirty matter of concentration and endurance

Eh? Not at all. In sabre fencing, it's rare for a touch to take more than 15
seconds. Even in épée, which most closely approximates a real duel, one minute
is about the norm.

~~~
anamax
In real life, "winning" 10-7 isn't all that much of a win. More to the point,
"a touch" doesn't cause a position reset and some touches are far more
important than others.

Fencing is amazing, but it isn't fighting even if fencers do better at sword
fighting than folks with no experience.

~~~
dfranke
I had an in-depth reply to this, but I accidentally closed the browser tab in
the middle of composing it. So I'll leave it at this for now: historical
accounts of the duration of sword duels do not distribute themselves
qualitatively differently from modern fencing, and even less so from the
fencing of 100 years ago.

------
wesley
Let's see how Red Steel 2 for the wii handles this. It will be revealed at E3
(beginning of june). It makes use of wii motion plus which adds extra input to
the wiimote so that you can have a true (or as close as you can get) 1:1
motion.

------
dfranke
I think the realistic version would be more fun. But as both a fencer and the
author of a Nethack variant, I might be an outlier here :-)

------
wlievens
Dark Messiah had an interesting combat system. Too bad they outsourced the
multiplayer component, which absolutely sucked.

