# Melee Combat Physics Design!

Tags: impact, kinetic energy, mass, momentum
 P: 9 Hello everyone, first post Long story short, I'm sick of conventional role playing game attributes and the math used in combat and am trying to create my own set to make combat more realistic. I realize that the stats are over simplified just to keep it simple for the player (and the CPU calculations low), but this is more of a concept I'm working on more than anything else. I hope to eventually turn this into a short combat tech demo using Unity. I'm turning to you guys because I'm having a hard time wrapping my brain around a few things, and since my physics attribute isn't that strong (lol). Goal: To calculate Damage dealt to target enemy BEFORE enemy Armor is evaluated. The problem My first problem is with grabbing the components I need to solve this… Let’s say we have a .997 kg Sword. Let’s say the area of the sword that hits the target is 6.1 cm (1 mm edge x 6 cm long). I think I’ve found a way to calculate player strength. Kinetic energy is energy needed to accelerate a body. The formula for kinetic energy is .5mv^2. If I want to swing my sword and have it reach my target in .3 seconds, I need to be moving 3.333 m/s^2. However, to move the mass that fast, I’ll need .5(.997)(3.333) = 1.66 Joules of energy. Right? Does that make sense? Also, is that the energy then of the impact? I don’t think it is… I think that’s just the energy required to move the sword. So I’m figuring that I’ll take the momentum then? .997 x 3.333 = 3.323 kg m/s… however, I’m not 100% sure that’s what I’m looking for either. And then to complicate things further, I think I want to take into account the surface area of the weapon and what that does to the damage.
 P: 834 Hey, I love RPGs and game design. Unfortunately, I don't have time to try to contribute to your thread right now. Have you considered some of the game engines used in FPS games? They're pretty advanced and can use graphics card hardware to do a lot of physics calculations . . I'm not sure what the directx or other API provides for access to that hardware in a game engine environment. Are the modern FPS combat systems closer to how you would like the combat system to work, if not exactly? Have you played the game mount and blade? It has more realistic physics than the average RPG.
 P: 126 I cant help you with the calculations because i'm also a bit new in physics, but there is one thing that I want to point out. There are many types of energy, but the most well known are Kinetic and Potential. Potential energy is energy that is stored and not in use. "Kinetic energy is energy needed to accelerate a body" Kinetic energy is not necessarily the energy required to put a body into motion, or cause it to accelerate. Acceleration is the result of a force. There are two formulas for finding acceleration: a = Δv/t (where Δv is change in velocity and t is time) and a = f/m (where f is the net force on an object and m is the mass of an object.) The second is the most relevant to this case, as it deals with force and mass. When an object is forced to accelerate, it releases kinetic energy. An example of this would be fuel in a car. Fuel is a source of potential energy. When you turn the car on and accelerate, the fuel is converted into kinetic energy. I hope this helps in some way,
P: 9

## Melee Combat Physics Design!

I've looked around at some examples of attribute calculations, but for the most part, how I'm planning on calculating things is somewhat unique. If it's not, then the formula's are well hidden or undocumented.

Thanks for the tip on Mount and Blade, I'll look that up later! From what I saw briefly, they are doing blunt, pierce, and slash damage too

 When an object is forced to accelerate, it releases kinetic energy.
Doesn't it do the same when it decelerates too?
P: 834
 Quote by AbsoluteZer0 When an object is forced to accelerate, it releases kinetic energy. An example of this would be fuel in a car. Fuel is a source of potential energy. When you turn the car on and accelerate, the fuel is converted into kinetic energy.
I don't think release is the correct word to use. It is not necessarily losing kinetic energy when it accelerates. If the acceleration is positive, the object is gaining kinetic energy rather than releasing it.
P: 126
Doesn't it do the same when it decelerates too?

Yes. It has to do with the concept of Inertia. Newton's First Law of Motion states that Inertia is the tendency of a body to resist changes in it's state of motion. Simply put, an object at rest will stay at rest and an object in motion will stay in motion, unless acted on by an unbalanced force. When a body is in motion, it's natural tendency is to stay in motion. Friction, however, prevents it from doing so. In the presence of friction, a body will convert potential energy into kinetic energy to try resist the force of friction. (Friction is the unbalanced force in this case.)

If you don't know what I mean by balanced and unbalanced: forces are balanced when the sum of those forces is equal to zero. This is referred to as mechanical equilibrium. A body is in mechanical equilibrium ONLY when the sum of forces is equal to zero. In equation form, this is ƩF = 0

This does not mean that it has to be in a state of rest. Objects can also be in equilibrium when they are in motion. When the force of acceleration is equal to the counteracting force of friction, it is in equilibrium because at that point it won't be accelerating anymore. To illustrate this, here is an example:

Acceleration can be represented by the forward vector ($\rightarrow$) and friction can be represented by the backwards vector ($\leftarrow$). Lets assume that an object is accelerating at 20 m/s. Friction will counteract that acceleration in the opposite direction, and the accelerating body will release kinetic energy to resist that opposite force. Eventually, the force of friction will equal the acceleration of the body and it will cancel out to be zero (acceleration as +20 and friction as -20.)

20 -20
$\rightarrow$$\leftarrow$ = 0

For this example, even if ƩF = 0 Kinetic energy is still being formed as friction is still counteracting the acceleration.

This is straying a bit too far, but it is important to know these concepts for acceleration and kinetic energy.

 Quote by DragonPetter I don't think release is the correct word to use. It is not necessarily losing kinetic energy when it accelerates. If the acceleration is positive, the object is gaining kinetic energy rather than releasing it.
I used release in the sense that the potential energy is being converted into kinetic energy. What I mean is that the potential energy is losing its 'potential'. I agree though, release was definitely not the word I should have used.

I also agree with you about it gaining kinetic energy, since an object at rest has no kinetic energy until it is in motion.
P: 834
 Quote by AbsoluteZer0 Yes. It has to do with the concept of Inertia. Newton's First Law of Motion states that Inertia is the tendency of a body to resist changes in it's state of motion. Simply put, an object at rest will stay at rest and an object in motion will stay in motion, unless acted on by an unbalanced force. When a body is in motion, it's natural tendency is to stay in motion. Friction, however, prevents it from doing so. In the presence of friction, a body will release kinetic energy to try resist the force of friction. (Friction is the unbalanced force in this case.) If you don't know what I mean by balanced and unbalanced: forces are balanced when the sum of those forces is equal to zero. This is referred to as mechanical equilibrium. A body is in mechanical equilibrium ONLY when the sum of forces is equal to zero. In equation form, this is ƩF = 0 This does not mean that it has to be in a state of rest. Objects can also be in equilibrium when they are in motion. When the force of acceleration is equal to the counteracting force of friction, it is in equilibrium because at that point it won't be accelerating anymore. To illustrate this, here is an example: Acceleration can be represented by the forward vector ($\rightarrow$) and friction can be represented by the backwards vector ($\leftarrow$). Lets assume that an object is accelerating at 20 m/s. Friction will counteract that acceleration in the opposite direction, and the accelerating body will release kinetic energy to resist that opposite force. Eventually, the force of friction will equal the acceleration of the body and it will cancel out to be zero (acceleration as +20 and friction as -20.) 20 -20 $\rightarrow$$\leftarrow$ = 0 For this example, even if ƩF = 0 Kinetic energy is still being released as friction is still counteracting the acceleration. This is straying a bit too far, but it is important to know these concepts for acceleration and kinetic energy.
I like the perspective you are considering it from, I have not thought about it in that way before. However, I would argue that it is not accelerating (in the positive direction) if it is releasing kinetic energy to oppose friction, because a release (decrease) of kinetic energy implies that it's velocity is decreasing over time (if its mass is constant) such that it is decelerating.
P: 126
 Quote by DragonPetter I like the perspective you are considering it from, I have not thought about it in that way before. However, I would argue that it is not accelerating (in the positive direction) if it is releasing kinetic energy to oppose friction, because a release (decrease) of kinetic energy implies that it's velocity is decreasing over time (if its mass is constant) such that it is decelerating.
I see what you mean, and I agree. Thanks for the tips, I learned a bit myself.
Debating physics is interesting, you always learn something new.
P: 9
This was really interesting to me... still trying to convert this over to some sort of math, but take a look:

Wow, seriously? Can't include a link until ten posts? Fine, I can get around this...

en.wikipedia .org /wiki/Hammer

EDIT: I feel like the kinetic energy described in the first paragraph is incomplete.

Energy = (Length of Swing)(Str + Gravity)?

So does that result then act as a multiplier for the hammer's head? E = (mv^2)/2? I'm led to believe so since the title says it's a force multiplier...

((Length of Swing + length of hammer)(.5mv + Gravity) * ((mv^2)/2)

((.72m + .06m)(1.199 joules + -9.8 m/s^2)) * ((.977 * 3.333 m/s^2)/2) =

.78m * -8.601?? * .977 * 1.628 = -10.670??

Just shooting in the dark here... bah.
 P: 126 I found the article to be a bit confusing, i'll have to print it out and read/highlight it before I can comment on the rest. When it comes to the first paragraph, it actually said that it is a force amplifier rather than a multiplier. Because the hammer has a lot more mass concentrated in a smaller area, it is able to produce a greater impact as the pressure exerted by the hammer is much greater than that of your hand on the same point. That is what it means by an amplifier. It uses the energy transferred from your hand/arm to produce a greater impact than that of your hand alone. The writer of the article should have mentioned a bit more about pressure in that first paragraph. The general formula for pressure is p = $\frac{f}{a}$ where p is pressure, F is force, and A is surface area.
P: 9
Ok, I think I've finally cracked it. I have to credit it to this:

 It's not Momentum that counts, it's Kinetic energy (1/2*M*V*V) and efficiency (or lack thereof) of energy transfer to the target. And, the mass that counts is not YOUR mass, it's the effective mass of the weapon being delivered unto the target. The reason A larger (stronger) person can deliver a bigger wallop is that he can usually get the mass of the weapon up to a higher velocity quicker (assuming similar reach and technique). If a strong/heavy person and a weak/small person have the same weapon (all other geometries being equal) moving at the same speed, the effect of higher strength or personal mass at the moment of impact is negligable. However, after the impact, the strong person can still put more energy into the stroke, follow through better and their stronger grip probably assists in maintaining control of the stroke. The reason the sword bounced off the tree is that it strikes with no control, not that there is less energy in it. The blade makes initial contact with the tree at an angle not precisely 90 degrees and has no way of not rotating about it's axis (twisting), so much the energy you would prefer to go into a cut is lost to the flat of the blade slapping against the tree.
netsword. com/ubb/Forum1/HTML/001775.html (sorry, can't post links yet apparently)

So basically, with that said, I came up with this equation:

a = v/t

Force = ma

Ek = ((ma)^2)/2m
Ek = ((m(v/t))^2)/(2m)

((.997 kg (3.33 m/s / .3 s)^2)/(2(.997 kg)) = 61.901 Joules

Doubling the the momentum quadruples the energy.

Now on to the efficiency of the hit and damage reduction!
 P: 9 I want to make a correction to this. I think it should be 5.537 Joules. Not sure where I read Ek = ma^2 over 2m, but I think I got confused when I saw p^2 over 2m... anyways, it should really just be as simple as Ek = .5(mass)(velocity). In this case, .5(.997)(3.333)^2 = 5.537 J. For anyone in the future, you can check out my other thread where I figure out what to do about armor.

 Related Discussions General Discussion 2 Fun, Photos & Games 6 Current Events 34 Current Events 38