Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Damage reduction, armor and weapon types

Discussion in 'Game Design' started by Kondor0, Oct 21, 2014.

  1. Kondor0

    Kondor0

    Joined:
    Feb 20, 2010
    Posts:
    602
    Hi

    I would like to know how the people here manages damage reduction and armor vs a specific type of weapon/damage (the game I'm making is about spaceships but I imagine these rules could be generic enough to use in several types of games). And what's your preference as a gamer.

    For example, should the armor reduce the damage of a "normal weapon" by a percentage? block it completely according to a dice roll?

    Should a "piercing" weapon just ignore completely the armor of the target?

    Is it welcome to use RNG for this calculations or should they be fixed numbers? (for example, armor = 1 => dmg reduction of 10%).
     
  2. RJ-MacReady

    RJ-MacReady

    Joined:
    Jun 14, 2013
    Posts:
    1,718
    Considered in the broader sense, you want the player to feel as though he's more powerful with armor, better weapons, etc. You don't want, for example, armor to seem not worth getting or to be so powerful that it's all you need.

    An attack may bypass defense, but it would render defense pointless and you'd have to be cautious there. You'd need to give it a major drawback, like having a long cooldown or being consumable.

    One thing that always frustrated me was MMORPG's handling of defense. Defense is good, but ultimately evasion is better. So, accuracy + evasion > defense + attack power. In real life, that's stupid.

    I would say, avoid anything where someone would scratch their head or say "hm, that's dumb".

    Also, why bother with ratios at all?

    Why not just add hit points for the armor? I don't think your ship is leveling up and getting more muscular underneath, so a flat "armor = hp" might make sense here.
     
  3. AndrewGrayGames

    AndrewGrayGames

    Joined:
    Nov 19, 2009
    Posts:
    3,821
    You're asking the wrong question. The correct question is, 'how long should it take for the player to defeat this enemy?'

    We determine this with math. At the most basic form, the 'Time to Defeat' for a given entity reads like this:

    TTD(target) = HP(target) / DPS(attacker)

    ...and, as the acronym DPS stands for:

    DPS(entity) = Damage(entity) / AttackFrequency(entity)

    ...thus, the 'raw' form of the equation is:

    TTDt = HPt / (Da / AFa)

    ...Where t = target, a = attacker, HP = hit points, D = damage, AF = attack frequency, and TTD is time to defeat.

    The reason we add an 'armor' stat is to extend the time it takes to defeat an enemy, for tuning purposes. This can be implemented as a coefficient or as a constant, depending on your game system. Conversely, we would add armor penetration to defeat this (or, to speed up the Time to Defeat.)

    At this point, to best advise you, we need to know more: how have you designed armor interaction to work? Is it a coefficient or an additive value? More importantly, why have you designed armor that way? And, do you realy need an armor penetration stat? You may be able to use a simpler equation with better-tuned values.
     
    Whippets, RJ-MacReady and calmcarrots like this.
  4. BeefSupreme

    BeefSupreme

    Joined:
    Aug 11, 2014
    Posts:
    279
    RNG is OK as long as you tell the player what's up, like "25% chance to absorb laser damage", otherwise it feels inconsistent.

    Edit: a simple damage multiplier gives you the advantage of being able to give enemies strengths and weaknesses, which forces the player to change up their strategy.
     
    Last edited: Oct 22, 2014
  5. Kondor0

    Kondor0

    Joined:
    Feb 20, 2010
    Posts:
    602
    I don't have armor, I'm just adding more HP to the bigger ships. I made this thread to see if there was a better solution involving different types of damage vs different types of targets.
     
  6. BeefSupreme

    BeefSupreme

    Joined:
    Aug 11, 2014
    Posts:
    279
    This is true if armor is to be used as extraneous hit points, but there are also gameplay advantages to incorporating different damage types.
     
  7. RJ-MacReady

    RJ-MacReady

    Joined:
    Jun 14, 2013
    Posts:
    1,718
    I have to agree, in one game I played there were objects with 99 DEF. This reduced damage to 1 for everyone, so that it would take 10 hits to harvest items from the object. It made more sense to do it unarmed, since unarmed attack speed was faster. This simulated digging it up.
     
  8. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,234
    Tells you where my head is when my first thought is: "are we talking about historically accurate and/or hard/speculative sci-fi?" Otherwise the answer is whatever makes your numbers work.

    If you do want to go down a rabbit hole, you could totally get into a ship's hull's impact tolerance/shear strength/heat thresholds.
     
  9. BeefSupreme

    BeefSupreme

    Joined:
    Aug 11, 2014
    Posts:
    279
    This is a really cool example, and something I wouldn't have thought of.

    I think that different damage types can add a number of good improvements to a game. These improvements can also be gained through things like flight patterns and AI, but as game developers we should use every trick in the book, no?

    1) Variety - The player must alter their weapon loadout and tactics depending on the enemy they face.
    2) Personality - The player must remember enemy / weapon matches, so each enemy type is more complex than if the player was just blasting through everything.
    3) Accomplishment - The player feels skilled when they are able to defeat opponents in an efficient manner. It's like a mini game. Of death.
     
  10. BeefSupreme

    BeefSupreme

    Joined:
    Aug 11, 2014
    Posts:
    279
    That's awesome. I have a number of RPG designs that never got off the ground (because making a complete RPG system that's not a rehash of D&D and works on the computer is a crap ton of work) that all started with a very complex damage system. Wound points and effects, degenerating armor, severed limbs, and all sorts of crunchy goodness.

    One problem I ran into is that sometimes a more complex system ends up feeling very similar to a less complex system, just with tons more work. What do you think?
     
  11. RJ-MacReady

    RJ-MacReady

    Joined:
    Jun 14, 2013
    Posts:
    1,718
    D&D stats caught on. It's shaped how we think about RPGs and it's really just the way things are.

    On the one hand, you can build whatever system you like. On the other, it may not be obvious to a person playing what is going on. If you can't communicate something quickly and effectively to the player, you're not doing your job very well.

    So, I can imagine a system where everything is altered by fatigue, my character exercises and then gains strength after resting, etc. Great. The player thinks exercise points (exp) means experience. The player is right. What they expect, that's what you're supposed to give them.

    It's like they understand a certain form of communication (language) that strength is good, red means low health, armor lets them take more damage without dying... You design the game in their native language.
     
    Last edited: Oct 23, 2014
    AndrewGrayGames likes this.
  12. AndrewGrayGames

    AndrewGrayGames

    Joined:
    Nov 19, 2009
    Posts:
    3,821
    The basic version does apply if equipping some armor gives flat HP.

    For an actual defense stat, I see the equation becoming something like this:

    Armor as a multiplier:
    TTDe = HPe / ((Da / AFa) x (Ae /OAe)
    Constraint: Ae <= OAe

    Armor as an additive modifier:
    TTDe = HPe / ((Da - Ae) / AFa)
    Constraint: Ae <= Floor(Da)

    Where A = Armor, OA = Optimal Armor (Armor rating necessary for 100% mitigation)

    The reason I see the system like this, is the actual mitigation of armor only makes sense to me if you know how much armor it takes to mitigate all damage; anything less allows at least some damage through. The relative difference between your actual armor and the optimal armor at a given point determines the magnitude of how vulnerable you are.

    That said, I'm more than willing to bet that's not how the actual calculation goes down, much of the time. How far off am I in my thoughts on how coefficient armor calculations work vs. additive calculations?

    The next thing I'm petitioning for on General is LaTEX support, so that mathematics can be properly written without looking like I'm trying to imitate the Zombie President from Final Fantasy VIII.
     
  13. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,234
    There do seem to be more games experimenting with this at least. I know Rimworld added localized damage like this recently as part of a health overhaul. It's still using HP in a sense, essentially like the amount of blood in the system I guess.

    I've been kind of interested in something like this for mechs, where it makes sense to have a ton of customization across a large number of systems that are all feeding off each other. It should, in theory, offer interesting opportunities for different playstyles if done well. Just think FTL with bipedal tanks.

    Human cases I can see being pretty unrewarding past a point, especially when any state of not dead is unwanted for any enemy.
     
  14. BeefSupreme

    BeefSupreme

    Joined:
    Aug 11, 2014
    Posts:
    279
    But I don't wanna roll Thac0 and Warhammer is cool!
     
  15. BeefSupreme

    BeefSupreme

    Joined:
    Aug 11, 2014
    Posts:
    279
    One problem I've had with locational damage is that taking out a smaller part can render the whole system destroyed. It's realistic I guess, but I used to run around with 4 ERPPCs and just blow mechs legs off and it got kind of boring.
     
  16. RJ-MacReady

    RJ-MacReady

    Joined:
    Jun 14, 2013
    Posts:
    1,718
    I can't understand your formulas.
     
  17. RJ-MacReady

    RJ-MacReady

    Joined:
    Jun 14, 2013
    Posts:
    1,718
    Realistic Game Mechanics != Good Game Mechanics
     
  18. BeefSupreme

    BeefSupreme

    Joined:
    Aug 11, 2014
    Posts:
    279
    I think your math is pretty good, it's just that different damage types lead to a different 'Time to Defeat' depending on what the player has equipped.

    edit: yes, it took me 28 minutes to do some math
     
  19. BeefSupreme

    BeefSupreme

    Joined:
    Aug 11, 2014
    Posts:
    279
    Would make a good book chapter.
     
    AndrewGrayGames and RJ-MacReady like this.
  20. RJ-MacReady

    RJ-MacReady

    Joined:
    Jun 14, 2013
    Posts:
    1,718
    I always like to play with different concepts, here, never do I get formulaic or simple. I think of Lead (Pb) it's dense but has a low melting point. It will stop bullets cold, but heat based weapons would do great. A turtle with a thick shell would be resistant to edged damage, but vulnerable to blunt or piercing damage.

    There's just a lot that you could do. Pokemon is a wonderful example of an entire game built around this topic.
     
    AndrewGrayGames and BeefSupreme like this.