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.

- 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.

and

line 291: rigidBody.properties.linearDamping = 0.75

- 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

#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;

}

int

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.