Jump to content
Posted 18 January 2011 - 10:48 AM
Posted 18 January 2011 - 12:33 PM
Posted 18 January 2011 - 01:18 PM
Posted 18 January 2011 - 11:55 PM
In a Variable Step game your Game class makes no attempt to maintain the frame rate. There is a one-to-one ratio between Update calls and Draw calls. With that said I want to point out one thing - While Update is only called from the Game's internal Tick() method, Draw is called both during the end of Tick() and also in response to Windows Paint messages. Paint messages can be invoked on your window for a number of different reasons, so depending on your situation you may see multiple Draw calls for a single Update. This doesn't mean your main game loop is calling Draw multiple times, it means your main game loop is calling Draw once, and then Windows is invoking it again.
Paint messages can be invoked on your window for a number of different reasons, so depending on your situation you may see multiple Draw calls for a single Update.
Posted 19 January 2011 - 11:52 AM
Most of what you just said I already knew, besides of the nifty little trick of the reset elapsed time.
However, the doubt that was a thorn in my mind was more centered on the values of GameTime, what its values represent when received on update and what they represent when received on draw.
As for large loading I would expect to do that asynchronous and have the main thread updating some animation, so that wouldn't technically be "running slow"
Posted 19 January 2011 - 11:56 AM
Does this pertain to fullscreen mode as well?
Would you mind giving a couple of examples?
Posted 21 January 2011 - 09:15 AM
Posted 23 January 2011 - 05:43 PM
One more question, as for this 1 to 1 relationship, is it something to aim to? wouldn't a game feel better in an N to 1 relationship with N > 1 and as high as possible while keeping draw in sync with the monitor refresh rate?
Wouldn't the best result be delivered by N upd to 1 drw to 1 screen refresh?
Posted 24 January 2011 - 08:31 AM
It really doesn't provide any benefit to have multiple updates within a single draw cycle
Posted 24 January 2011 - 09:40 AM
I was under the impression that while drawing faster than the refresh rate does not offer any improvements, updating as much as possible in some cases can help create a much more accurate simulation, like the sampling frequence of a discrete audio file like mp3, the more samles you have within the same time frame, the more "continuous" the simulation is.
Posted 24 January 2011 - 10:35 AM
Posted 24 January 2011 - 11:05 AM
Posted 28 January 2011 - 01:03 PM
Though having more updates than draw isn't necessarily a bad thing, as far as I can tell... isn't it still best to have a 1:1 relationship? With N:1 it would mean that the graphics can't catch up, and with 1:N it would be drawing the same scene too many times.
How would it be marginally better if one is faster than the other unless the drawing can't catch up?