Advertisement

Combat problem: Attack + Defend = Stalemate?

Started by August 13, 2003 04:24 PM
13 comments, last by R0B0T0 21 years, 5 months ago
Using a combat system that allows attacking and defending, and assuming you have two combatants of equal skill, how do you prevent the combat from becoming an endless stalemate? I need a way to allow this type of combat resolve more quickly. I guess I'm trying to get at what happens in a "real" fight, because I sure for example that medieval melee combat didn't take 30 exchanges of blows before someone was victorious. Is blocking harder than attacking? Does it happen less frequently? Or maybe it takes more time/energy than attacking? As it is, with the system I am currently using it takes forever to resolve a closely matched battle. Any thoughts would be appreciated. *EDIT* I didn't really want to get bogged down in the mechanics here, but since a few asked for details: Basically the system is turn-based and works via action points. There are 3 actions you can perform: Attack, Defend, and Recover. Since the action action points are finite each turn, you must decide on a balance between your actions; aggressive, defensive, or tactical. The trick is, based on a bunch of factors you have a randomly limited set of maneuvers (attacks/defence) at any given time. they are expended with use and you need to Recover to replenish them. Anyways, currently the attack and defence moves are provided at an roughly equal frequency, and if two players are balanced the attacks and defense usually end up cancelling each other out. [edited by - r0b0t0 on August 13, 2003 9:26:21 PM]
If two opponents are equally skilled, you can always count on pure dumb luck to screw one or the other over. It really depends on how you implement your battle system, but this sort of problem is exactly what random numbers are good for. You could, perhaps, use some sort of a a "Luck" attribute to skew in favor of one or the other.

In old D&D style games, there was always the possibility of rolling a "natural 20", which was an automatic hit regardless of respective THAC0/AC.

In a "real" fight (yah, I've been in a few, unfortunately) it's very rare that you'll ever see two opponents perfectly matched, so this situation rarely comes up much. And then, barring hideous luck on one side or the other, it can turn into a slugfest, in which they do as much damage as they can to each other until one quits. (A tae kwon do instructor of my acquaintance had a name for these guys: "Black and Blue Belts").

EDIT: Don't forget about stamina, either. Can play a HUGE part in any fight. Anyone who thinks a "real" fight is similar to Jackie Chan leaping and cavorting about for an hour and a half is seriously mistaken. A lot of fights end in under 5 minutes, because one guy is just too worn out to go on. So, you might consider a realistic simulation of stamina and fatigue in your game, as well. Equal matches become very much a battle of attrition that is resolved quickly.


Josh
vertexnormal AT linuxmail DOT org

Check out Golem at:
My cheapass website

[edited by - VertexNormal on August 13, 2003 7:22:49 PM]
Advertisement
well it depends on your combat system. Does attack = damage or chance to hit? is defense =damage resitence or chance to dodge.


If you do little or no damage to an opponet with each hit then your going to be chipping away at each other for hours.
There was an old snes game that used a bottleneck system. If your attack rating was below an opponets defense you did 1 or 2 damage if it was equal you did about 10 and if it was great your damage raised exponentailly.

-----------------------------------------------------
Writer, Programer, Cook, I''m a Jack of all Trades
Current Design project
Chaos Factor Design Document



Well, I''m not going to take into account that you could be making some fantasy type battle game, or else I would mention magic attacks as well.

But for hand to hand combat you seem to be saying attacking someone defending = 0 dmg. Which really isn''t true, wether your just defending or if your using a shield.

So many ideas running through my head. Ok lets say defense is a % of dmg you take. A normal attack would (based on a person''s stats say str dex .. ect.. whatever) cause 100dmg usually. Now defending will cause say the attack to only do 50 - 60 dmg.

Or you could get even more realistic, with some work. I was thinking for one of my games (active time battle - im thinking in rpg here) if you defend, like a shield in the real-world, you wouldn''t take any damage at all. However you would be pushed back / stunned alittle, so your turn to attack or make a move will be slowed. Say every 9 seconds your character gets to attack, he''s down to 4 but he choose defend and he was attacked. No damage taken but add say 4 more seconds to the current time for his turn to come.

Hell if you want to get totally realistic, if you do get hit you don''t just hurt for a second and lose some health. Your ass gets hit by a sword your gonna bleed, aka loose some health. So you could put a small posion affect to it, so your health gradually goes down, you can''t defend forever...


Mark A. Drake
OnSlaught Games
Mark Drake
Eh another idea is to place a limit to how many times you can block... Say you have some blockx variable set with a max of 3 times per battle.. Each time used subtracting 1 from its value.

And when you display the menu with the attack or defend option you could just set up an if statement with the variable != 0 --- show defend / attack, else attack

Mark A. Drake
OnSlaught Games
Mark Drake
(Close to) perfectly matched opponents aren't the same as "perfect" opponents. Even a well-trained knight would not have been a superhuman terminator style, killing machine. They would not have been able to attack and defend perfectly at the same time.

1. There would be a reasonable chance that your attack would not land how/where you wanted or you might miss altogether.
2. While focusing on attacking you would be less able to defend (70%/30% for example) and if focusing on defence less able to attack.
3. Armour luck - there would be a chance that a blow might hit a vulnerable area (joint or gap in armour).
4. Egg in a tin can - you might have armour on but the soft stuff inside can still suffer damage from a blow. When I was at school two guys had a "sword fight" with bits of wood. They didn't hit each other but when the two swords struck each other the vibration broke one guys arm. The same happens with a head if you hit a helmet (even if you don't cut through the helmet).
5. Stamina - if after the above you still have a long fight remember that armour and heavy weapons would cause a fighter to tire quite quickly.
6. Fatal slip/fatal strike. You could miss badly and embed your weapon in the mud (leaving you exposed and delaying your next attack). On the counter side you might land a lucky blow.
7. Time - you wouldn't simply process 1 attack and 1 defence for each fighter per turn as that isn't how a fight proceeds. Fighters have a plan and adjust it as the fight goes on.
i. They might seek to defend at first then when their enemy is tired batter them with rapid attacks (rope-a-dope).
ii. They might not attack but rather wait for an enemy to attack (thus exposing themselves to a fast counter attack).
iii. They might think they spot an attack and pre-empt it by making a quick attack of their own. Thus gaining the element of surprise (and greater chance of success).
iv. One might make several quick attacks, wait/rest/defend for a few minutes then repeat. The other might make more regular attacks - in this way they would be out of sync and so the chances of attacks/defences being successful would be changing dramatically all the time.

Dan Marchant
Obscure Productions
Game Development & Design consultant

[edited by - obscure on August 13, 2003 7:59:35 PM]

Dan Marchant - Business Development Consultant
www.obscure.co.uk
Advertisement
What about adding an option to evade? It would seem that to more accurately simulate a real fight, you would need to include this. Evasion is preferable to a block, takes less stamina and avoids any (or most) damage.

I don''t know what kind of fight we''re talking about, but for example, a comon misconception is that skilled swordsmen (and I''m not talking about rapiers or foils) mostly used their swords to block attacks. The movies would have you believe in showers of sparks and the like, followed by pristine blades =)

In any case, I think it''s a lack that few games, if any I can think of incorporate something so simple as ducking out of the way in hand-to-hand fights (though I can see how it would be hard to simulate, or create a good interface for, or for the user to control for that matter). Maybe a passive skill with good animation to simulate the character''s inherant instincts and reactions? Something that worked on it''s own, in tandem with whatever else the player was doing. I don''t know.

____________________________________________________
"Two wrongs do not make a right; it usually takes 3 or more."
Some mistakes are too much fun to only make once.
Never anger a dragon, for you are crunchy and you go well with brie.

Can you be clearer about what kind of game this system is for? You say there''s attack and defend, but is it a 2d fighting game, a real time RPG fight, a turn based RPG fight, etc?

In order to break a numerical stalemate (which is very possible in a computer game fight, especially with a simplistic system) you need to include a random modifier for each action of each actor.

So, you just need to come up with an equation that evaluates if a hit occurs and then how much damage is done based on the "fullness" of the hit (or just whether a hit occurs or not).




You could make an active battle system, more like an adventure game of sorts. Where you walk around and meet monsters or enemies or whoever on screen during real play time. You then control you character just like you would before using the controls to swing, defend, and move.

But most games like this say EverQuest for example, you can run around the side of an enemy and even though your not in front of him you still get damaged like a normal attack. You could change that by making say the sword graphic must hit the character2 graphic or no damage takes place, he avoided it.

So you could incorporate dodging into the controls and movement. Or even a button that makes the character bend over or jump to the side to avoid a swing.

But if its going to be done traditional RPG style then I''d either do like Ratheous suggested, have an option to evade, which would sometimes deflect an incomming attack. Or you could set up some variable for a 1 - 50 say chance, and have that work as a percentage of the time his/her character evades. I''d say neither is harder to do, but one would be calculated every attack and one would only calculate if you choose to concentrate on evading.
Mark A. Drake
OnSlaught Games
Mark Drake
Thanks for the feedback, just added the following to my post:

Basically the system is turn-based and works via action points. There are 3 actions you can perform: Attack, Defend, and Recover. Since the action action points are finite each turn, you must decide on a balance between your actions; aggressive, defensive, or tactical.

The trick is, based on a bunch of factors you have a randomly limited set of maneuvers (attacks/defence) at any given time. they are expended with use and you need to Recover to replenish them.

Anyways, currently the attack and defence moves are provided at an roughly equal frequency, and if two players are balanced the attacks and defense usually end up cancelling each other out.

This topic is closed to new replies.

Advertisement