Skip to content

Commit e86560a

Browse files
author
DavidQ
committed
Add gameplay-safe overlay interaction controls.
PR Details: - Enables show/hide/cycle controls for gameplay overlays - Preserves shared non-Tab input mapping - Adds focused validation for non-interference with gameplay controls
1 parent a99525f commit e86560a

11 files changed

Lines changed: 289 additions & 86 deletions

docs/dev/CODEX_COMMANDS.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
MODEL: GPT-5.4-codex
1+
MODEL: GPT-5.4
22
REASONING: medium
33

44
COMMAND:
5-
Integrate overlay system into gameplay runtime:
6-
- Allow overlays to run during gameplay
7-
- Ensure no interference with controls/rendering
8-
- Preserve debug overlay behavior
5+
Create BUILD_PR_LEVEL_19_3_OVERLAY_INTERACTION_CONTROLS as the next smallest executable/testable PR.
96

10-
Package ZIP to <project folder>/tmp/
7+
Requirements:
8+
- Add gameplay-safe interaction controls for overlays introduced by Level 19.2
9+
- Support show/hide and cycle behavior in gameplay runtime
10+
- Reuse the shared overlay/input mapping; do not reintroduce hardcoded Tab behavior
11+
- Preserve existing debug overlay behavior
12+
- Add or update focused tests proving overlay controls do not interfere with gameplay controls
13+
- Keep scope narrow and testable
14+
- Do not modify start_of_day folders
15+
- Package the repo-structured ZIP to <project folder>/tmp/BUILD_PR_LEVEL_19_3_OVERLAY_INTERACTION_CONTROLS.zip

docs/dev/COMMIT_COMMENT.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
Level 19.2 gameplay overlay integration.
2-
Enable overlays during gameplay runtime without interference.
1+
Add gameplay-safe overlay interaction controls.
2+
3+
PR Details:
4+
- Enables show/hide/cycle controls for gameplay overlays
5+
- Preserves shared non-Tab input mapping
6+
- Adds focused validation for non-interference with gameplay controls
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# BUILD_PR_LEVEL_19_3_OVERLAY_INTERACTION_CONTROLS Report
2+
3+
## Purpose
4+
Add gameplay-safe overlay interaction controls for Level 19 runtime overlay extensions.
5+
6+
## Scope Applied
7+
- Added shared runtime interaction input mapping (no Tab usage).
8+
- Added overlay gameplay runtime controls for:
9+
- show/hide (`Ctrl+G`)
10+
- cycle active runtime extension (`G`, reverse with `Shift+G`)
11+
- Integrated controls into gameplay runtime scenes (`1708`, `1710`), preserving existing debug overlay cycle behavior.
12+
- Kept control execution non-blocking so overlay runtime hooks cannot break gameplay step/render.
13+
14+
## Behavior Safety
15+
- Existing debug overlay stack and cycle behavior remain unchanged.
16+
- Gameplay controls (movement/camera) continue to work while overlay controls are used.
17+
- Runtime overlay hooks are hidden/shown without affecting gameplay loop integrity.
18+
19+
## Validation
20+
- `tests/runtime/Phase17OverlayGameplayRuntimeIntegration.test.mjs` PASS
21+
- `tests/runtime/Phase17OverlayExpansionFramework.test.mjs` PASS
22+
- `tests/runtime/Phase17RealGameplaySample.test.mjs` PASS
23+
- `tests/runtime/Phase17Sample1712GameplayMetricsTelemetry.test.mjs` PASS
24+
- `tests/runtime/Phase17Sample1713FinalReferenceGame.test.mjs` PASS
25+
- `tests/runtime/Phase17TabDebugOverlayCycle1707Plus.test.mjs` PASS
26+
- `tests/runtime/Phase17DebugOverlayBottomRightPosition.test.mjs` PASS
27+
- `tests/runtime/Phase18RuntimeLayerScaffold.test.mjs` PASS
28+
- `tests/runtime/Phase18IntegrationFlowPass.test.mjs` PASS
29+
- `tests/runtime/Phase18CoreServicesSkeleton.test.mjs` PASS
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Final validation pass for overlay system after full Level 18 integration.
1+
Summary:
2+
This PR follows Level 19.2 by adding interaction controls for gameplay overlays.
3+
It keeps scope limited to a testable control layer so overlays can be shown, hidden, and cycled during gameplay without interfering with core player input.
24

3-
Confirms:
4-
- Stability
5-
- Performance
6-
- Integration completeness
7-
- Production readiness
5+
Roadmap Improvement:
6+
- Advances Level 19 from gameplay overlay availability to gameplay-safe overlay usability
7+
- Keeps the change executable and validation-backed
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
[ ] Gameplay runs normally
2-
[ ] Overlays visible in gameplay
3-
[ ] No input conflicts
4-
[ ] No render issues
1+
[ ] Gameplay sample with overlays loads
2+
[ ] Overlay show/hide control works
3+
[ ] Overlay cycle control works
4+
[ ] Gameplay controls remain responsive while using overlay controls
5+
[ ] No Tab-based overlay interaction is introduced
6+
[ ] Debug overlay behavior remains unchanged

docs/pr/BUILD_PR.md

Lines changed: 40 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,40 @@
1-
# BUILD_PR_LEVEL_19_2_GAMEPLAY_OVERLAY_INTEGRATION
2-
3-
## PLAN
4-
5-
### Purpose
6-
Integrate overlay system into gameplay layer so overlays can be used during active gameplay, not just debug/testing.
7-
8-
### Goals
9-
- Enable overlays in gameplay runtime
10-
- Maintain separation from debug overlays
11-
- Ensure no gameplay interference
12-
13-
---
14-
15-
## BUILD
16-
17-
### Scope
18-
- Hook overlay system into gameplay runtime
19-
- Allow gameplay-safe overlays
20-
- Ensure overlays do not block input or rendering
21-
- No change to debug overlays
22-
23-
### Test Steps
24-
1. Run gameplay sample
25-
2. Enable overlays
26-
3. Verify gameplay unaffected
27-
4. Cycle overlays
28-
29-
### Expected
30-
- Overlays work during gameplay
31-
- No input or render conflicts
1+
# BUILD_PR_LEVEL_19_3_OVERLAY_INTERACTION_CONTROLS
2+
3+
## Purpose
4+
Add testable interaction controls for gameplay-safe overlays introduced in Level 19.2 so overlays can be shown, hidden, and cycled without interfering with gameplay input.
5+
6+
## Scope
7+
- Define gameplay-safe overlay interaction controls
8+
- Keep debug-overlay behavior intact
9+
- Ensure overlay interaction does not steal or block primary gameplay controls
10+
- Validate control behavior in at least one gameplay-active sample
11+
12+
## Included
13+
- Interaction control contract for gameplay overlays
14+
- Runtime hookup for overlay show/hide/cycle actions in gameplay context
15+
- Tests covering non-interference with gameplay controls
16+
- Validation notes for control behavior
17+
18+
## Excluded
19+
- New overlay types
20+
- Overlay visual redesign
21+
- Mission or telemetry feature expansion
22+
- Repo-wide input cleanup
23+
24+
## Execution Notes
25+
- Use the shared input mapping established by prior overlay/input consolidation work
26+
- Preserve current non-Tab overlay cycle behavior
27+
- Keep scope to the smallest executable/testable change
28+
- Do not modify start_of_day folders
29+
30+
## Test Steps
31+
1. Load a gameplay-active sample with overlays enabled
32+
2. Trigger overlay show/hide control
33+
3. Trigger overlay cycle control
34+
4. Confirm gameplay movement/actions still work while overlay controls are used
35+
5. Confirm debug overlay behavior remains unchanged where applicable
36+
37+
## Expected Result
38+
- Gameplay overlays can be interacted with safely
39+
- Overlay controls do not interfere with core gameplay input
40+
- Existing debug overlay behavior remains stable

samples/phase-17/1708/RealGameplayMiniGameScene.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import { getRequiredLevel17OverlayStackConfig } from '/samples/phase-17/shared/o
4141
import {
4242
createOverlayGameplayRuntime,
4343
renderOverlayGameplayRuntime,
44+
stepOverlayGameplayRuntimeControls,
4445
setOverlayGameplayRuntimeExtensions,
4546
stepOverlayGameplayRuntime,
4647
} from '/samples/phase-17/shared/overlayGameplayRuntime.js';
@@ -486,6 +487,7 @@ export default class RealGameplayMiniGameScene extends Scene {
486487
this.lastCollisionCount = this.debugCollisionRows.length;
487488
this.updateFeedback(dt);
488489
this.refreshMissionFeedState();
490+
stepOverlayGameplayRuntimeControls(this.overlayGameplayRuntime, input);
489491
stepOverlayGameplayRuntime(this.overlayGameplayRuntime, {
490492
scene: this,
491493
engine,

samples/phase-17/1710/RealGameplayMiniGameScene.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import { getRequiredLevel17OverlayStackConfig } from '/samples/phase-17/shared/o
4141
import {
4242
createOverlayGameplayRuntime,
4343
renderOverlayGameplayRuntime,
44+
stepOverlayGameplayRuntimeControls,
4445
setOverlayGameplayRuntimeExtensions,
4546
stepOverlayGameplayRuntime,
4647
} from '/samples/phase-17/shared/overlayGameplayRuntime.js';
@@ -486,6 +487,7 @@ export default class RealGameplayMiniGameScene extends Scene {
486487
this.lastCollisionCount = this.debugCollisionRows.length;
487488
this.updateFeedback(dt);
488489
this.refreshMissionFeedState();
490+
stepOverlayGameplayRuntimeControls(this.overlayGameplayRuntime, input);
489491
stepOverlayGameplayRuntime(this.overlayGameplayRuntime, {
490492
scene: this,
491493
engine,

samples/phase-17/shared/overlayCycleInput.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ overlayCycleInput.js
66
*/
77
export const LEVEL17_OVERLAY_CYCLE_KEY = 'KeyG';
88
export const LEVEL17_OVERLAY_REVERSE_MODIFIERS = Object.freeze(['ShiftLeft', 'ShiftRight']);
9+
export const LEVEL19_OVERLAY_RUNTIME_TOGGLE_MODIFIERS = Object.freeze(['ControlLeft', 'ControlRight']);
910
export const LEVEL17_OVERLAY_CYCLE_LABEL = 'G/Shift+G';
1011

1112
export function isOverlayCycleReverseModifierActive(input) {
@@ -23,3 +24,16 @@ export function getOverlayCycleInputCodes({ reverse = false } = {}) {
2324
}
2425
return [LEVEL17_OVERLAY_CYCLE_KEY, LEVEL17_OVERLAY_REVERSE_MODIFIERS[0]];
2526
}
27+
28+
export function isOverlayRuntimeToggleModifierActive(input) {
29+
for (let i = 0; i < LEVEL19_OVERLAY_RUNTIME_TOGGLE_MODIFIERS.length; i += 1) {
30+
if (input?.isDown(LEVEL19_OVERLAY_RUNTIME_TOGGLE_MODIFIERS[i]) === true) {
31+
return true;
32+
}
33+
}
34+
return false;
35+
}
36+
37+
export function getOverlayRuntimeToggleInputCodes() {
38+
return [LEVEL17_OVERLAY_CYCLE_KEY, LEVEL19_OVERLAY_RUNTIME_TOGGLE_MODIFIERS[0]];
39+
}

0 commit comments

Comments
 (0)