Skip to content

Feature/engine fix#71

Merged
manix84 merged 4 commits into
mainfrom
feature/engine-fix
May 30, 2026
Merged

Feature/engine fix#71
manix84 merged 4 commits into
mainfrom
feature/engine-fix

Conversation

@manix84
Copy link
Copy Markdown
Owner

@manix84 manix84 commented May 30, 2026

This pull request introduces support for storing and syncing high score timing settings (gameSpeed and renderFps) in both local and server high score records. It also improves normalization and validation of these settings throughout the codebase and updates tests to cover these changes. Additionally, the terminology around simulation and rendering tick rates is clarified, and related constants are refactored for consistency.

High Score Settings Support:

  • Added settings (containing gameSpeed and renderFps) to high score submissions, server-side storage, and API responses. This includes schema changes, normalization, and validation on both client and server. [1] [2] [3] [4] [5] [6]
  • Updated high score tests to verify correct handling and syncing of timing settings.

Tick Rate and Timing Terminology:

  • Standardized terminology from "fps" to "Hz" for simulation tick rate throughout documentation, code, and UI strings, clarifying that simulation and rendering are independently capped. [1] [2] [3]
  • Refactored timing constants from gameFps to gameTickRate for clarity and consistency. [1] [2] [3] [4]

User Options Normalization:

  • Improved normalization and validation of persisted gameSpeed and renderFps options to ensure only supported values are used, with comprehensive tests for edge cases. [1] [2] [3]

Test and Mock Updates:

  • Updated mocks and test helpers to include new timing settings and tick rate methods, ensuring test coverage for the new logic. [1] [2] [3] [4] [5]

Other:

  • Bumped the package version to 27.0.0 to reflect these breaking and additive changes.

Copilot AI review requested due to automatic review settings May 30, 2026 22:48
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 34d37a89a2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/game/index.ts
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds timing settings (gameSpeed, renderFps) to gameplay options and high-score sync/storage, while clarifying fixed simulation tick terminology across the app.

Changes:

  • Adds timing constants, option normalization, menu controls, and ticker reconfiguration for game speed and render FPS.
  • Persists timing settings in local/server high scores and includes them in high-score integrity.
  • Updates terminology, translations, tests, and package version.

Reviewed changes

Copilot reviewed 29 out of 30 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
WHATSNEW.md Updates simulation/rendering terminology.
README.md Clarifies fixed-step simulation and capped rendering.
package.json Bumps package version.
package-lock.json Syncs lockfile version metadata.
server/high-score-server.mjs Adds server-side high-score settings storage/normalization.
src/App.tsx Updates displayed timing terminology.
src/components/UpdateOverlay.tsx Renames local FPS constant for clarity.
src/game/game-timing.ts Defines tick rate, timing options, defaults, and normalizers.
src/game/engine/Ticker.ts Adds fixed-step scheduling and runtime FPS setters.
src/game/index.ts Wires timing options into tickers and high-score records.
src/game/high-scores.ts Persists and syncs high-score timing settings.
src/game/user-options.ts Persists and normalizes timing user options.
src/game/types.ts Extends types for ticker setters, timing options, and high-score settings.
src/game/menus.ts Adds FPS and game-speed sliders.
src/game/achievements.ts Renames tick-rate constant usage.
src/game/i18n/en.ts Adds English timing menu labels.
src/game/i18n/de.ts Adds German locale timing keys.
src/game/i18n/es.ts Adds Spanish locale timing keys.
src/game/i18n/fr.ts Adds French locale timing keys.
src/game/i18n/it.ts Adds Italian locale timing keys.
src/game/i18n/nl.ts Adds Dutch locale timing keys.
src/game/i18n/ro.ts Adds Romanian locale timing keys.
src/game/__tests__/user-options.test.ts Covers timing option defaults and normalization.
src/game/__tests__/high-scores.test.ts Covers high-score settings persistence/sync.
src/game/__tests__/time-pilot.test.ts Updates engine tests for timing settings and thresholds.
src/game/__tests__/context-modules.test.ts Updates ticker mocks.
src/game/__tests__/achievements.test.ts Updates tick-rate references and ticker mocks.
src/game/engine/__tests__/engine.test.ts Adds fixed-step ticker coverage.
src/game/menus/__tests__/menus.test.ts Updates menu navigation and timing slider coverage.
src/game/systems/__tests__/systems.test.ts Updates ticker mocks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread server/high-score-server.mjs
Comment thread src/game/high-scores.ts
@manix84 manix84 enabled auto-merge (squash) May 30, 2026 23:00
@manix84 manix84 merged commit 1132d8d into main May 30, 2026
4 checks passed
@manix84 manix84 deleted the feature/engine-fix branch May 30, 2026 23:05
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.

2 participants