Stamina Meter

A unexpectedly influential addition in 0.10.0 is the addition of a Stamina meter.




I’ll explain why we need it after I explain what it is.


The stamina meter has some basic, functional similarities to the stamina meter you might find in other games: it’s a meter that is used up when creatures do something exhausting, like sprinting or attacking. But it is quite a bit more complex under the hood. Here’s how it works:


Obviously, creatures will use up their stamina when they engage in any ‘exhausting’ action: walking and running, attacking, those sort of things. Less obviously, both the strength/speed of these actions and their stamina cost will be linearly proportional to the creature’s stamina at the time. An exhausted creature will run slower and be weaker than their fully rested counterpart.


This will have several interesting results. A creature which triggers the ‘flee’ response will begin by sprinting as fast as it is able. As it runs it’s stamina will drop, so it will slow down, but also use less stamina. At a certain point, it’s stamina regeneration (metabolism) will reach equilibrium with its run speed: this will be the fastest run speed it is capable of maintaining. A high speed stat won’t necessarily make a creature faster if their stamina regeneration (directly proportional to metabolism) can’t keep up.


Similarly by virtue of how the system works, a creature’s initial attack will be its strongest. This should be a boon to predators, allowing them to kill weaker prey with one blow. I’m also considering add a stamina cost to getting hit, to further advantage the creature that lands the first blow.


Tangent: Speaking of boons to predators, one change I’ve made recently is to significantly reduce all creatures total hitpoints (/10) and increase their damage resistance (x10) to compensate. This will make it less costly for the survivor of a fight to heal damage, making hunting more rewarding.


So, why did I think a stamina bar was necessary? Because of the temperature overhaul mentioned in the last post.


I was thinking about the effects of cold and heat on creatures. None if they’re operating at optimal temperature, damage if they’re exposed to hot or cold extremes… but what about moderate temperatures? Real-life creature’s don’t get hurt from moderate changes in temperature, but they don’t enjoy it either. Besides, the game has far too many causes of damage already: gradual health loss has been my go-to source of selection pressure since 0.4.1, and I really need an alternative.


So I wanted a ‘stage 2’ state for creatures that were hot or cold, but not too hot or cold. In real life, creatures sweat, pant and shiver… all of which are thermoregulation adaptations and have nothing to do with their internal temperature being non-optimal. How do creatures without these adaptations, reptiles and amphibions, respond to non-optimal temperatures?


They sleep. And there’s my answer: mild non-optimal temperatures should make creatures lethargic, and slow them down without actually hurting them or costing them energy.


That realisation lead to the implementation of Stamina as a means to control their speed and cause them fatigue without hurting their health. Their maximum stamina (the orange bar) at any one moment is directly proportional to how close their temperature is to optimal at that moment, so creatures who maintain an optimal temperature will be able to move and attack with far more strength and speed. Additionally, if their temperature is bad enough (freezing/burning to death), they will not be able to move, which is a death sentence even before temperature damage kicks in.


This gets really cool in it’s interactions with other systems: one thing that’s been bothering me is endothermism’s ties to a higher metabolism and more active lifestyle. Originally I assumed I’d need to implement something manually: factoring metabolic heat production into the speed calculations. But with this stamina implementation I don’t need to because those ties are likely to emerge as symptoms of this system. Creatures capable of thermal regulation will naturally be faster and more active by virtue of always operating at their optimal temperature, while their ectothermic counterparts will slow down or speed up based on the current temperature,  just like their biological counterparts.




  1. #1 by gutza1 on March 17, 2017 - 10:30 am

    Yet another example of how a core system can do the work for the programmer. Evolution is an incredible thing.

  2. #2 by 20 char on March 18, 2017 - 9:01 am

    The best part of this post, is that I’m getting aMcDonald’s breakfast menu advertisement for it 🙂

  3. #3 by Argrock on March 28, 2017 - 12:43 pm

    Keep Going mate, I never said anything but I enjoy you since years

  4. #4 by clone do felpes destruidor que odeia a porra toda on March 29, 2017 - 5:13 am

    The textures are bad , man. But the game mechanics are the most interesting thing i’ve ever seen!

  5. #5 by treeling on April 1, 2017 - 12:28 pm

    I believe in you dude! I’m so happy you came back to the project!

  6. #6 by macwad1 on April 2, 2017 - 3:06 am

    Hey, I just wanted to say I love your work and think it is amazing. I would also like to say that I would love to have a talk with you about it, and even help you. I know its your project and i am sure you get very talented people offering all the time. I just love this project so much and would love to even have a small part in it. I am glad you are doing this though and hope it is finished some day.

  1. Where to next – 0.10.0 (for real this time) | Species Development Blog

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: