Archived

This topic is now archived and is closed to further replies.

R0B0T0

Combat problem: Attack + Defend = Stalemate?

Recommended Posts

R0B0T0    122
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]

Share this post


Link to post
Share on other sites
JTippetts    12950
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]

Share this post


Link to post
Share on other sites
TechnoGoth    2937
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

Share this post


Link to post
Share on other sites
markadrake    104
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...

Share this post


Link to post
Share on other sites
markadrake    104
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

Share this post


Link to post
Share on other sites
Obscure    175
(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]

Share this post


Link to post
Share on other sites
Ratheous    122
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.

Share this post


Link to post
Share on other sites
Penance    190
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).

Share this post


Link to post
Share on other sites
markadrake    104
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.

Share this post


Link to post
Share on other sites
R0B0T0    122
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.

Share this post


Link to post
Share on other sites
markadrake    104
quote:

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.

Well if the current problem, what your trying to solve, is preventing someone from continually attacking and someone else always blocking, and if blocking doesn't cause any damage or so low of a dmg that it will take minutes to battle..

Let me get something straight first you said all actions will cost, drain from your action points. And after you use them you have to use the recover option (takes a turn) to recover your points.

Well then I say you make defending cost more points than attacking. Though you may have different types of attacks/moves available, make defending cost alot, so its in there best strategy not to continue wasting action points. Plus if recover takes up a turn - then they aren't blocking which gives a chance for the other player to get in a good attack.


::EDIT::
I was thinking though, whats the real point to blocking if you do this though? Cause if you are low on health, and you block, ok thats cool no damage but ultimatly the other player will land a blow....

Just fyi in my rpg games I'm going to take an idea from Legend of Dragoon (playstation title), when you defend, not only does it half the damage but it also regains 10% of your max health. Though I may use 7% as the magical number here, now there's a REASON to defend. And forces the other player to re-think his strategy of doing simple attacks.

[edited by - markadrake on August 13, 2003 10:22:48 PM]

Share this post


Link to post
Share on other sites
Inmate2993    222
I remember watching the History Channel''s show Conquest and Peter Wormwood narrated a recreation of a 18th century france duel, done with Foils... and some kind of shield I think. The actual fight was pretty much even matched, so one of the fighters learned the strategy of a perfect defense. The result was that the fight last several hours, until the other fighter had slipped up, and the first took the opportunity to poke a hole in his leg. The second was so humiliated that he choose to bleed to death rather then accept defeat.

In an evenly matched fight, the only way out is a Hail Mary, so I suggest the following: randomize the damage a bit, yes, but also include possibility of the critical hit. You could do it randomly, like 1 in every 32, but to have it as a strategic element, give both meters that govern the critical hit, so that the "better" strategy is rewarded. Then you just have to figure out if the attacker should have the advantage, or if the defender should.

Share this post


Link to post
Share on other sites
R0B0T0    122
Thanks for the suggestions. The goal is to give players the ability to defend attacks while at the same time having the combat progress towards its conclusion each turn.

Here is a list of what I think my options are:

1) Have the option to defend show up less frequently than the option to attack. (same cost as attack and cancels out equivalent attack)

2) Make defending more expensive than attacking (available with the same frequency as attack and cancels out equivalent attack)

3) Defending only prevents partial damage from an attack (same cost as attack and available with the same frequency)

4) Keep everything equal, but allow for luck to eventually give someone that opportunity for a critical hit

Which would work best in terms of gameplay? If #1, how less often should you be able to defend than attack?

[edited by - r0b0t0 on August 14, 2003 11:39:15 AM]

Share this post


Link to post
Share on other sites
markadrake    104
quote:
Which would work best in terms of gameplay? If #1, how less often should you be able to defend than attack?


I''d personally go with partial damage... Say 50% of the total damage isn''t taken if your defending.

If you go with #1, I''d say just set a limit to how many times it can be used per player per battle. Have a defend count set at the number of times you want it to be available, and when they choose it have a defend--; Once defend = 0 its no longer an available option.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
quote:
Original post by R0B0T0
2) Make defending more expensive than attacking (available with the same frequency as attack and cancels out equivalent attack)

<SPAN CLASS=editedby>[edited by - r0b0t0 on August 14, 2003 11:39:15 AM]</SPAN>



its take more stamina to attack .... at least when im boxing its hevyer to attack all the time....

Share this post


Link to post
Share on other sites