0
\$\begingroup\$

I'm studying time stepping algorithm and I need to know how delta time works in libgdx, because I think delta time uses some kind of time stepping algorithm.

\$\endgroup\$
1
  • 3
    \$\begingroup\$ Did you take a look at the source? \$\endgroup\$ – Vaillancourt Jan 9 '17 at 15:41
1
\$\begingroup\$

libgdx seems, based on the source, to compute delta time with some variant of

long time = System.nanoTime();
deltaTime = (time - lastFrameTime) / 1000000000.0f;
lastFrameTime = time;

for every back-end renderer implementation. This is usually done when the renderer is ticked (the view is drawn, effectively). There doesn't appear to be any time-stepping going on.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.