Skip to content

Commit

Permalink
set max 60 ticks per second
Browse files Browse the repository at this point in the history
Makes sure animation doesn't run too fast on high-refresh-rate displays.
  • Loading branch information
nhanb committed Sep 30, 2023
1 parent d6f9409 commit a060156
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ func main() {

DurationTillHungry = time.Duration(secondsUntilHungryFlag) * 1_000_000_000

ebiten.SetTPS(60)
ebiten.SetWindowPosition(xFlag, yFlag)
WindowWidth = SPRITE_X * sizeFlag
WindowHeight = SPRITE_Y * sizeFlag
Expand Down

0 comments on commit a060156

Please sign in to comment.