Re: Timing issue
- From: "Denis Voyer" <denisvoyer@xxxxxxxxxx>
- Date: Mon, 7 Aug 2006 08:38:47 -0700
Hi Daniel,
I've just started looking into DirectX coding myself so I might just be
fartin' in the wind here but I do know that in a GUI setting you have to
think of timing in millisecond and with a timer control in is repressented
as 250 = 0.25 sec, 500 = 0.5 sec, 1000 = 1 sec, etc. Like I said might not
even come into play here but just thought I'd try to help. ;-)
From the NewbbieDenis
"Daniel" <DanielV@xxxxxxxxxxxxxxxx> wrote in message
news:uF0866huGHA.4952@xxxxxxxxxxxxxxxxxxxxxxx
Hey guys
I was advised that the best animation method is to update the animation on
a time basis rather than frame basis, which i agree with so that even on
varying procesor speds the animation will remain consistent.
ZMan pointed me to this formula:
if( _gameTime.Seconds/x % 2 > 0 )
//then next frame
The idea being that you set x to however many seconds you want your next
frame to kick in on. So ever second set it to 1, every 2 seconds set it to
2 etc.
However Z said that this will also work for half seconds but i am finding
it doesnt? How can i use a similar equation so that i can move to my next
frame in the animation every 0.5 seconds?
Z have i done something wrong here? If i set x to 0.5f my anim gets stuck.
(e.g. never results in 1)
Thanks
.
- Follow-Ups:
- Re: Timing issue
- From: Daniel
- Re: Timing issue
- References:
- Timing issue
- From: Daniel
- Timing issue
- Prev by Date: Timing issue
- Next by Date: VB.NET Managed DirectX, After Call Video.RenderToTexture, video object can't accessed anymore.
- Previous by thread: Timing issue
- Next by thread: Re: Timing issue
- Index(es):
Relevant Pages
|