How can I accurately calculate damage in melee combat using physics principles?

In summary, the conversation revolves around a person's frustration with conventional role-playing game attributes and their attempt to create a more realistic combat system. They are seeking help with the calculations involved in determining damage dealt to an enemy before factoring in armor. The conversation also touches on the difference between potential and kinetic energy and how they are related to acceleration and deceleration. The speakers mention games like Mount and Blade and suggest using game engines like those used in FPS games for more advanced physics calculations. The conversation also delves into the concept of inertia and forces in mechanical equilibrium.
  • #1
Stradigos
9
0
Hello everyone, first post :shy:

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.
 
Physics news on Phys.org
  • #2
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.
 
  • #3
I can't 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,
 
  • #4
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 :smile:

When an object is forced to accelerate, it releases kinetic energy.

Doesn't it do the same when it decelerates too?
 
  • #5
AbsoluteZer0 said:
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.
 
  • #6
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 ([itex]\rightarrow[/itex]) and friction can be represented by the backwards vector ([itex]\leftarrow[/itex]). Let's 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
[itex]\rightarrow[/itex][itex]\leftarrow[/itex] = 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.

DragonPetter said:
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.
 
Last edited:
  • #7
AbsoluteZer0 said:
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 ([itex]\rightarrow[/itex]) and friction can be represented by the backwards vector ([itex]\leftarrow[/itex]). Let's 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
[itex]\rightarrow[/itex][itex]\leftarrow[/itex] = 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.
 
  • #8
DragonPetter said:
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.
 
  • #9
This was really interesting to me... still trying to convert this over to some sort of math, but take a look:

Hammer as a force amplifier

A hammer is basically a force amplifier that works by converting mechanical work into kinetic energy and back.

In the swing that precedes each blow, a certain amount of kinetic energy gets stored in the hammer's head, equal to the length D of the swing times the force f produced by the muscles of the arm and by gravity. When the hammer strikes, the head gets stopped by an opposite force coming from the target; which is equal and opposite to the force applied by the head to the target. If the target is a hard and heavy object, or if it is resting on some sort of anvil, the head can travel only a very short distance d before stopping. Since the stopping force F times that distance must be equal to the head's kinetic energy, it follows that F will be much greater than the original driving force f — roughly, by a factor D/d. In this way, great strength is not needed to produce a force strong enough to bend steel, or crack the hardest stone.

Effect of the head's mass

The amount of energy delivered to the target by the hammer-blow is equivalent to one half the mass of the head times the square of the head's speed at the time of impact (E={mv^2 \over 2}). While the energy delivered to the target increases linearly with mass, it increases geometrically with the speed (see the effect of the handle, below). High tech titanium heads are lighter and allow for longer handles, thus increasing velocity and delivering more energy with less arm fatigue than that of a steel head hammer of the same weight. As hammers must be used in many circumstances, where the position of the person using them cannot be taken for granted, trade-offs are made for the sake of practicality. In areas where one has plenty of room, a long handle with a heavy head (like a sledge hammer) can deliver the maximum amount of energy to the target. It is not practical to use such a large hammer for all tasks, however, and thus the overall design has been modified repeatedly to achieve the optimum utility in a wide variety of situations.

Effect of the handle

The handle of the hammer helps in several ways. It keeps the user's hands away from the point of impact. It provides a broad area that is better-suited for gripping by the hand. Most importantly, it allows the user to maximize the speed of the head on each blow. The primary constraint on additional handle length is the lack of space in which to swing the hammer. This is why sledge hammers, largely used in open spaces, can have handles that are much longer than a standard carpenter's hammer. The second most important constraint is more subtle. Even without considering the effects of fatigue, the longer the handle, the harder it is to guide the head of the hammer to its target at full speed. Most designs are a compromise between practicality and energy efficiency. Too long a handle: the hammer is inefficient because it delivers force to the wrong place, off-target. Too short a handle: the hammer is inefficient because it doesn't deliver enough force, requiring more blows to complete a given task. Recently, modifications have also been made with respect to the effect of the hammer on the user. A titanium head has about 3% recoil and can result in greater efficiency and less fatigue when compared to a steel head with about 27% recoil. Handles made of shock-absorbing materials or varying angles attempt to make it easier for the user to continue to wield this age-old device, even as nail guns and other powered drivers encroach on its traditional field of use.

Effect of gravity

Gravity will exert a force on the hammer head. If hammering downwards gravity will increase the acceleration during the hammer stroke and increase the energy delivered with each blow. If hammering upwards gravity will reduce the acceleration during the hammer stroke and therefore reduce the energy delivered with each blow. Some hammering methods rely entirely on gravity for acceleration on the down stroke.

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.
 
Last edited:
  • #10
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 = [itex]\frac{f}{a}[/itex] where p is pressure, F is force, and A is surface area.
 
  • #11
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!
 
Last edited:
  • #12
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.
 

1. What are the key factors to consider when designing melee combat physics?

The key factors to consider when designing melee combat physics are the weight and size of the weapons, the range and speed of attacks, and the impact of collisions between weapons and characters. These factors greatly affect the overall feel and realism of the combat.

2. How can you ensure that melee combat physics are realistic?

To ensure realistic melee combat physics, it is important to take into account the laws of physics such as momentum, force, and velocity. Implementing these principles accurately will result in more believable and immersive combat.

3. What role does player input play in melee combat physics design?

Player input is crucial in melee combat physics design. The game engine must accurately translate the player's actions into in-game movements, such as swinging a weapon or initiating a dodge. This requires precise and responsive controls to make the combat feel fluid and intuitive.

4. How can you balance gameplay and realism in melee combat physics design?

Balancing gameplay and realism in melee combat physics design can be challenging. It is important to find a balance between fun and realistic combat, as overly realistic physics may not always result in the most enjoyable gameplay experience. This can be achieved through playtesting and fine-tuning the physics to create a satisfying balance.

5. How do environmental factors affect melee combat physics?

Environmental factors such as terrain, obstacles, and weather can greatly impact melee combat physics. For example, fighting on a slippery surface may affect the character's movement and attacks, while obstacles can provide cover or create unique opportunities for combat strategies. Careful consideration of these factors can enhance the realism and complexity of melee combat physics design.

Similar threads

  • Classical Physics
2
Replies
61
Views
1K
Replies
2
Views
50
  • Other Physics Topics
Replies
13
Views
2K
Replies
13
Views
1K
Replies
13
Views
1K
  • Other Physics Topics
Replies
4
Views
2K
Replies
10
Views
790
Replies
8
Views
1K
  • General Engineering
Replies
11
Views
2K
  • Sci-Fi Writing and World Building
3
Replies
102
Views
12K
Back
Top