Hello JGO :point:
Today I’ve been constructing a Game Loop so that I can calculate some statistics of it and such 8)
Information:
The Game Loop is a thread.
Game run method layout:
public void run() {
/* Initialize Starting Times */
while (!isDestroyed()) {
/* Update Game Logic */
update();
/* Render */
render();
/* Send the thread to sleep ^_^, no calculations for it at the moment */
sleep(10L, true);
/* Calculate some statistics */
debug();
}
}
My Question is:
Where in my game thread would I call the ‘updateFPS()’ method?
Before sleeping?, before painting?, after painting?
I’ve never known this lol, and now that I’m constructing a good game thread I’d like to ^__^.
Any feedback would be helpful thanks