Kamaze schreef:
> Btw, is there any need in the gamelogic to limit the framerate?
> I just played a bit with SDL and SDL_Delay() and tested the average FPS
> with a 800x600 OpenGL windows and 2 primitives.
>
> I got the best CPU-Usage / FPS result with:
>
> <<<
> if ( frames % 5 == 0 )
>       SDL_Delay(1);
> <<<
>
> Means, share after 5 frames some cpu time :)
> With a "Sleep" command every frame the FPS drops to max ~500 FPS.
> CPU usage ~1%
>
> With a "Sleep" all 5 frames, i get ~2200 FPS.
> CPU usage 2% ~ 4%
>
> With a "Sleep" all 10 frames, i get 4000 ~ 5000 FPS
> but around 50% CPU usage on each core :(
> (Its the same like 'NoSleep')
>   
Erm, you do know that FPS means Frames Per Second right? It doesn't mean
Frames Per minuteS. In fact FPS = Hz really.

I honestly am glad when I see my (rather heavily powered) PC getting up
to 75 Hz and my laptop up to 60 Hz. And those are the maximums I can
reach when scheduling Warzone as *high* priority and returning
immediately from SDL_framerateDelay. (Those are the same I can reach
with the original implementation as well btw.)

-- 
Giel

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to