Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualKaptein

Posted 05 September 2013 - 05:36 PM

dt always means delta-time, which is the time spent last frame

so, each time you accumulated more than mStepSize time, you integrate (or simulate if you will)

 

it's hard to say why your scene is slow, since if you provided real time to the function, it would just integrate each and every time forever

you are missing a while loop though

 

while (mAccumulator >= mStepSize)
{
    mAccumulator -= mStepSize;
    mScene->simulate(mStepSize);

}

 

throw that boolean return value to the fishes

 

anyways, the fix might just be to reduce mStepSize and all will be well


#2Kaptein

Posted 05 September 2013 - 05:35 PM

dt always means delta-time, which is the time spent last frame

 

so, each time you accumulated more than mStepSize time, you integrate (or simulate if you will)

 

it's hard to say why your scene is slow since if you provided real time to the function, it would just integrate each and every time forever

you are missing a while loop though

 

while (mAccumulator >= mStepSize)
{
    mAccumulator -= mStepSize;
    mScene->simulate(mStepSize);

}

 

throw that boolean return value to the fishes

 

anyways, the fix probably is just to reduce mStepSize and all will be well


#1Kaptein

Posted 05 September 2013 - 05:31 PM

dt always means delta-time, unless in variable framerate, in which dt is a factor

in fixed:

position.xyz += speed.xyz;

in variable:

position.xyz += speed.xyz * dt;


PARTNERS