Ebitengine Version
9b968a8
Operating System
Go Version (go version)
go version go1.26.0 darwin/arm64
What steps will reproduce the problem?
Run this program
package main
import (
"github.com/hajimehoshi/ebiten/v2"
)
type Game struct{}
func (e *Game) Update() error {
println(ebiten.Tick())
return nil
}
func (e *Game) Draw(screen *ebiten.Image) {
}
func (e *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
return 640, 480
}
func main() {
_ = ebiten.RunGame(&Game{})
}
and minimize the app
What is the expected result?
Ticks are printed 60 times per second
What happens instead?
Ticks are printed but more slowly than 60 times per second
Anything else you feel useful to add?
The behavior is pretty flaky. For example, inserting a println in the Ebitengine itself changed the behavior.
Now Update is invoked based on the frames, we might have to call it in a separate goroutine.
Ebitengine Version
9b968a8
Operating System
Go Version (
go version)go version go1.26.0 darwin/arm64
What steps will reproduce the problem?
Run this program
and minimize the app
What is the expected result?
Ticks are printed 60 times per second
What happens instead?
Ticks are printed but more slowly than 60 times per second
Anything else you feel useful to add?
The behavior is pretty flaky. For example, inserting a println in the Ebitengine itself changed the behavior.
Now
Updateis invoked based on the frames, we might have to call it in a separate goroutine.