A Damage Calculation Function for your game!

Поділитися
Вставка
  • Опубліковано 12 січ 2025

КОМЕНТАРІ • 13

  • @BoomSqueak
    @BoomSqueak 4 місяці тому +2

    Great video! One potential downside to this formula is that total damage is capped at the default damage no matter what the attack stat is (assuming defense is not negative). My intuition to fix this would be to multiply base damage by attack / defense. Of course, this all depends on how we want these values and stats to work.

    • @paulmag91
      @paulmag91 4 місяці тому +2

      attack / defense will scale wildly when defense is small, and will be undefined if defense=0. Maybe rather attack skill and damage should be considered two different stats. Attack skill is your character's ability to overcome the opponent's defenses, and then you have a base_damage determined by f.ex. you character's strength and the weapon they are using. This way increasing your damage is always good, but the importance of increasing your attack skill depends on what kind of enemies you are facing, so it might become a strategic choice. If facing big, but slow, enemies with no protection it is trivial to hit them, so this could make sense.

    • @Tordek
      @Tordek 4 місяці тому +1

      Just add some constant that you find fair: base_damage * (k+attack/(attack+defense))
      if you make k 0.5 it means an equal attack and defense leave you at the base damage, and you can never deal anything below half your weapon damage. You can tweak that a bit to 0.2 or 0.3 probably.

  • @ganondorf2419
    @ganondorf2419 4 місяці тому +1

    This gives me a lot of ideas that could revamp my game balance. I started off with low numbers, so flat defense reductions was fine. 1 DEF enemies were serious stuff, lol. Player buff skills were the main issue, and my current solution was to just give certain enemies countermeasures against buff spamming. It didn't occur to me to change the damage formula till now!

  • @HenryDay-n8x
    @HenryDay-n8x 4 місяці тому +3

    dude this is bomb

  • @ianc.2012
    @ianc.2012 4 місяці тому

    Phenomenal video. Thank you!

  • @Cvrchak88
    @Cvrchak88 4 місяці тому

    Simple and effective! Love it! Can you make a video about random range of damage?

  • @amonra8764
    @amonra8764 4 місяці тому

    Good job 👍

  • @thesomeone2nd
    @thesomeone2nd 4 місяці тому

    Sure pretty cool!

  • @castratikrongrzan
    @castratikrongrzan 4 місяці тому

    what happens if defense is equal to negative attack? attack = 5, defense = -5

    • @queblegamedevelopment4143
      @queblegamedevelopment4143  4 місяці тому

      If that's the case, it'll try dividing the attack by 0 in the last part, but since you usually wouldn't have negative defense, I think that's fine :)