Skip to content

feat(look): add player-controlled Enhanced graphics tuning - #775

Merged
nitoygo merged 6 commits into
sven-n:mainfrom
alandarev:feature/advanced-graphics-controls
Oct 18, 2026
Merged

nitoygo merged 6 commits into
sven-n:mainfrom
alandarev:feature/advanced-graphics-controls

Conversation

@alandarev

@alandarev alandarev commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Build on #716 and #766 with 19 bounded tuning sliders grouped under the four existing Enhanced feature toggles, in both Legacy and Modern options.

  • Checkbox changes on/off only; clicking the label/chevron expands controls. Groups start collapsed, with less common controls behind More settings.
  • Show units, minimum/maximum, current value and Defaults/Custom/Not saved; provide individual/group/all resets.
  • Apply choices live and save them once globally across maps/restart in [EnhancedTuning]. Untouched values inherit the shipped profile; player options never edit shared Look.json/LightMood.json.
  • Preserve personal values through Classic, feature off/on and unavailable-renderer fallback. Keep developer session edits scoped and separate from player persistence.
  • Tune shipped skill lights to 1× intensity, 1.5× radius, 4-cell radius cap and 1.4 overlap cap, based on native playtesting. Keep the public Classic default unchanged.
  • Let grading strength reach zero independently of bloom.
  • Correct the stale display-settings contract that still forbade the four feature choices already merged in Options window: game-standard tabs, per-feature Enhanced graphics, theme scrollbars #766; assert their load/save paths instead.

Expanded Dynamic lights controls, Legacy theme

Related issues

Closes #774.
Related: #715, #716, #766.

Try it

  1. Open Options → Graphics and enable Enhanced graphics.
  2. Click Dynamic lights or its arrow: sliders expand without toggling the feature.
  3. Adjust intensity/radius/cap while casting, then switch maps: the same personal choices remain active.
  4. Turn the checkbox off and on: controls retain their values and expansion.
  5. Reset one control or group to restore shipped Defaults; other preferences stay unchanged.
  6. Try the other three feature groups and both bundled themes; Classic ignores all personal Enhanced tuning.

Changes by area

  • Render/Look: control metadata, effective layering, scoped developer edits, preview/commit/reset lifecycle and accepted-feature gating.
  • Data/GameConfig: sparse validated personal preferences, bounded invalid-key diagnostics and failure-preserving writes.
  • UI/Options and RML/RCSS: four expandable groups, shared numeric rows, native pointer/keyboard integration and save feedback.
  • Data/Render/Look.json: four reviewed skill-light defaults only; existing map overrides stay intact.
  • Tests and documentation: descriptor bounds, inheritance/override/reset behavior, renderer refusal/recovery, per-frame mood coalescing, persistence failures, theme bindings and the Legacy screenshot.

No new dependency, top-level source layer, shader, packet or server feature.

Testing

  • Head 2cf25f14d, incorporating upstream bdc21f3f7 with a clean history-preserving merge: Linux build and 945 tests passed, zero failures, one explicit GPU integration skip.
  • Linux editor-enabled build and 991 tests passed, zero failures, one explicit GPU integration skip.
  • Local upstream-equivalent quality checks passed: clang-format 21.1.8 and Cppcheck 2.13.0. Contribution scan found no private tooling names or credentials.
  • Native QA verified expanded Legacy1024/Modern1024/Modern2560 readability, independent expansion/toggle behavior, focused keyboard adjustment without character movement, save failure with unchanged persisted bytes and visible Not saved, successful retry, restart, global Icarus persistence/reset, control/group/all reset isolation, and Classic/Enhanced retention. Runtime configuration was restored byte-identically and all QA clients exited. Graphics implementation is unchanged by the subsequent unrelated upstream merge.
  • Descriptor bounds, persistence, inheritance/reset, renderer refusal/recovery and per-frame mood coalescing have regression coverage; reset/refusal ordering and the obsolete display-settings contract were mutation-tested.
  • Final cross-platform CI is not green/complete. Initial fork preflight exposed an editor-enabled bundled-font test link failure on Linux/macOS/Windows. The test-only fix uses the same application glue as existing UI scaling tests and retains every assertion; both local build flavors pass. Fresh fork CI was started for this head, then cancellation was requested so this draft could be submitted without waiting. Fork verification PR #13, CI, Fork CI, editor matrix. This is explicitly a draft, not a merge-readiness claim.

Draft limits / remaining verification

This is not a claim of complete graphics acceptance: Legacy wide-layout coverage, full native endpoint/invalid-key/dependency/timing coverage, comparative graphics videos and Classic/UI pixel-identity evidence remain open. Legacy1024 and Modern1024/2560 expanded readability plus native restart/save-failure lifecycle were tested. Temporary developer $lightmood overrides are separate from the persisted player-strength row. Unsupported renderer effects retain preferences without applying them; recovery is attempted on the next feature/preset apply or restart.

Checklist

  • I have read and followed docs/CODING_RULES.md.
  • I have built the project locally.
  • Changes are focused on one concern.
  • Final cross-platform CI is green (incomplete; disclosed above).
  • Remaining graphics acceptance is complete (kept open while this PR is a draft).

Written with AI assistance and tested by hand.

Use the same Winmain.cpp glue as the UI scaling tests, including editor builds. Remove duplicate test-owned mouse globals instead of adding partial application stubs. Font assertions are unchanged; all 988 editor and 942 normal tests pass with one GPU skip per suite.
@alandarev
alandarev marked this pull request as ready for review October 17, 2026 20:12
# Conflicts:
#	tests/ui/test_display_settings_contract.cmake
- A focused tuning slider owns the keys like a text field: only the
  options window gets them (RmlUiRuntime::GetKeyOwningDocument(), for any
  element marked data-takes-keys), so Home no longer toggles MU Helper and
  Page Up/Down no longer scroll the chat while a slider moves; Escape
  still closes the window. A press outside RmlUi releases the slider.
- The gauge keys (arrows, Page Up/Down, Home/End) are decoded by
  UI::RmlBridge::LevelGaugeKey(), which ApplyLevelGaugeEvent() also uses.
- A save writes only the keys it changes, into the file as it is then:
  unknown keys, comments and another client's values survive. A section
  after a UTF-8 BOM is read and updated in place.
- The spell-light defaults stay as main has them (gain 2.5, range 3,
  max 8, cap 2.5); changing what every Enhanced player sees belongs in its
  own change.
- The Mood slider shows a developer's session strength and locks with
  its own reason; $look save clears the developer edit marks, so the
  player's values apply over the saved file values again.
- The tuning sliders are the volume gauge in each theme: the legacy
  volume art with its fill cropped to the value, modern's rail and fill.
- A row's Reset is hidden while it follows the defaults; the screenshot
  in docs/images is gone.
- $bench records the player's tuning (Enhanced tuning in the report,
  enhancedTuning in run.json).
@nitoygo
nitoygo merged commit d46767f into sven-n:main Oct 18, 2026
3 checks passed
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.

Player-controlled Enhanced graphics tuning

2 participants