Advice needed for balancing a survival mechanic

So I dunno if I’ll ever finish it, but I’ve started working on a simple text adventure that takes place in subarctic temperatures. The player has to juggle heat loss with the activities they do. Starting from 1000 heat, they lose 300 per activity by default. This includes moving to or from certain areas and performing certain actions outside. So, for instance, there’s a central hub area and various adjacent houses and a dock. Fishing from the dock will take time and consume heat, and you can also sail out to sea for better fishing, but that also drains heat. Everything that drains heat drains the same amount.

Here’s the kicker, and the thing I’m struggling with deciding on: when you gain weight, you lose heat more slowly. In this way, fatness works like XP in a sense; you can do more, so you can perform actions you previously couldn’t (i.e. catching fish far out at sea or even diving) or climbing up a glacier for something. You start out from 125 lbs, and gain by eating and then finding a bed to sleep on.

What I can’t decide is how much to reduce the heat loss per pound gained. I don’t know if this is the kind of thing I need a playable demo to decide, but to put it in perspective, at 300 heat loss, you can do 3 things before the 4th “kills” you. (You respawn in an NPC’s hut, but I don’t know how to punish “death” in a way that’s not too harsh). At 200, you can do 4 things before respawning. So, for example, at the docks, 300 HL lets you catch 3 fish and then go home, and 200 HL lets you sail out once and catch 3 bigger fish.

The thing here is that I can’t have heat loss decrease by a linear amount. Let’s say you lose 100 HL for every 250 lbs gained. At 125 lbs, you can do 3 things before death; at 375, 4 things; and at 625, 9 things. And then if I want the max weight to be 775 lbs or more, you’ll gain heat, which means I have to account for having to cool down, which is too complicated for my aims. Even without that, I don’t want the player to get that powerful that quickly from exponential scaling.

All that said…what’s a good formula to calculate heat loss…er, loss, such that the number of actions gained per X unit of weight is linear, and what’s a good value for X?

4 Likes

The issue with a linear increase in the number of actions is that they’re based on how low the heat loss per action is. Since the lowest that can get is zero without adding the cooling mechanic, any linear equation will eventually cross that threshold and break.

What might work better is something along the lines of HL=bHL*(125/X), where X is the current weight and bHL is the base heat loss for the action. This way the heat loss is always above zero, but approaches it. You could even round the final value so that eventually some easier actions might have 0 heat loss. The issue with this equation is that you would see most of your benefits in weight gain right at the beginning with severely diminishing returns later on.

You could also use the cube square law to get a slightly more realistic equation. I don’t really know thermodynamics well enough to tell you the equation for actual heat off the top of my head, but the idea is that as an object (let’s say a sphere) gets larger, its volume (where heat is retained) will increase at a faster rate than its surface area (where heat is lost). You could just use that ratio to calculate the heat loss as well, which would be HL=bHL*((4π r^2)/(1.33π r^3)), where r is their waist radius I guess? Since it might only be the cube/square relationship that matters in this case you could just simplify it down to HL=bHL*((r^2)/(r^3)), but that simplifies down to basically the first equation above.

Another possibility is to make an increase in weight increase your total heat cap, or even have a hybrid system. The advantage to the heat cap increase is that it makes the number of possible actions dependent on a number that can keep increasing with no hard cap, so it can go up linearly.

The last possibility I can think of is a hard limit to the number of actions that can be taken per day (between rests/warm spots?) period, whether through a lower limit for the heat loss per action or some other means. After all, even if you’re not losing heat there’s only so much you can do in a day!

4 Likes

I agree with this person (Sorry, I’m new :/), the mathematics seem to work out legitimately as well.

I think the idea of the second (more complex) formula has more potential than the first one though. As someone like myself, I’m not a large person (scale wise), but I retain body heat VERY easily. So I think if you added something along the lines of a character creation screen, and then put in the option of a “cold-natured,” normal, and “hot-natured” person that could add more realism to the game (assuming that’s what you’re going for.) Cold natured meaning the person gets cold easier, hot natured being the opposite. I guess that could just change the starting value or size of the player, or it could increase/decrease the amount of heat that something takes.

Of course I think it would be more realistic as well if the player had to craft bigger clothes or even a bigger house at some point to accommodate for the size of the player (depending on the size limit of course) and those actions could cost more heat? I don’t know I’m just spitballing here haha :laughing:.

1 Like

Cool idea for a game, pun not intended, what if you add something like an event. For example the heavier the player’s character gets the higher the chance of the event triggering, the event can be something like the ice cracking under the character’s increased weight, the character looses Heat due to being exposed in the freezing water.
If you could, you can even make it so that based on their weight it gets more difficult to pull themselves from the icy water and have them loose heat per time spend in there or have it be a flat %.

3 Likes

Thanks, I think this is really good for my needs. The only thing I might adjust is the base weight, since this doesn’t actually give diminishing returns like you say because of how division works. With bHL at 300, 125 base weight lets you do 2 or 3 more things per 100 lbs; so at 700 lbs, you can perform a staggering 18 actions. This will let you get more food at a time, which lets you get fatter faster, which increases you efficiency further, and so on.

Of course, I may simply be able to reign that in just by letting the player only eat a little bit starting out and having their capacity increase when they rest with a full belly. Each food has a hidden calorie count and value for fullness, so I can use that to incentivize going further out to sea, for example, because there’s fattier fish out there, as well as quest items. So yeah, I think this equation will be perfectly balanced, as all things should be.

1 Like

You could use 3000 / sqrt(x)

This way the decrease in heat loss get’s progressively smaller with higher weight.

As an example:
100 lbs - 300 HL
200 lbs - 212.13 HL
500 lbs - 134.16 HL
1000 lbs - 94.87 HL
10000 lbs - 30 HL

If this does not please you, you could always create a simple excel (or GSheet) table and use the functions there to create a function that gives you optimal values.

1 Like

There are two basic approaches here.

You could approximate the physics, as has already been shown. A character is a blob whose radius is proportional to the square root of their mass. You can’t use a cube root because they aren’t a sphere - getting fat doesn’t make you taller! Increasing mass leads to smaller and smaller increases in radius. And heat loss is inversely proportional to radius (take @Chubberdy’s formula and cancel out the pi’s and r’s). That’s going to leave you with HL = c + k/sqrt(m) - m is the mass, c and k are constants you tune to get the game play you want. I stuck c in there because the k/sqrt(m) term is going to tend to zero as mass increases, and you probably don’t want anyone getting infinite “turns” - choosing, say, a c value of 100 would limit the maximum turns to 10 for any mass.

Or, you decide how many turns you should have at certain points (say 300 at 125lbs, 250 at 400, 200 at 600, 100 at 1000 - your choice) , and program a function to interpolate the intermediate values. You could use a linear interpolation between these fixed values, or if you are feeling fancy, go for splines.

Either way, using metric units internally in the code/model will likely make programming easier, just convert back when the result needs to be seen by the user. I’ve used both techniques in my project where appropriate, and since the libraries I have in Java have a Path2D object that can store linear or spline relationships I went with that rather than rolling my own function. Graphics functions can be your friends for the interpolative approach, even though you’ll never draw the shape.

1 Like