fastjengine / FastJ

An open-source, Java-based 2D game engine.

Home Page:https://fastj.tech

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: gameloop's first delta time is far too big

lucasstarsz opened this issue · comments

What happened?

see title

How to Reproduce the Error

Read the value of `FastjEngine#getDeltaTime` on the first cycle of the game loop.

GameLoop gameLoop = ...;
GameLoopState readBadDelta = new GameLoopState(CoreLoopState.Update, 1, (gameLoopState, deltaTime) -> FastJEngine.log("{}", deltaTime));
gameLoop.addGameLoopState(readBadDelta);
gameLoop.run;

FastJ Version

snapshot (please specify below), other (please specify below)

Specific FastJ Version

latest commit

Java Version

Java 16

Relevant Exceptions/Log Output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct