I'm creating a simple turn-based 2D Tile RPG in JavaScript/jQuery (using HTML5 Canvas) and the hardest part is the formulas. I got the EXP per level down. I have a base level. I'm trying to see what a reasonable way to come up with HP formula using said base level.

Any help?


It's not a simple matter, I think you'd better follow the whole Game balance concepts course.

Either way, that one or an alternative, since if you just improvise it, almost certainly you will get a bad result at best.


So there is not a true answer to this question because HP is only a single factor of combat. I'm assuming that this is a turned based game. First thing to do is step back and abstract things out. I usually find one of the most important questions to be, how long do you expect combat to last, because you have a number of factors to balance.

Dodge: When a character attacks, do they always hit? If not, you have boosted the defender's HP (the effective HP). Say that you miss 50% of the time, you have effectively doubled the defenders HP as it will take twice as many hits to kill them.

Resistance: Same goes here. Does armor resist damage? Is it by a static number or a percentage? The same equation can be used to determine the effective HP. If you have 50% dodge and 50% resistance, you have quadrupled the effective HP now.

Healing: Can the player or the enemy heal themselves? How often and for how much?

If you want examples of how things are done, I honestly suggest finding a few tabletop RPGs and looking at the rules. They are usually simple rules because they are meant to be played with only pend and paper and the rules are fully open to you.

After that, play test it. Sit down and manually go through one of the battles. See if you like the feel of how it works. You can always also write a program to have characters battle each other multiple times with different variables. This can help you balance things as you can find that one of the variables (or weights) is set to high or low.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.