From 1573e4e5533ecd4eeba3c13f32f04f27cbb32e23 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Thu, 15 Oct 2026 14:34:36 +0200 Subject: [PATCH] Cap a fresh install at vanilla's 120 frames per second (#271) Without an options.txt the game ran unlimited (260), while an options.txt without maxFps, like vanilla, gives 120. With VSync off (or rendering offscreen) that kept a core busy drawing frames nobody sees. Co-Authored-By: Claude Opus 5.5 --- crates/horizon-client/src/settings.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/crates/horizon-client/src/settings.rs b/crates/horizon-client/src/settings.rs index d232b8dd2..5e25e9679 100644 --- a/crates/horizon-client/src/settings.rs +++ b/crates/horizon-client/src/settings.rs @@ -194,8 +194,9 @@ impl Default for Settings { gui_scale: 0, view_bobbing: true, gamma: 0.5, - // Vanilla defaults to 120; Horizon runs unlimited unless capped. - max_fps: 260, + // Vanilla's default, as for an options.txt without the key: a + // capped frame rate leaves the cores idle when VSync is off. + max_fps: 120, vsync: true, fullscreen: false, smooth_lighting: true, @@ -608,6 +609,16 @@ mod tests { assert_eq!(again.keys.get("key.jump"), "key.keyboard.j"); } #[test] + fn no_options_txt_paces_frames_like_an_empty_one() { + let (fresh, empty) = (Settings::default(), Settings::parse("")); + assert_eq!(fresh.max_fps, 120); + assert_eq!(fresh.max_fps, empty.max_fps); + assert_eq!(fresh.vsync, empty.vsync); + assert_eq!(fresh.inactivity_fps_limit, empty.inactivity_fps_limit); + assert_eq!(fresh.render_distance, empty.render_distance); + assert_eq!(fresh.simulation_distance, empty.simulation_distance); + } + #[test] fn subtitle_options() { let s = Settings::parse("showSubtitles:true\nnotificationDisplayTime:2.5\n"); assert!(s.show_subtitles);