Skip to content

Commit

Permalink
Add comment that fixed timestep is completely optional
Browse files Browse the repository at this point in the history
  • Loading branch information
yutotakano committed Aug 10, 2024
1 parent f5d79ee commit 11eefdf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Game.hs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ targetFPS = 60
-- There is added functionality to make sure the game runs at a consistent speed
-- (targetFPS) so that the game speed is not tied to the speed of the computer
-- running it. This is called a "fixed timestep" game loop. It is implemented by
-- delaying the thread when we are faster than the target FPS.
-- delaying the thread when we are faster than the target FPS. It's optional,
-- and you can strip it out if you want to! (in which case, just enter the
-- inner do-block directly and remove all logic around `nextFrameTick`)
gameLoop :: SDL.Renderer -> GameState -> IO ()
gameLoop renderer gamestate = do
-- Get the current time since game start in milliseconds
Expand Down

0 comments on commit 11eefdf

Please sign in to comment.