[SDL] Limiting game speed
Sweeney, Steven (FNB)
SweeneS at fnb.co.uk
Mon Nov 4 08:32:01 PST 2002
[Off Topic, but just curious...]
You're getting no more than 52fps in 640x480x32? Try running in 16 or 24 bit
instead. Maybe that even though the mode is supported, it's not the fastest.
I develop on a laptop in 1024x768x16 and everything races along (but it's
got a 1Ghz processor and 256MBs of RAM)
> -----Original Message-----
> From: Matthijs Hollemans [SMTP:matthijs at allyoursoftware.com]
> Sent: Monday, November 04, 2002 1:23 PM
> To: sdl at libsdl.org
> Subject: Re: [SDL] Limiting game speed
>
>
> > When I write SDL games, I like to limit the frame rate to around
> 60fps.
>
> I don't know what platform you are targetting, but my laptop's video
> card (Nvidia) seems to have a fixed framerate of 52 point something
> fps in 640x480x32 fullscreen mode using page flipping. (Even though
> the settings indicate the refresh rate is set to 60 Hz.) If your
> game uses a fixed rate of 60 fps (i.e. you expect each frame to take
> up no more than 16ms), systems such as mine may not be able to keep
> up (because frames can't go faster than 20ms). I don't know if the
> refresh rate I am getting is typical for laptops.
>
> If you are writing a 2D game aimed at the general public (not
> hardcore gamers), 60fps may be too fast for typical consumer
> hardware (PII 300, lame video card). On the other hand, if you're
> writing a 3D game, a better approach is not to fix the frame rate,
> but use whatever framerate you can get. Movement is now based on
> elapsed time -- how long the last frame took is how much the objects
> have moved. Slower machines may have to disable certain features to
> still get decent performance.
> --
> Matthijs Hollemans
> All Your Software
> www.allyoursoftware.com
>
>
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
>
>
> .sophos.3.61.11.04.
More information about the SDL
mailing list