September 24, 2021, 11:11:32

Author Topic: Game design/balancing - coming up with a formula?  (Read 571 times)

hosch

• Full Member
• Posts: 121
Game design/balancing - coming up with a formula?
« on: January 20, 2021, 15:10:00 »
Hi guys,

I'm trying to balance my fishing game by using a formula that adapts to the player upgrades etc. The fomula I am currently using only works in the first area (there are 4), after the first one the game becomes ridiculously easy. How do you approach this (in general)? Do you just hardcode your values?

I am having a fishing rod level (1-10), a base movement (2) and each fish gets assigned a level (1-3). I am currently doing this
Code: [Select]
`movementUp = baseMovement - (myFish.level - player_rodLevel)`
So if I have a level 2 fishing rod trying to catch a level 1 fish I get
Code: [Select]
`movementUp = 2 - (1 - 2)movementUp = 3`
Each time the player is successful the fish moves by 3 pixels and is caught in no time (higher level fishing rods increase the problem obviously). I tried to combat this with assigning the fish in the later stages a larger depth (the player has to overcome a larger distance to catch it), but it only helps a bit. Does any of you have a smarter formula suggestion? It is my first game I am planning to release and I never had to balance anything for other players

Matty

• Hero Member
• Posts: 1369
Re: Game design/balancing - coming up with a formula?
« Reply #1 on: January 20, 2021, 16:03:42 »
Yes.

Keep the formula.

But only do the resulting action every n seconds.

So use the milliseconds command and every n seconds do your check to move the fish up.
I eat cheese in the trees when its eight degrees

hosch

• Full Member
• Posts: 121
Re: Game design/balancing - coming up with a formula?
« Reply #2 on: January 20, 2021, 16:40:11 »
Yes.

Keep the formula.

But only do the resulting action every n seconds.

So use the milliseconds command and every n seconds do your check to move the fish up.

Oof, sometimes the simplest solutions are the easiest. I've set up something with multipliers and penalties in the meantime, but yours might work quite as well.
Code: [Select]
` select myFish.level case 1 penalty = 0.4 endcase case 2 penalty = 0.6 endcase case 3 penalty = 0.8 endcase endselect movementUp = (baseMovement + (player_rodLevel * multiplier)) - penalty`

Derron

• Hero Member
• Posts: 3651
Re: Game design/balancing - coming up with a formula?
« Reply #3 on: January 21, 2021, 07:41:47 »
add a default to your select-block ... and maybe inform you as developer ...
throw "unhandled fish level: " + myFish.level

Else you run into trouble once you increase fish levels without adjusting this piece of code.

If penalty is to increase by 0.2 each level:
penalty = 0.2 + myFish.level*0.2

In my game I use a "logistic function" for some increases - it starts at 0, raises pretty fast to a kind of threshold ... and then slloooowlyyyy crawls to 1.0 ... without reaching it.
So similar like the anti tangens you might use elsewise. Yet the logistic function has some parameters allowing the steep-ness of the curve.

bye
Ron
« Last Edit: January 21, 2021, 07:43:31 by Derron »

hosch

• Full Member
• Posts: 121
Re: Game design/balancing - coming up with a formula?
« Reply #4 on: January 27, 2021, 15:46:03 »
add a default to your select-block ... and maybe inform you as developer ...
throw "unhandled fish level: " + myFish.level

Else you run into trouble once you increase fish levels without adjusting this piece of code.

If penalty is to increase by 0.2 each level:
penalty = 0.2 + myFish.level*0.2

In my game I use a "logistic function" for some increases - it starts at 0, raises pretty fast to a kind of threshold ... and then slloooowlyyyy crawls to 1.0 ... without reaching it.
So similar like the anti tangens you might use elsewise. Yet the logistic function has some parameters allowing the steep-ness of the curve.

bye
Ron

Thank you, I really need to start working with errors. It's a valuable tool I am not putting to any use. I will incorporate it and the default case as well.