[MUD-Dev] Better Combat

David Kennerly kennerly at finegamedesign.com
Wed Aug 11 07:37:14 CEST 2004


Matt Mihaly wrote:

> One of the most famous fights of all time could be used as an
> example: Foreman vs. Ali in Kinshasa: The Rumble in the
> Jungle. Foreman was heavyweight champ, Ali was looking to take
> back the title (and be the second person ever to do that). Ali's
> strategy? He sat on the ropes and let Foreman tire himself out
> through trying to beat the crap out of Ali.  Worked
> beautifully. By round 6, Foreman was visibly tired and Ali was
> still pretty fresh. Obviously defence ALONE won't win a fight, but
> defence can turn the fight into a foregone conclusion, with
> offence playing the role of simply mopping up what's left of the
> opponent.

A simple mechanic to model this would be that every attack not only
injures the opponent but also injures the attacker.  In such case,
the optimal strategy consists of making the most efficient attacks.
That is, ensuring that every attack maximizes the ratio of
opponent's injury to one's own injury.

> Personal example: I competed in the US Open for Brazilian
> jiu-jitsu last year. It was my first major tournament in jiu-jitsu
> and I was a bit nervous. Didn't eat well that morning and was
> high-strung all morning until it came my turn to fight. I started
> off dominating my opponent completely. He played defence, though
> largely out of not being able to do anything offensive. Halfway
> through the match, my body completely ran out of energy (poor
> eating that morning + nervousness = massive energy drain) and it
> was a cinch for him to finish me off with some extremely lame
> offence.

Suppose that each combatant has a Stamina score that has a range
from 1.0, when at maximum energy, to 0.0 when completely exhausted.
Suppose all-out aggression depletes Stamina at a rate of 1/20
attacks.  Each successful blow also reduces the opponent.  Suppose,
for simplicity, actions are permitted once per 3 seconds, to use the
number John Buehler suggested for a different game.  Then at most 20
blows land in a minute.  Let the average successful blow deal 1/10
of available Stamina.  Then, if exhausting the opponent had been the
victory condition, one is trying to successfully land 10 blows out
of 20 possible blows.  Obviously, to do this, one needs, on average,
a success rate over 1/2.

In such a system, optimal strategy is maximal efficiency.  For
pseudo code, using Buehler's lower-limit of 3 second period and
Brendan O'Brien's scale from 1 to 5:

  int aggression = 3; // Default level of aggression. Range [1, 5].
  int stamina = 60; // Default maximum so that 3/60 == 1/20.
  attack( mob * target, int aggression )
  // Precondition: attacker seconds is greater than or equal to system seconds.
  {
    this->stamina -= aggression;
    if ( this->stamina <= 0 )
      this->lose();
    target->stamina -= aggression * this->efficiency;
    if ( target->stamina <= 0 )
      target->lose();
    this->seconds += 3;
  }

Notice that only one score, Stamina, is used, and that an attack
reduces one's own Stamina as well as the enemy's.  The trick for
designing interesting gameplay from this premise, lies in the
function of efficiency.  For a straightforward, yet dull game, it
could be equivalent to the ratio of skill levels.  Factoring tuples
of attacker/defender stances posted by Paul Schwanz into would add a
lot of variety.

To factor diet and nervousness, as Matt Mihaly did, let each of
these increase the rate of exhaustion from swinging a blow, so that
the rate becomes k/20 attacks, where k is a coefficient of
cardiovascular and neurosomatic efficiency, that may be temporarily
reduced through diet and stress.  In the above pseudo code this
might be at (using "inefficiency" to mean 1/"efficiency"):

  this->stamina -= aggression * this->k_inefficiency;

This is not realistic or fun; it is just a simple model of the given
real-life example.  Given a model of mutual damage, an attack may
injure oneself, too.  In such a system, inefficient offense is
sufficient to lose, even if the opponent never attacks.  This
extreme case means, though, exhausting oneself more than injuring or
exhausting the defender.  This case is more extreme than the example
Matt provided.  So extreme it may conjure cartoon antics.

David
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list