Skip to content

Frame Time Question - ebiten.CurrentFPS() accurate? #2061

Answered by tinne26
SolarLune asked this question in Q&A
Discussion options

You must be logged in to vote

So, responding to your expectations:

  1. Yes, the game takes 16ms to process each Update, but it will always call Draw after updates are done. See the GLFW main loop function at ui/context#L107. There's no conditional to call Draw, no additional timing check there. After updating, Ebiten always makes the game draw.
  2. I don't understand. This being the case? What being the case? When FPSMode is FPSModeVsyncOffMaximum, the only difference is (as far as I understand) that draws / buffer swaps won't block. If the game is taking too much time on Update, you can't call Draw faster anyway, as the calls are not done concurrently. And in fact, depending on the exact moment at which Update calls end, yo…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@tinne26
Comment options

@SolarLune
Comment options

@tinne26
Comment options

@hajimehoshi
Comment options

@SolarLune
Comment options

Answer selected by SolarLune
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants