hajimehoshi / ebiten

Ebitengine - A dead simple 2D game engine for Go
https://ebitengine.org
Apache License 2.0
10.89k stars 650 forks source link

too high FPS even with vsync on in Ebitengine but off by a hardware configuration #3009

Open hajimehoshi opened 4 months ago

hajimehoshi commented 4 months ago

Ebitengine Version

v2.7.0

Operating System

Go Version (go version)

Go 1.22

What steps will reproduce the problem?

Run a game with vsync on (ebiten.SetVsyncEnabled(true)), but vsync off by the hardware configuration

image

(The image was provided by @kyp)

What is the expected result?

FPS is the same as the refresh rate of the monitor

What happens instead?

FPS is too high

Anything else you feel useful to add?

Reported by @kyp

temidaradev commented 3 months ago

https://github.com/hajimehoshi/ebiten/assets/118509044/de6b5663-e78c-47e7-9285-cd760166fa8b

is this video same with this issue, its on Safari and there is too much FPS and unstable Fps and it get laggy when I close the vsync

temidaradev commented 3 months ago

https://github.com/hajimehoshi/ebiten/assets/118509044/ed9262b8-1200-4c88-b1da-24d9acfb9e47

and this is on Mac weird...

hajimehoshi commented 3 months ago

@lidldev do you enable vsync?

temidaradev commented 3 months ago

@hajimehoshi as you see in the videos I close and open vsync and it become normal (60 fps) then when I disable vsync my fps is going too high