Author Topic: Some Biological Rules of Thumb  (Read 981 times)

kestrel

  • Average
  • **
  • Posts: 89
  • Karma: +16/-0
  • Lightweight
    • View Profile
Some Biological Rules of Thumb
« on: May 18, 2017, 09:56:48 PM »
I figured I'd share some rules of thumb I've come across when working on my latest game in the hopes that they'll prove useful. Obviously it'll depend on what kind of game you're making, but if you do want to go for a realistic feel here are a few basics I've found. I'd be curious to hear what others have come up with for their games, since it seems like every game models food and weight gain in its own unique way. This is going to be a long post so get comfortable an maybe grab a snack  ;)

The first and most basic is the mechanics of weight gain. You eat food that contains calories, these are absorbed by your digestive system. Anything you eat remains in your system for about 33 hours for men or 47 hours for women. Your body is absorbing calories at a more or less constant rate for that whole time with diminishing returns as more calories are added. This means that your body gets less efficient at absorbing calories the more of them there are available, but it never really gets to the point where more calories eaten don't result in more calories absorbed. Overall the human digestive system is remarkably efficient and a good number to go off of would be about 85% of the calories eaten must either be burned or they'll be stored as fat. On the burning side, a good rule to go off is you can get about 25% of the stored energy out as mechanical work, so suffice to say a good bit is wasted. So to run through an example, if you ate a 1000 calorie meal 850 calories would be absorbed, and then you could do about 200 calories worth of actual work.

An important proviso here is that the wasted calories are lost in the form of heat, which is also the main use of calories by the body during the day, so they're not exactly wasted since you'd need to be keeping your body warm regardless. I'd recommend considering keeping the body warm to be a 100% efficient operation, so fat can be transformed into heat with no efficiency loss. Although there are obviously important things like breathing and keeping the heart beating going on, it's probably fine to model a person's resting metabolism as the energy spent keeping their body warm.

One pound of fat equals about 3500 calories. An aside is that a nutritional calorie is actually what physics would call a kilocalorie, that is 1000 SI calories. A SI calorie is the amount of energy required to heat 1 gram of water through 1 C, so a nutritional calorie would be enough to heat 1 kilogram of water (or one liter conveniently enough) by 1 C, if it was converted perfectly. This is important because it gives a useful reference point not only for measuring exercise, but also for more abstract energy use such as if, for example,  you were to make a magic system that was powered by food.

The other main limitation I'd recommend modeling is stomach capacity. You could model this in calories if you want to keep things simple, but I think it'd be both more realistic and fun to model it in volume instead. This would involve giving each food item both a calorie amount and a volume, with the ratio roughly representing the food's "healthiness." Remember, this is the compressed volume of the food, so a donut would probably only have a very small volume despite appearing large, while a soup or something would have exactly the volume you'd measure if you put it in a measuring cup.

While there are no precise numbers on what a human's stomach capacity is, the general consensus seems to be around a liter, with the capability to expand up to 4x its original size when absolutely stuffed, although this will be very uncomfortable. I'd recommend setting some intermediate variables with say, full to the unstretched size being satisfied, 1.5x being full, 2x very full, 3x the most a person can eat of their own volition, and anything beyond that being painful. As you probably know, that base size can change over time as the stomach stretches or shrinks based on lifestyle. Another detail you might want to consider is there's a roughly 20 minute delay between the stomach's state and the brain's perception of its state, so it's very possible to stop eating when you feel full and then feel the last 20 minutes of food you've eaten added on top of what you felt when you stopped eating.

Now I'm going to consider the burning side and some limits that apply there. When exercising, an elite cyclist can produce 400 Watts of power, which going by our formulas above means they'd be burning an absolutely outrageous 1376 stored calories each hour. More realistically, an average reasonably fit person might be capable of putting out 75 Watts and burning 258 stored calories in that same hour. Over the course of a day, a person's body burns calories according to their basal metabolic rate or BMR. A good estimate of the number of calories burned at rest can be estimated using the Mifflin - St Jeor equation as follows.

BMR = 10 * weight(kg) + 6.25 * height(cm) - 5 * age(y) + 5         (man)
BMR = 10 * weight(kg) + 6.25 * height(cm) - 5 * age(y) - 161     (woman)

This makes sense because maintaining a larger body will naturally require more calories. There are some formulas that take into consideration body fat percentage as muscle and fat burn different amounts of calories. One of these is the Katch-McArdle Formula. Note that lean body mass (LBM) refers to the body's mass in kilograms not including fat so basically multiply by 100% minus the body fat percentage.

BMR = 370 + (21.6 * LBM)

That's a decent enough point to segue into body composition and what it means. While everyone's body is different I'm going to go with some really rough estimates for the "average ideal" human body. This average person probably doesn't exist anywhere on the planet so feel free to play with the numbers both as a whole and on a person to person basis in your games. I'd recommend fuzzing the numbers for each person you make to represent different body types and genetics. Still, it's useful to have some statistical base to work from. The ideal percentages for this make believe average are as follows as a percentage of total body weight.

Sex    Muscle Tissue    Essential Fat    Non-Essential Fat    Bone    Other (organs, etc.) 
Female    36%  12%  15%  12%  25%
Male    45%  3%  12%  15%  25%

Even though the storage fat is marked as non-essential, having much less than this will have noticeable negative effects. The thing to remember is if someone has less than their essential amount of fat they're at an immediate risk of dying, but having not enough nonessential will still make you feel awful and can have health complications as well.

There are a bunch of different systems for converting height, weight, and body composition and to be honest I haven't found one I'm completely happy with yet. A few things to consider is you'll want to account for body types and the tendency of different bodies to gain and lose weight from specific areas. I'll probably post a follow up eventually discussing that topic but this post has gotten long enough and I'd love to hear what sort of systems other devs have used.
« Last Edit: May 18, 2017, 11:11:49 PM by kestrel »

AHumanBeing

  • Emaciated
  • *
  • Posts: 35
  • Karma: +3/-2
  • Lightweight
    • View Profile
Re: Some Biological Rules of Thumb
« Reply #1 on: May 19, 2017, 07:11:07 PM »
Bravo!

dingotush

  • Developer
  • Chubby
  • *****
  • Posts: 117
  • Karma: +30/-0
    • View Profile
    • Yaffaif
Re: Some Biological Rules of Thumb
« Reply #2 on: May 19, 2017, 08:28:38 PM »
Kestrel, you've done a good job bringing together lots of information into one place. I'd actually coded a fair few of these into Yaffaif (along with various fiddle factors to allow for tuning).

The other bit of the puzzle I think is Metabolic Equivalent. This gives a set of multipliers to Resting Metabolic Rate (RMR - which is close enough to BMR for the needs of most games) for different kinds of activities. It's a bit simpler than working out actual the energy expended.

kestrel

  • Average
  • **
  • Posts: 89
  • Karma: +16/-0
  • Lightweight
    • View Profile
Re: Some Biological Rules of Thumb
« Reply #3 on: May 19, 2017, 10:45:28 PM »
Awesome! Thanks for showing that to me dingotush, that's going to make things a lot easier in general since it looks like people have worked out the metabolic equivalent for a huge range of tasks.

Jhalem

  • Average
  • **
  • Posts: 54
  • Karma: +6/-5
  • Chub
    • View Profile
    • (LGBTQ-friendly) ChubNet Discord Art and Social Group
Re: Some Biological Rules of Thumb
« Reply #4 on: May 24, 2017, 08:11:13 PM »
This information is pretty incredible... Despite having a good knowledge in nutrition, I always held back on learning about metabolism for some reason.

When I make games, I probably would never go to this level of realism, simply because I am not trying to make games that are mechanically advanced. I would love to see someone make a really hardcore simulation game based on this information.

As for the system I would use; I am making character-focused games where characters are always active, so the character customization would be rather minimal and the same stats would apply to any player. I might give the player a basic activity metabolism energy consumption rate and then subtract from that rate by 1000 if they are sleeping, since sleep can allow for very effective weight retention. (When resting, you burn about 1000 less calories than being moderately active.) On the other hand, I like the idea of attaching calorie loss to damage dealt and calorie gains from healing so maybe I would lean on that approach more if I was willing to make a more accurately representative game. My system would basically be like racking up a daily score where every activity gives you point gain or loss.

Overall, I guess I could implement a complex system, but the burning system would not be so complex.  I don't like thinking about weight loss too hard anyways.
Unwavering Resolve

dingotush

  • Developer
  • Chubby
  • *****
  • Posts: 117
  • Karma: +30/-0
    • View Profile
    • Yaffaif
Re: Some Biological Rules of Thumb
« Reply #5 on: May 25, 2017, 06:18:38 AM »
I think it's useful to know what reality is like, before trying to design an approximation for the purposes of a game, or throwing the realitiy out the window all together. . It's all too easy to make a game where things rapidly become immersion-breakingly unrealistic - or where the intended outcome of getting really huge can't actually be achieved no matter how many turns you play through. Having a stomach that expands unchecked with each stuffing (so you can eat more, stretch it more) can end up with a capacity bigger than their own body. If you let some BMR equivalent grow with the character's size there may be some upper limit to how much they can gain before it's only just possible to eat enough to maintain a weight - is that limit where you want it? And so on.

Midnight27

  • Emaciated
  • *
  • Posts: 37
  • Karma: +2/-0
  • Lightweight
    • View Profile
Re: Some Biological Rules of Thumb
« Reply #6 on: July 13, 2017, 06:00:53 PM »
I decided to build a calculator using some of the data presented here, for ensuring roughly accurate gains during rps. Thought I might share it with you all.

kestrel

  • Average
  • **
  • Posts: 89
  • Karma: +16/-0
  • Lightweight
    • View Profile
Re: Some Biological Rules of Thumb
« Reply #7 on: July 13, 2017, 06:34:45 PM »
I decided to build a calculator using some of the data presented here, for ensuring roughly accurate gains during rps. Thought I might share it with you all.

Very cool! This is so intuitive and easy to use!