[SDL] CPU usage

Alex Barry alex.barry at gmail.com
Fri Feb 8 15:50:22 PST 2008


Hey,
>From my experience as a game programmer, if you are designing a game that's
fullscreen, you shouldn't ever worry about the CPU usage, considering there
won't be any other programs in use while it's running.  If you really feel
you need a delay, use SDL_Delay( 1 ) which will give up the smallest
timeslice available, while still giving your program the most attention.
Again, I can never stress enough that if you are making a fullscreen game,
you should never *need* a delay

Alex

On Feb 8, 2008 5:22 PM, Solra Bizna <sbizna at tejat.net> wrote:

> On Feb 8, 2008 10:55 AM, Alvin <alvinbeach at gmail.com> wrote:
> > Have a look at SDL_WaitEvent() and see if it fits into your program. If
> you
> > aren't sure, can you post an example of how you read/poll the events?
> IMO, there's a pretty major gap in functionality between WaitEvent and
> PollEvent. Carbon's WaitNextEvent has a timeout that you can set
> appropriately, what we need is something like that for SDL. (Aside
> from Edward's use case, events may not be the only thing the app wants
> to block on.)
> -:sigma.SB
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20080208/bf696fae/attachment.html 


More information about the SDL mailing list