gameloop question #1685
Unanswered
martinziebiker
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Hi. If you want to make FPS == TPS, put everything at |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I like Ebiten. Is it possible to run this form of gameloop:
for {
start := time.Now()
update()
draw()
time.Sleep(20*time.Millisecond - time.Since(start))
}
So that FPS == TPS but with cap?
Maybe let draw() be empty and call myDraw() inside update(). But how to get access to (screen *ebiten.Image) like in Draw() ?
Will it work?
Thank You for advice.
Beta Was this translation helpful? Give feedback.
All reactions