Fp.fixed problems


(billy2000) #1

Hyas.In my main.as i have the super life this: super(width,height,60,true).When i enter my 1st world i want to use 30 frames(for a swf) so i do this:

FP.fixed = false;
swf.stage.frameRate = 30;

And after the swf ends i have this if:

if (timerSwf == 0) {
	swf.stage.frameRate = 60;
	swf.parent.removeChild(swf);
	timerSwf--;
	FP.fixed = true;
}

The problem is that FP.fixed seems not to work anymore.I mean it doesn’t fix the framerate to 60 fps anymore.(i.e if i use FP.stage.framerate=30; after changing fixed to false and then true,the framerate will be 30fps.But if i dont use FP.fixed=false; ... FP.fixed=true;, and after i use FP.stage.framerate=30; it doesn’t change it to 30fps.) I would like for the fixed framerate to work again after i change it and then turn it to true again,but idk how. Do you guys know why this is happening/how can i fix this? ty.


(Zachary Lewis) #2

A fixed framerate doesn’t mean the game will always run at a specific framerate. A fixed framerate means every frame will update with an identical elapsed time.

If I’m running with a fixed framerate and User A’s computer is twice as fast as User B’s computer, the game would run twice as fast on User A’s computer. With a variable framerate, it is possible to compensate for this difference in speed by taking the variable elapsed time into account.