Before the defense of any actor was not taking into consideration when dealing damage. All attacks did full damage to attacked actor. While this is fine if we didn't have a defense stats, we do have it and we want it to have a purpose. Now the problem came in the form of how do we tie the stat into the calculations for dealing damage. There are so many opinions on what is the best way to do this, and I spent a long time looking over and trying different methods to ensure we had the right balance we wanted for our game.
After trying about 5 or so different methods for combing defense with damage I finally found one I think provides the best balance. I tested each method thoroughly to ensure it felt the best. There was one that I was leaning towards, it's called the Sigmoid approach, I just had a feeling it would fit the best, so I spent a bit longer working with it. In the end thought, it doesn't even mattterrrrrrrrrr, it just wasn't the right fit for our game. It just didn't wanna work right with how we set up our stats and the math kept giving errors. I ended up going with a percentage reduction approach, so the way this one works is, if the actors defense is 0 you do 100% damage, if their defense is higher then your strength it reduces it on a bit of a slower curve, now I did adjust it so that no matter what you will always do/take at least one point of damage.
**Showing current str stat
**Enemy starts with 100HP this is one swing with 25 stat and enemy having 15 def, I did 13 points of damage
**Now the enemy has 25def the same as my str and I only did 9 points of damage
**Here the enemy has 0 def and I did 25 points of damage
**Here the enemy has 500 def and I have 25 str and I was still able to do one point of damage
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.