Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

260 Neutral

About Sybalos

  • Rank

Personal Information

  • Interests
  1. Hi all, I'm having an issue when using QPC/QPF here is my code: unsigned frameNumber; unsigned lastFrameTimestamp; unsigned lastFrameDuration; float lastFrameDurationS; void InitTime() { LONGLONG time; qpcFlag = (QueryPerformanceFrequency((LARGE_INTEGER*)&time) > 0); if (qpcFlag) qpcFrequency = 1000.0 / time; } unsigned SystemTime() { if(qpcFlag) { static LONGLONG qpcMillisPerTick; QueryPerformanceCounter((LARGE_INTEGER*)&qpcMillisPerTick); return (unsigned)(qpcMillisPerTick * qpcFrequency); } else { return unsigned(timeGetTime()); } } void Timing::Update() { if(!timingData) return; if(!timingData->isPaused) { timingData->frameNumber++; } // Update the timing information. unsigned thisTime = SystemTime(); timingData->lastFrameDuration = thisTime - timingData->lastFrameTimestamp; timingData->lastFrameTimestamp = thisTime; timingData->lastFrameDurationS = timingData->lastFrameDuration * 0.001f; } When i use this to simulate some physics based animation everything work fine on my laptop and my home pc. But i tried it at my job's PC wich is more powerfull and the animation is jerky. When i use timeGetTime instead everything run smooth on every pc. I confirm that every PC that i tried support the HighRes timer. Here is how i use it: actor->m_position += (actor->m_velocity * g_pApp->GetTiming()->lastFrameDurationS); Here is the spec of the problematic PC's processor: http://ark.intel.com...-GTs-Intel-QPI). Any idea would be apreciate. Thanks.
  2. Hi all! I was wondering what would be the best approach for a simple classic 3D space shooter smooth camera movement. Games like Freelancer, DarkHorizon, SpaceForce have such a smooth camera movement controlled with the mouse. What would be the step to achieve that kind of result ? Any idea will be appreciate! I also want to understand the math behind it. I'm using c++ and directx. Thanks!
  • Advertisement

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!