How do you make a battle system that's fair but uses chance?
Hi, if you have an RPG type game where the players have traditional values like strength, dexterity and so on, when they fight, how do you make it fair and yet have some randomness and be in accord with their skill points? For example, if you have two people fighting and you have one guy with strength 15 and the other person 25, what do you do in addition to it being randomized to give the 25 person an edge? the only thing i can think of is just to do what you might do on paper. There is a threshold for a hit. You roll the dice. Then add the additional points to add to the value to see if you got a hit. If you have 15 you'll have less to add to your randomization than the guy with 25. I hope that makes some sense. I'm just trying to figure out my system. Thank you.
Just some guessing, you can make some kind of formula. For example,
Not sure if thats any good, but just a thought.
size_t damageHit(const Player& player){ const size_t damage= player.health % player.strength; const size_t maxDamage = damage * player.level; return randomNumberFrom(1,maxDamage);}
Not sure if thats any good, but just a thought.
Edge cases will show your design flaws in your code!
Visit my site
Visit my FaceBook
Visit my github
Visit my site
Visit my FaceBook
Visit my github
Proper balance is something you'll have to tweak for once you get closer to an alpha build I would guess ( since by then you could run combat simulations ). In general you need to come up with something that makes a player feel they have a large role in determining the outcome ( either by player twitch skill or by better use of stats and skills).
One strategy is to try to keep the variance of everything small. (e.g. no critical hits). That way, luck doesn't play as much of a role.
I trust exceptions about as far as I can throw them.
I wrote this post so many times and have been flip flopping between incredibly long and very short responses.
Really, your question seems really only answerable by you. You've touched on one way to do it, at least. Are you looking for other examples, or what? Does emulating Pen and Paper RPG not work for you for some reason?
Really, your question seems really only answerable by you. You've touched on one way to do it, at least. Are you looking for other examples, or what? Does emulating Pen and Paper RPG not work for you for some reason?
I disagree with the no critical hits bit - if you remove that feeling of randomness then things become TOO static and bland. Legend of the Dragoon was like that - had no randomness at all - combat was kinda boring because you knew exactly how things would turn out after seeing an enemy once.
Quote:
Original post by razoras
I wrote this post so many times and have been flip flopping between incredibly long and very short responses.
Really, your question seems really only answerable by you. You've touched on one way to do it, at least. Are you looking for other examples, or what? Does emulating Pen and Paper RPG not work for you for some reason?
No. just thoughts. I wanted to know what other people did.
Have a broad range of possible values, but make values in the middle MUCH more likely than values at the edges, sort of like standard deviations and z-scores.
So if you have something that does 1-10 damage, you could have a table somewhat like this:
1: 0.25%
2: 0.75%
3: 4%
4: 15%
5: 30%
6: 30%
7: 15%
8: 4%
9: 0.75%
10: 0.25%
This sort of system is a lot better for limiting randomness than the standard RPG d20 system. Another thing you might look into if you want a die-based system is using 3 or 4 d6's instead of a single 20-sided die.
So if you have something that does 1-10 damage, you could have a table somewhat like this:
1: 0.25%
2: 0.75%
3: 4%
4: 15%
5: 30%
6: 30%
7: 15%
8: 4%
9: 0.75%
10: 0.25%
This sort of system is a lot better for limiting randomness than the standard RPG d20 system. Another thing you might look into if you want a die-based system is using 3 or 4 d6's instead of a single 20-sided die.
Check out the first gameplay video from my javascript/PHP RTS game
Why not just go ahead and use an actual normal distribution while you're at it? (Maybe one with the tails trimmed a bit to ensure fairness)
On the computer, there's no reason to simulate dice rolls. You get to use any distribution you want.
On the computer, there's no reason to simulate dice rolls. You get to use any distribution you want.
I trust exceptions about as far as I can throw them.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement