Jump to content
EnigmaGrey

A Realistic Nutrition Formula

Recommended Posts

So, the nutrition build has weighed heavily on my mind for a while: when initially proposed, it was meant to be something long term, that'd affect players over a period of time.

 

Instead, weight rapidly fluctuates based on the amount of calories a player eats between two values. Every update beyond a certain threshold of calories adds or takes away weight.

Worse, we're using realistic calories for food, but they don't actually translate into accurate weight gain, making this alteration rather pointless.

So, I propose the following . . .

 

function calcWeightChange()

-- get player weight
-- get calories from exercise

-- calc minimum calories necessary to maintian weight, no activity, male
caloriesBMR = 66.5 + (13.75 * playerWeightKG) + (5.003 * playerHeight) - (6.755 * playerAge) * 1.2

weightChange = ( caloriesBMR + (caloriesExercise * difficulty) ) - caloriesConsumed / CALORIES_KG

--round
--apply weight change to character
end

Events.EveryDays.Add(calcWeightChange)

 

Not only is the current "weight throttle" removed, but the player's weight can be taken into account, as well as the player's age.

 

So, instead of gaining 3 KILOGRAMS just from maintaining a surplus of 3500 calories for a day, you'd only gain 1/3 a kilogram. Likewise with losing weight. Suddenly the change to realistic calories for food items makes sense.

 

It can also easily be scaled for difficulty.

 

No more yo-yo dieting . . .

Share this post


Link to post
Share on other sites
27 minutes ago, EnigmaGrey said:

So, the nutrition build has weighed heavily on my mind for a while: when initially proposed, it was meant to be something long term, that'd affect players over a period of time.

 

Instead, weight rapidly fluctuates based on the amount of calories a player eats between two values. Every update beyond a certain threshold of calories adds or takes away weight.

Worse, we're using realistic calories for food, but they don't actually translate into accurate weight gain, making this alteration rather pointless.

So, I propose the following . . .

 

function calcWeightChange()

-- get player weight
-- get calories from exercise

-- calc minimum calories necessary to maintian weight, no activity, male
caloriesBMR = 66.5 + (13.75 * playerWeightKG) + (5.003 * playerHeight) - (6.755 * playerAge) * 1.2

weightChange = ( caloriesBMR + (caloriesExercise * difficulty) ) - caloriesConsumed / CALORIES_KG

--round
--apply weight change to character
end

Events.EveryDays.Add(calcWeightChange)

 

Not only is the current "weight throttle" removed, but the player's weight can be taken into account, as well as the player's age.

 

So, instead of gaining 3 KILOGRAMS just from maintaining a surplus of 3500 calories for a day, you'd only gain 1/3 a kilogram. Likewise with losing weight. Suddenly the change to realistic calories for food items makes sense.

 

It can also easily be scaled for difficulty.

 

No more yo-yo dieting . . .

 

The original formula was too complex and this is much simpler, i was thinking at the line of if you dont eat 3x of decent meal a day then you start to lose weight, so as long as you eat more than that 3 meal a day you will not lose weight, now if your total food eaten is more than "value" percent fat then you will be considered eating fatty food and will get fatter and gain weight but if you eat non fatty food you will not gain weight, instead of ticks lowering hunger values maybe do it at increment of meal times so maybe 3x per day and everytime you eat enough for that meal the hunger will go away. if not you will start losing weight faster till you die.

 

Sorry for my rambling :P

Share this post


Link to post
Share on other sites

I'm not actually sure why fat's even included in the system . . . For long-term nutritional deficits, all that matters is carbs and protein, unless I'm mistaken . . . Fats can simply be folded into calories.

While things like rabbit starvation (very rare) are usually mentioned as requiring fats, it's the amount of protein that does the damage, long term. (Receiving the majority of your daily caloric intake purely from calories is very hard on the body initially and to a point.)

Of course, maybe something could be worked out where the "percentage of calories from fats" is applied to the body fat value, if at the end of the day, the character gains weight.

Share this post


Link to post
Share on other sites

Tbh I dont have problem with it. IRL you also change your waight each days +- 1-2kg depends on what you eat. In my current game im eating a lot of fruits and veges to lose the waight ( overwaight trait) but still dont suffer from hunger and - strength moodle. By dooing so im loosing about 0,3 Kg each day. Dunno how much realistic is this but for my game v real taste it fits just fine.

Share this post


Link to post
Share on other sites

In real life, most rapid, single-day, weight changes are through water or the actual weight of food. Actual body weight only fluctuates a small amount.

 

In this case, to gain 1 KG, you'd have to eat a surplus of 9000 calories in reality (there's some fudging based on age, body composition, heart rate .etc).

In PZ, you can just do that eating a container of ice cream and a pie over the course of a day.

 

Eat nothing, for a day, hit the maximum weight loss at 4500 and you'll lose several kilograms a day.

 

In the current system, there is no strengh penalty until you're under 30 kg and dying. Hunger isn't tied to the nutritional value of food, only it's "fullness."

Share this post


Link to post
Share on other sites

I don't know that formula or pretend to know it. I haven't played with the test build to know what it means. but I think that may help in this case as a first question, can a player just screw with the system by setting their height to 1 ft tall or age to like 10. Also, an age 65 retired guy doesn't need massive amounts more food then a healthy age 18 athlete. (Edit. I think i read that backwards, your forumla is - age isn't it. Which would mean setting my age to like 65 would be a good thing game stat wise. But still. if I was to make myself 10 years old. i wouldn't eat more then a aged 30 athlete.)

 

Instead of age and height, more likely it should be based on Muscle and Fitness. That is what really effects how much you need to eat. If you are a couch potato you only need a few calories, but if you are a muscle bound hulk or professional runner, your base calorie need can be 3x higher. To make it more immersive, you can get bonuses or penalties to your fitness and strength based on how much you eat, and or protein. If you aren't eating enough protein then you won't build muscle, if you don't have your carbs then you won't be able to sprint for long distances. 

 

It sounds like rapid changes in food intake should effect things more like exhaustion, fatigue and stamina rather then your direct weight. I bike alot and on nice days I bike 30 miles a day, but if I don't get a full load of protein or carbs.. I don't make it some days, instead pulling only 10-15 miles before needing to stop and eat a power bar or something.

 

 So as for those, I would have the day to day eating involve your "hunger" level and your stamina. But not as much your weight unless you just aren't eating for a long time. I mean, I have friends in the Christian faith who go on 40 day water fast or juice fast they don't instantly "die" or anything. Yea they lose some weight, up to like 30 lbs or so, but they gain most of it right back when they start eating again. 

 

Edited by Slice985

Share this post


Link to post
Share on other sites

No. Height can simply be a fixed value, it doesn't need to be altered. It's just used in the Harris-Benedict equation to calculate BMR. Likewise, age doesn't necessarily need to be available to players, though some have asked for it  (currently, everyone is just 27 years old); it'd be nice if age wasn't purely an aesthetic in the future (and perhaps height).

 

The BRM itself can be scaled to include exercise, but since the nutrition build actually counts how many calories you need to burn through exercise, it's un-necessary. The BRM formula itself assumes no activity for this reason. Exercise is considered in the final WeightChange value.

 

This is an established method of determine how many calories people need to consume just to maintain their current weight, rather than a formula I came up with. Activity is directly  represented in PZ by  how many calories you expend through exercise, as is.

 

Affects from eating aren't currently considered in the nutrition build; it's currently only counting calories.

Share this post


Link to post
Share on other sites

I hope any nutrition system would be 'under the hood' game wise.  I am not sure how much I would care for worrying about all of that info while playing.  I know we are trying to go for high realism in PZ, but just thinking of having to monitor this stuff in game makes me cringe.

 

I guess I would have to see how it would play out to be sure.  I know we need something more than what we have currently for a hunger system.  I just hope what we get isn't too involved.  My survivor is just happy to be eating anything that isn't bugs or dogfood.

Share this post


Link to post
Share on other sites

I really like this proposal :D Good stuff EG :)

 

And I personally feel like the more realistic we can get the system, the better it will be for gameplay. Right now the issues are that things like weight change are too drastic compared to real life, but if the system can work realistically and under the hood, over time, without you noticing every kg/lb lost or gained, it wouldn't be something people get issues from quickly if they have a bad diet early on. This would also give people a better chance to make the adjustments before starving, becoming overweight or just being unhealthy and unfit, as once they've noticed the issue with their diet they'll still have plenty of time before things get way out of hand. Just like in real life :)

Share this post


Link to post
Share on other sites

What i am missing in the current weight-calories calculation is the fact that if you burn your body fat you gain calories. If you have a surplus of calories by food intake your body is storing the energy in your fat cells and this is why you gain weight. If you are lacking calories/energy for your daily activity your body just uses his body fat energy reserves. In this case your lose weight but you gain energy from burning body fat:

1g of body fat = 9kcal

 

Might be worth to take this into consideration as well.

Share this post


Link to post
Share on other sites
Quote

1g of body fat = 9kcal

Quote

1 KG, you'd have to eat a surplus of 9000 calories



I wont become too German here, but this is actually half-true. 1g bodyfat doesnt consist of 100% fat.
Fat cells naturaly consist of fat and water. If your body is going to use the energy from one fat cell, your body will also remove all the water from that cell.
1g of bodyfat = 80% fat and 20 % water (roughly)

Meaning if you kill 900 kcal from fat you will loose 120g weight, but only about 100g pure fat.
The better rate is about 700 kcal = 100g weight.

 

Quote

What i am missing in the current weight-calories calculation is the fact that if you burn your body fat you gain calories.

Thats what i was thinking the other day, i came up with the idea to add a TurnBased 1.800 kcal glycogen reservoir.

In real life, fat -> kcal is happening all the time. But mostly while you are asleep. The body transfers energy from food and fat to fill up your glycogen reserve (up to 1.800 kcal). This means fast energy supply, normal state. If your glycogen reserve is full and unused (kcal per hour at BMR), your body will transfer energy from food into fat at a high rate.
So this 1800kcal glycogen reservoir could be used for balance purposes (=not using fat for energy immediately, results in smooth weight changes)

If all your glycogene is low in PZ, player will become weak until rest/sleep, wich will slowly transfer food and bodyfat kcal into glycogen kcal.
With this, calories could be calculated TurnBased while asleep. Something like that.

Edited by Snorrsenkel
tipping mistake

Share this post


Link to post
Share on other sites
On 20.4.2016 at 2:45 AM, Snorrsenkel said:

I wont become too German here, but this is actually half-true. 1g bodyfat doesnt consist of 100% fat.

You are right. Most of the weight you lose while dieting is just water. So 1g of body weight might be only worth 3 kcal. But still you get some calories in return.

Edited by ChatNoir

Share this post


Link to post
Share on other sites

You could always scale the CALORIES_KG amount by the percentage body fat/water, but it seems a bit over complex.

 

I feel it's enough to have upper and lower limits on weight and just leave it at that, so long as we don't see anywhere near as drastic shifts in weight as we do with he current system.

Share this post


Link to post
Share on other sites

Weight gain and loss should be mostly due to protein imo.

Also, as less food is required to maintain lower body weights, weight loss should slow as a player gets very thin. It's hard to starve to death, but easy to be starved into being zombie-bait.

 

If we want to get *really* realistic, we should model muscle mass and fat separately. Health problems don't automatically come with being husky (also fat-shaming lol) but being unfit regardless of weight is bad for you.

Share this post


Link to post
Share on other sites

More concerned about calories and food not being meaningless currently, and stopping the wild swings in weight.

 

The rest can come later, assuming it's needed. Though it should be noted that in the above formula, lighter players will not need to eat as much to maintain their weight.

Share this post


Link to post
Share on other sites
Quote

stopping the wild swings in weight.

Problem on the current system is fat/weight as single reservoir for energy.  Real caloric system works more like a dual system wich uses glycogen as primary, and fat as secondary reservoir.

Picture related will work smooth and aviods spikes.

242_0315.JPG

Edited by Snorrsenkel

Share this post


Link to post
Share on other sites

If you ate, say 200 kcal more than required and primary reservoir is full:

  • (50%) 100 kcal => heat loss (higher body temperature)

(50%) 100 kcal => fat & weight gain at max. 50 kcal / hr

 

If you ate about 200 kcal below your daily requirements:

  1. Fat reservoir will restore missing kcal to primary reservoir at max. 75kcal/hr
  2. Secondary + Primary reservoir will loose 200kcal to daily output requirements


While asleep/idle:

  • Fat reservoir restores missing kcal to primary reservoir at max. 75kcal/hr + BMR (65kcal/hr) up to max 75 kcal/hr.

Share this post


Link to post
Share on other sites

That sounds about right Snorrsenkel, but I think it's fairly reasonably symbolized with a system like I suggested in the other thread- essentially, fall below a calorie minimum for the 24 hours period and you lose a set amount of body weight, hit in the sweet spot and stay the same, or shoot too high and gain a set amount of body weight. It's slightly more simplified but fairly easily digestible (get it, because we're talking about food stuff?) for the average user.

Share this post


Link to post
Share on other sites
2 minutes ago, King Kitteh said:

Y'all a bunch of nerds!

 

Seriously, the depth and realism that us players demand is sometimes frightening.

If anything, what I initially proposed is simpler than what we got in the nutrition build and should have only limited changes in weight. You'll notice that last part was the original goal of nutrition: long term changes, possibly tempered towards gameplay over realism.

Share this post


Link to post
Share on other sites
4 hours ago, King Kitteh said:

Y'all a bunch of nerds!

 

Seriously, the depth and realism that us players demand is sometimes frightening.

Yes it is. This may be in part because we know that the developers will do their best to please their fans. Not only are we the fans, but we're their guinea pigs. Talking guinea pigs...

 

They're trying to give life to a game about what life could be like if zombies attack!

Share this post


Link to post
Share on other sites
On 4/22/2016 at 5:13 PM, King Kitteh said:

Y'all a bunch of nerds!

 

Seriously, the depth and realism that us players demand is sometimes frightening.

 

I used to want the days to be real time, I know better now though :P. I do still think the game days should be longer by default however. I've started playing on 4 hour days with the new nutrition system and that seems to break my three meals (and maybe some snacks depending on my exertion that day) up right. However, I always liked having a longer day, as I hated the rush of a 30 minute day from the first time I played PZ.

Edited by Kuren

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...