[SDL] CPU usage
Alex Barry
alex.barry at gmail.com
Sat Feb 9 18:41:56 PST 2008
Perhaps I should have added to why you shouldn't use a delay. Most games
hog CPU power, but there is a handy thing called v-sync, which adds a tiny
delay to make sure the screen is essentially ready. This still keeps CPU
usage high (which is good for your game), but doesn't hog it
hope that helps
On Feb 8, 2008 8:11 PM, Solra Bizna <sbizna at tejat.net> wrote:
> On Feb 8, 2008 4:50 PM, Alex Barry <alex.barry at gmail.com> wrote:
> > 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.
> > On Feb 8, 2008 5:22 PM, Solra Bizna <sbizna at tejat.net> wrote:
> > > 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.
> Yes, but SDL is also useful for writing other applications, including
> applications that require some animation or need to respond to other
> asynchronous events but don't want to grab the CPU by its horns.
> (Before someone says "use threads," not all SDL ports support threads.)
> -: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/20080209/03518eae/attachment.html
More information about the SDL
mailing list