Game Balancing


Here is a copy of a post from slack about balancing the speed of different cells. I’m happy to discuss or explain more any time, all feedback welcome.

  1. Specific example of movement speed.

I downloaded the most recent Thrive release, 0.3.4 and in scripts/microbe_stage/microbe.lua I changed

line 20: self.movementFactor = 4.0 – Multiplied on the movement speed of the microbe.


line 291: = 0.75

  1. Balancing speed for all possible microbes.

Regarding movement here is a concrete suggestion for how to calculate the top speed of any microbe. It’s just a suggestion.

first calculate x = number of flagella / total number of organelles

using this means that scaling your cell doesn’t make a difference to it’s speed, if it’s 10 flagella + 10 other organelles that will move the same as 5 flagella + 5 other organelles

then compute

max_speed_for_the_cell = global_top_speed*(0.5*sigmoid(15*(x - 0.33)) + 0.5)

where sigmoid(y) = 1/(1 + exp(-y)) and global_top_speed is balanced to be the fastest theoretical speed for any microbe (we can set it so it feels good).

The 0.33 appears because that is the x for the starter cell (2 flagella / 2 flagella + nuclues + endo + mitochondria + vacuole = 2/6 = 0.33) and so I’ve used that as a balance point.

I think then once you have max speed for the cell when the player presses w their speed can just be linearly interpolated between 0 and their top speed reasonably fast (I think acceleration isn’t a big deal in high friction environments and fast acceleration feels good).

What this would mean in practice is that the most flagella you would ever really want is x = 0.6 (so for example 6 flagella and 4 non-flagella, which is a bit of a crazy cell) and getting a higher fraction than that would basically accomplish nothing. Also if you have even 1 flagella on a massive cell you can still move at 50% global_top_speed so no one is left grinding along at a super slow rate. The starter cell would then move at 75% of the global_top_speed

Any and all feedback welcome. I think this would balance all possible flagella powered microbes in such a way that we can fine tune the numbers as we progress.

Here is a plot of the curve produced

With a code snippet in c++ for computing these values:

Code Snippet

#include <math.h>

using namespace std;

//compute the sigmoid function
float sigmoid (float x)
return 1 / (1 + exp(-x));

//given a percentage of flagella compute the percentage of top_speed
float movement_percentage(float f)
return 0.5*sigmoid(15*(f - 0.33)) + 0.5;

main ()
cout << “Thrive Movement Speed Calculator” << endl;
cout << “With 2 flagella and 4 other organelles you move at " << movement_percentage(0.333) << " of the top possible speed.” << endl;
cout << “With 1 flagella and 4 other organelles you move at " << movement_percentage(0.2) << " of the top possible speed.” << endl;
cout << “With 0 flagella and 4 other organelles you move at " << movement_percentage(0) << " of the top possible speed.” << endl;
cout << “With 4 flagella and 4 other organelles you move at " << movement_percentage(0.5) << " of the top possible speed.” << endl;
cout << “With 8 flagella and 4 other organelles you move at " << movement_percentage(0.666) << " of the top possible speed.” << endl;

return 0;

Code Output

Thrive Movement Speed Calculator
With 0 flagella and 4 other organelles you move at 0.503517 of the top possible speed.
With 1 flagella and 4 other organelles you move at 0.562277 of the top possible speed.
With 2 flagella and 4 other organelles you move at 0.755624 of the top possible speed.
With 4 flagella and 4 other organelles you move at 0.963787 of the top possible speed.
With 8 flagella and 4 other organelles you move at 0.996784 of the top possible speed.

Another Newbie Introduction

Another discussion we were having was about how health and reproduction are related. Personally I find it frustrating to lose reproduction progress each time I am damaged, Here is an experiment to try, decoupling health and progress so that health never regens and all compounds absorbed are put into reproduction, regardless of the level of health.

To perform the experiment, in microbe.lua, comment out lines 897 - 910 (by using --, there are lots of examples in the file) and then changing 912 to

if self.microbe.hitpoints > 0 then

If you have done the experiment what do you think? Was it a different experience? Did you feel more vulnerable knowing your health wouldn’t return? Did you feel different when you were damaged?


I tinkered more with the self.movementFactor and linearDamping and I think those are good changes, and they definitely did make the swimming feel more fun (though I think 4.0 felt like too much, I changed it to 2.5).

If we try this speed system, one thing I’d suggest is that we use coefficients for the organelles instead of the number of the organelles themselves. Then we could make certain organelles “heavier” or “lighter”, and it would be possible to upgrade the speed boosts from flagella and cilia (downside being increased ATP usage).

I haven’t had a chance to experiment with the healing change yet, I’ll get to that soon.


I was trying to come up with alternative methods for healing like organelles splitting before healing themselves. But I think the best choice is to allow ammonia to be spent twice, first on healing and then again on reproduction. I think that could be the most satisfying thing (maybe to offset this double spending the healing could a bit slower to make predators more dangerous).


Interesting. So would that mean that you would heal and reproduce in parallel? If so I think that is a good idea, it would be much less punishing.


I just tested out the change to healing and I think there is a case that could be made for it. It does help to not have the feeling of progress towards reproduction taken away as you are getting closer to it. On the flip side it is very elegant to have the health/healing and reproduction system be the same, and I think it is good to have regen, so I’m thinking about how we could balance these.

What if we made healing change priorities at a certain threshold? For example if you are above 50% health, your cell will not refund any of your reproduction progress. It will simply spend new compounds to heal until you are back to 100% again, and then continue reproduction. However, if you fall below 50%, it will refund reproduction progress to bring you back up to 50%. Nevermind just realized this leads to the exact same outcome.

@hhyyrylainen: That’s an interesting idea, but does that mess up CPA balance in any way? Having one compound be used twice?


When I last chatted with the theory team they said they want to have a simple to reason about simulation for auto-evo to make it possible to give predictions etc. in the editor to help the player. So the actual gameplay wouldn’t affect auto-evo at all. I think a good middle ground is having the gameplay slightly change the effectiveness of your species.

This way we can separately tweak the auto-evo and gameplay to make both understandable and fun. So allowing the player (or maybe all cells) to double spend their ammonia for healing and reproduction won’t affect anything other than the fun of playing.

I don’t think this would have much effect as most of the time when I’m playing I’m above 50% health and waiting for my health to regen to be able to start splitting organelles again. See my point above about making gameplay fun.


Yes this is what I think (I think seregon might feel differently, I am not sure).

I tried to make a massive, complex, CPA prototype and basically it becomes impossible to control or predict. There’s just too much oscillation and too many systems interacting. I think it’s only fun for the player if they can reasonably predict the effect of changing their cell, otherwise it will just feel random.

So personally, as far as CPA goes, I think it would be good to work on it iteratively. So lets get a really good, solid, fun game working with the swimming around with lots of cool organelles in the editor to play with. Then when we have that we can build more of the population dynamics on top in a limited way. If it’s going great then we can build up to these full scale, planet sized, non-linear models if we like, we’re not stopping ourselves from doing that. I just think it makes sense to approach them using a smooth path where we can be sure we will get something reasonable from it.

I agree with you Nick that the health + reproduction being the same thing is quite a nice idea. However I think it’s a great example of something that sounds great but doesn’t actually feel good to play with. The big CPA system is another good example, it sounds like a great idea, I was it’s biggest cheerleader, but it doesn’t feel good to interact with.

I would love it if we could get into an experimental / trial and error approach to making the game, where we test things out and see if they feel good and if they don’t we try something else until it does feel great. I think that’s a great strategy for game dev in general.