Try passing "p_speedFactor" as a float around, possible loss of information.
Whats m_secondsPerCount ? and why is it there?
//time difference between this frame and the previous frame in seconds
m_deltaTime = (m_currTime - m_prevTime) * m_secondsPerCount;
float dt = 0.0;
float currentTime = hires_time_in_seconds();
float lastTime;
while ( !quit )
{
dt = hires_time_in_seconds() - currentTime;
currentTime = hires_time_in_seconds();
//game related stuff
}
Read the article i posted, it will help allot fixing this problem.
You should google for , float precision, double precision, and converting then around
Hello baneTrapper, sorry it took so long to reply.
m_secondsPerCount is a number used to convert the value to seconds. You can see it being initialized in the constructor for timer.
EDIT: I see that I'm confusing the meaning of deltaTime (I'm using frank luna's book and the article you provided - frameTime in the article is deltaTime in the book). I will correct this tonight and let you know if it fixed things.
EDIT2: the problem is resolved, after reading that article again I came to the conclusion that I wasn't "consuming" my frameTime (that is, I thought that deltaTime was equal to dt if you follow gaffer's example). Thanks for the help