Page 1 of 1
Quick Question
Posted: Thu Jun 24, 2004 6:47 pm
by Yoshi348
What specifically does amoeba speed mean? I mean, how exactly is the number value used?
Posted: Thu Jun 24, 2004 6:59 pm
by Holger
It's used to calculate the delay for a new amoeba tile, as follows:
MovDelay[ax][ay] = RND(FRAMES_PER_SECOND * 25 / (1 + level.amoeba_speed));
Yes, it looks weird...
Posted: Thu Jun 24, 2004 8:02 pm
by Zomis
Holger wrote:MovDelay[ax][ay] = RND(FRAMES_PER_SECOND * 25 / (1 + level.amoeba_speed));
Which translated into english means (I think):
The amount of frames it takes for the amoeba to grow is =
Randomise(50 * 25 / (1 + amoeba_speed))
The randomise(x) function chooses a random number from 0 to x-1.
So with an amoeba speed of 10 (as I think the default is), the randomised value is between 0 and 113.
I'm not sure that this is correct, but I think it is...
Posted: Thu Jun 24, 2004 9:06 pm
by Yoshi348
I see. And to find out the length in seconds, I would omit the FPS multiplier, no?
That still doesn't explain why setting it to 0 makes dead amoeba, but there's probably a line beforehand which checks for that special case.
Posted: Thu Jun 24, 2004 9:40 pm
by Zomis
Yoshi348 wrote:I see. And to find out the length in seconds, I would omit the FPS multiplier, no?
That still doesn't explain why setting it to 0 makes dead amoeba, but there's probably a line beforehand which checks for that special case.
1. Maybe so yes...or simply divide the result from the calculation with 50, then you'll get the approx time in
game seconds. (Note that in the game, a game second may take more than 50 real-time frames...uuh, one real-time second I meant

. This due to variations in calculation of CEs and stuff, it's mostly the CEs that takes time, except from the amount of active elements on map/on screen)
2.
A few lines over the code Holger wrote, also taken from game.c:
Code: Select all
if (!level.amoeba_speed)
{
Feld[ax][ay] = EL_AMOEBA_DEAD;
DrawLevelField(ax, ay);
return;
}