1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Melee Combat Physics Design!

  1. May 3, 2012 #1
    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.
  2. jcsd
  3. May 3, 2012 #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.
  4. May 3, 2012 #3
    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,
  5. May 3, 2012 #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:

    Doesn't it do the same when it decelerates too?
  6. May 3, 2012 #5
    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.
  7. May 3, 2012 #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]). 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
    [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.

    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: May 3, 2012
  8. May 3, 2012 #7
    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.
  9. May 3, 2012 #8
    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.
  10. May 3, 2012 #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.
    Last edited: May 3, 2012
  11. May 3, 2012 #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.
  12. May 3, 2012 #11
    Ok, I think I've finally cracked it. I have to credit it to this:

    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: May 4, 2012
  13. May 6, 2012 #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.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook