« Return to Thread: CPU usage

Re: CPU usage

by Alex Barry :: Rate this Message:

Reply to Author | View in Thread

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@...> wrote:
On Feb 8, 2008 4:50 PM, Alex Barry <alex.barry@...> 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@...> 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@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


_______________________________________________
SDL mailing list
SDL@...
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

 « Return to Thread: CPU usage