Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


floats and updates serious problem

This topic is 6195 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, some of my update routines for frame cycling and movement update used DWORD comming out from a call to "LastTime - timeGetTime()"; but just today I changed all this routins to used FLOATs "(LastTime - timeGetTime())*0.001f) because I''m using another aproach for smooth movement. The problem is that for example: void CBaseSprite::CycleFrame(float* _pfElapsedTime) { if ( (*_pfElapsedTime) >= m_fAnimInterval) { if (FCurrentAnimation->Order == NULL) FFrameNbr++; ... As you can see, every time the elapsed time goes over the frame time interval, the frame is changed; however, when my program is in free running it takes years to change the FFrameNbr property, but if I''m going step by step things work OK. m_fAnimInterval its equal to 0.060f (60 ms), so I''m sure that I''m not comparing against incredible high values, as it looks on free-running. So, What is going on here!!!??????? /\ /__\ C.Z. Hagen

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!