Quick Question
Moderators: Flumminator, Zomis
Quick Question
What specifically does amoeba speed mean? I mean, how exactly is the number value used?
Which translated into english means (I think):Holger wrote:MovDelay[ax][ay] = RND(FRAMES_PER_SECOND * 25 / (1 + level.amoeba_speed));
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...
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)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.
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;
}