[gameprogrammer] Re: Fixed Rate Logic
- From: "Dave Slutzkin" <daveslutzkin@xxxxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Thu, 07 Dec 2006 11:26:48 +1100
On Wed, 6 Dec 2006 16:23:16 -0800, "Alan Wolfe" <alan.wolfe@xxxxxxxxx>
said:
> hmm ok
>
> what i had figured for processing the event queue was something like...
>
>
> while( !GameOver)
> {
> while(eventqueue && eventqueue->fire < Now())
> {
> //process one event
> }
> //render everything
> }
>
> if you had an event in there that had a firing rate of 1ms and put
> itself back into the queue every time it ran, im assuming the
> processing of that event would take > 1 ms and so then you'd be caught
> in a loop forever.
You'd probably want to put a render event on the queue as well, rather
than treating it as special. Enqueued with variable delay depending on
what you need to maintain a decent framerate.
Dave.
--
Dave Slutzkin
Melbourne, Australia
daveslutzkin@xxxxxxxxxxx
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- Follow-Ups:
- [gameprogrammer] Re: Fixed Rate Logic
- From: Alan Wolfe
- References:
- [gameprogrammer] Re: Fixed Rate Logic
- From: Alan Wolfe
- [gameprogrammer] Re: Fixed Rate Logic
- From: David Olofson
- [gameprogrammer] Re: Fixed Rate Logic
- From: Alan Wolfe
Other related posts:
- » [gameprogrammer] Fixed Rate Logic
- » [gameprogrammer] Re: Fixed Rate Logic
- » [gameprogrammer] Re: Fixed Rate Logic
- » [gameprogrammer] Re: Fixed Rate Logic
- » [gameprogrammer] Re: Fixed Rate Logic
- » [gameprogrammer] Re: Fixed Rate Logic
- » [gameprogrammer] Re: Fixed Rate Logic
- » [gameprogrammer] Re: Fixed Rate Logic
- » [gameprogrammer] Re: Fixed Rate Logic
- » [gameprogrammer] Re: Fixed Rate Logic
- » [gameprogrammer] Re: Fixed Rate Logic
- » [gameprogrammer] Re: Fixed Rate Logic
- » [gameprogrammer] Re: Fixed Rate Logic
- » [gameprogrammer] Re: Fixed Rate Logic
- » [gameprogrammer] Re: Fixed Rate Logic
- » [gameprogrammer] Re: Fixed Rate Logic
- [gameprogrammer] Re: Fixed Rate Logic
- From: Alan Wolfe
- [gameprogrammer] Re: Fixed Rate Logic
- From: Alan Wolfe
- [gameprogrammer] Re: Fixed Rate Logic
- From: David Olofson
- [gameprogrammer] Re: Fixed Rate Logic
- From: Alan Wolfe