Author Topic: Maths for a good, balanced and interesting semi-roguelike  (Read 7471 times)

RogueMaster

  • Rogueliker
  • ***
  • Posts: 65
  • Karma: +0/-0
    • View Profile
Maths for a good, balanced and interesting semi-roguelike
« on: December 09, 2012, 03:32:56 PM »
I'm almost finished my semi-RL project, but I'm missing an important part:

the maths behind the game, is what is producing me headaches.

The game is mostly stat-based. Player stats need to be carefully planned. Each lvl the player receives some stat points to distribute.
There are no "different" classes. This is, the player starts with a specific profession like could be warrior, mage or rogue assassin. Depending on the starting class, he will start with different spells/skill and different predefined stats, but he can access to everything in the game if he met the appropriate prerequisites, such as a warrior can cast fireballs if he learns how to do so.

Specifically, classes only define the starting stats, items and skills, and also the game story and starting map.

Experience will be usually won by slaying monsters. Experience to level up increases each level, at lower levels it increases little, but for later levels increases a lot.
It's not a coffeebreak rl. It's needed relatively much time to beat the game.
Minimun level = 1, max level = 30 or 35, maybe 40.

With all that info we can continue.

Actually I got several problems:

1) The Experience system: how should I calculate the experience given to the player? Using monster's health? monster's level? monster's subjective difficulty? totally random? I'm not sure on how to base experience wins, and which formulas would be the best for scaling experience gains in a realistic and interesting way.

2) Monsters' difficulty. How? I need a good way to scale and calculate the monster's difficulty. I am interested in a semi-random monsters' stats and skills generation, but a dragon will be always a true challenge. They can be beatable, but the player needs serious strategy. Also, a Dragon lvl 10 is weaker than a Dragon lvl 50, and even when the player is level 40, I want him to don't want to meet that lvl 10 dragon. Basically, I want some monsters prototypes with an overall power that gets scaled in harder maps, so monsters that are easy to kill, they are always easy to kill, and fearful monsters are always fearful, although low level fearful monsters are less fearful than their high level counterparts.

3) I got another question but I have just forgot it...


Well, thanks in advance, cya.


[EDIT]

I remember now the other question:

3) This is, i think, the most complex thing. The critical and dodge chances. Actually they are based on agility stat. When the player assigns points to agi, crit and dodge increases. So far, this is ok. But I need a system where crit% and dodge% is affected by player level. I mean, if the player never puts points into agi, the crit and dodge will decrease. So, player that never put points into agi will see their dodge and crit being decreased each level. But players that want a crit ro dedge based character, need to really invest into agility, so they compensate the level loss. Briefly, crit% and dodge decreases each level. Because crit and dodge could be a very powerful thing, I want that players investing into it can get a really nice crit%, maybe 35% or 40%, but they need to focus heavily into such stat.
But in the other hand, there are players that are not interested in crit or dodge, and they will get pretty low on them. BUT I don't want to reach zero on it.

Basically, crit% decreasing each level is cumulative. Each level, the player needs to invest more into AGI to compensate the crit% loss, so getting high crit% requires equipment with AGI. So, +1 AGI gives +1% crit, for example, but at level 2, crit% is reduces by 0.1, at lvl 3 by 0.2 and at level 20 reduced by 1.5%, for example.

But additionally, the crit% never gets lower than a certain value. It's like the crit% has both limits, one superior and one inferior, and reaching any of them is harder when you are closer.
I'm not sure if using logarithms here would give good results, or there is already an easy way to do this with a simple formula.
« Last Edit: December 09, 2012, 04:16:48 PM by RogueMaster »

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Maths for a good, balanced and interesting semi-roguelike
« Reply #1 on: December 09, 2012, 05:24:14 PM »
1) The Experience system: how should I calculate the experience given to the player? Using monster's health? monster's level? monster's subjective difficulty? totally random?

Possibly all of above. Or you could just have a static experience points for monsters. The thing is that you need to decide that stuff and for that reason it's difficult to create a balanced RPG system. I think the best way to approach this one is start small... you know, think hard what stats you actually need and try to figure out how they affect to the gameplay.

Holsety

  • Rogueliker
  • ***
  • Posts: 148
  • Karma: +0/-0
    • View Profile
Re: Maths for a good, balanced and interesting semi-roguelike
« Reply #2 on: December 10, 2012, 04:48:16 PM »
I'm almost finished

Boy howdy, you sure wouldn't think so going  by the questions you're asking.
You're not sure about monster experience worth, how to scale stat effectiveness into endgame levels and how to scale monster difficulty...

I can't go on  ;D
Good luck.
Quote from: AgingMinotaur
… and it won't stop until we get to the first, unknown ignorance. And after that – well, who knows?

Paul Jeffries

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 257
  • Karma: +1/-0
    • View Profile
    • Vitruality.com
Re: Maths for a good, balanced and interesting semi-roguelike
« Reply #3 on: December 11, 2012, 12:32:35 AM »
If you wanted to look at it mathematically then as a simple first step you could try setting up something like an excel spreadsheet where (for example) each row is an encounter with a monster - you set your variables for the things you mention above and then roughly calculate the most likely outcome of combat based on the average statistics of players, monsters, equipment etc.  Model (roughly) the rate of increase of monster and player stats, health regeneration and so on and iterate for the number of monsters you think the player is likely to face.  From all that, you should end up being able to tell the rough likelihood of the player being able to survive and can tune your input variables and progression formulae until you get the difficulty level you want.

Of course this will only give you a rough idea to use as a starting point - if your game is in any way worth playing you won't be able to accurately simulate it through such simple means.  Some people take this super-seriously and write AI bots to simulate combat more exactly or even to play the entire game as a human would.  From this they can quickly calculate a whole series of simulated runs and use the results to tweak the difficulty.

Ultimately, however, I strongly suspect that these methods are a poor substitute for simply playing through the game yourself many times over and organically tweaking things until you have a system that feels right to you.

RogueMaster

  • Rogueliker
  • ***
  • Posts: 65
  • Karma: +0/-0
    • View Profile
Re: Maths for a good, balanced and interesting semi-roguelike
« Reply #4 on: December 11, 2012, 09:29:03 AM »
If you wanted to look at it mathematically then as a simple first step you could try setting up something like an excel spreadsheet where (for example) each row is an encounter with a monster - you set your variables for the things you mention above and then roughly calculate the most likely outcome of combat based on the average statistics of players, monsters, equipment etc.  Model (roughly) the rate of increase of monster and player stats, health regeneration and so on and iterate for the number of monsters you think the player is likely to face.  From all that, you should end up being able to tell the rough likelihood of the player being able to survive and can tune your input variables and progression formulae until you get the difficulty level you want.

Of course this will only give you a rough idea to use as a starting point - if your game is in any way worth playing you won't be able to accurately simulate it through such simple means.  Some people take this super-seriously and write AI bots to simulate combat more exactly or even to play the entire game as a human would.  From this they can quickly calculate a whole series of simulated runs and use the results to tweak the difficulty.

The spreadsheet sounds great. I think i'm going to use it. Thanks

Ultimately, however, I strongly suspect that these methods are a poor substitute for simply playing through the game yourself many times over and organically tweaking things until you have a system that feels right to you.

I only need to finish coding some little things and some tweaks, the game story background**, polish some game aspects, review the GUI, and betatest/balance everything, create quests and maybe some other minor things

It is a project I have been working for around a year more or less and I think the harsh part is done. I'm not sure how much time I will need to finish everything, but it won't be tomorrow or next week.


** Actually, this is/will be one of the longest parts, not like the programming part, but since the game is a mix between Roguelike and classic RPG game, the background story is really important, and because there are 10 player classes and every class has his own background story, you will understand that this step will take a lot of time.