Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Kaz on July 11, 2009, 10:06:39 AM

Title: Timing different in windowed mode
Post by: Kaz on July 11, 2009, 10:06:39 AM
Hi all

Our game has several sequences (e.g. node changes, videos, audios etc.), the timings of which are mostly governed by Sleep(); statements. And in full screen, that works fine. But in a window, the timings go out the window, so to speak. Things like fades done by stepping the alpha value of a MakeRGBA through a for() loop, don't fade or fade so quickly as to ruin the effect. One audio that waits on a sleep before handing over to another - fine in full screen, but running in a window the audios overlap.

Anybody got round this? It's going to be important for some I suspect because of the Big Fish stipulation that all games must be able to run in a window.

Cheers
Title: Re: Timing different in windowed mode
Post by: Mnemonic on July 11, 2009, 10:16:29 AM
You are using too tiny sleep values. See this thread: http://forum.dead-code.org/index.php?topic=3432.0
Title: Re: Timing different in windowed mode
Post by: Kaz on July 11, 2009, 11:48:33 AM
Thanks,

So that would explain the problem with the fades (255 to 0, step 1, so sleep is shorter than frame rate).

However I already know that if I use longer sleep values (some of these sleeps are tens of seconds to allow videos to run) then the timing will be out the other way. For example, the Sleep where the audio files overlap is 12,200ms - and that was simply copied from the length of the stream.

I'm not sure it's just about allowing for frame updates.