Skip to content

performance: adaptive polling#4

Merged
epic-64 merged 10 commits intomainfrom
performance-adaptive-polling
Nov 19, 2025
Merged

performance: adaptive polling#4
epic-64 merged 10 commits intomainfrom
performance-adaptive-polling

Conversation

@epic-64
Copy link
Owner

@epic-64 epic-64 commented Nov 19, 2025

Introduce two FpsModes, Realtime and Performance.

  • In Realtime mode, we run at 30 fps (this was previously the default)
  • In Performance mode, we block until the next input (0 fps).

The game now always runs in performance mode, with one exception: an active puzzle is running and the remaining time is updated in real time.

So we can go from this:
sc8

To this:
sc9

The performance mode introduced numerous bugs that required adding several new flags, namely:

  • BinaryNumbersGame.needs_render (to force render updated info in some cases where changes were not picked up in performance mode)
  • BinaryNumbersPuzzle.skip_first_dt (to prevent game timer to skip ahead when the game was previously in performance mode - it would create giant dts)

@epic-64 epic-64 merged commit d05c750 into main Nov 19, 2025
@epic-64 epic-64 deleted the performance-adaptive-polling branch November 19, 2025 17:34
@epic-64
Copy link
Owner Author

epic-64 commented Nov 19, 2025

Forgot to enable squashing 😭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant