Skip to content

Harden Guitar Hero live note tracking in V8 - #145

Merged
ProhibitedTV merged 9 commits into
mainfrom
fix/guitar-hero-gameplay-v8
Sep 6, 2026
Merged

ProhibitedTV merged 9 commits into
mainfrom
fix/guitar-hero-gameplay-v8

Conversation

@ProhibitedTV

Copy link
Copy Markdown
Owner

Live failure

V7 finally completed the entire boot/setup/menu path and launched a real Guitar Hero song, but the first gameplay attempt failed almost immediately and looked like random button mashing.

The current gameplay detector explains that behavior: it selects each colored fret receptor independently from any same-colored contour in the lower screen, while a live concert stage contains abundant green/red/yellow/blue/orange scenery and lighting. It then fires from a broad color-density strip tens of pixels above the chosen point. A bad receptor pick therefore becomes a stream of false fret presses, and even a good pick can be triggered much too early.

V8 fix

  • keep V7's now-proven first-run/menu lifecycle unchanged
  • replace gameplay vision with a joint five-receptor geometry solver
  • require green/red/yellow/blue/orange candidates to form one ordered, roughly equally-spaced common row
  • remove the old per-lane hard-coded expected-X bias
  • require repeated agreement before locking receptor geometry
  • use the lock only while at least three current lanes still support it, so remembered gameplay geometry cannot turn menus/results into gameplay
  • detect notes as components approaching their own locked receptor lane
  • emit a fret hit only inside a narrow arrival zone immediately above the receptor instead of from the old wide early strip
  • preserve existing chord/hold/rearm runtime semantics
  • increase the non-blocking fret hold to 40 ms so PCSX2 sees each press for multiple 60 Hz frames
  • disable whammy during the first timing soak so base fret timing can be evaluated without extra controller activity
  • add highway-lock / lock-support / per-lane note-gap telemetry

Regression coverage

Synthetic concert-highway tests prove that V8:

  • locks the true five-receptor row despite same-color stage clutter
  • does not fire a distant note early
  • fires only the lane whose note enters the arrival zone
  • does not let remembered receptor geometry classify stage clutter as gameplay
  • drives the correct DualShock fret action through the active V8 profile
  • exports V8 through the registry and package alias

Evidence boundary

This addresses the obvious structural cause of the toddler-like first gameplay run. The remaining live variable is the exact GH1 timing window; note_trigger_gap is intentionally exposed in config and telemetry so the next retained song can tune one meaningful timing parameter instead of guessing across the whole detector.

@ProhibitedTV
ProhibitedTV merged commit 02f0b0f into main Sep 6, 2026
2 checks passed

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

Copy link
Copy Markdown

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: 51cbe85b27

ℹ️ 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".

cy = int(center[1] * h)
xhalf = max(5, int(w * self.note_lane_half_width))
y0 = max(0, cy - int(h * self.note_lookahead))
y1 = max(y0 + 1, cy - int(h * self.note_receptor_exclusion))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Exclude the full receptor from the arrival ROI

When a colored receptor extends more than note_receptor_exclusion above its detected center, this upper bound leaves part of the receptor itself inside the note ROI. With the shipped 480px height, the exclusion is only about 4px; even the test fixture's 11px-radius receptors leave a large colored cap in the ROI whose area exceeds note_min_area, producing a zero/near-zero gap and an arrival strength of 1 with no note present. Consequently the detector can emit an all-five-lane chord and keep every lane disarmed, preventing subsequent real notes from firing; the ROI needs to exclude the receptor's actual contour rather than a fixed 4px strip.

Useful? React with 👍 / 👎.

Comment on lines +188 to +190
if self._locked_centers is None:
self.lock_support = 0
return centers, confidence

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Gate gameplay output until the receptor lock completes

Before _candidate_streak reaches receptor_lock_frames, this returns the raw centers and confidence unchanged, and analyze() immediately computes arrivals and gameplay confidence from them. With the shipped thresholds, a single frame at the 0.80 lock threshold becomes 0.80 * 0.94 = 0.752, exceeding the 0.64 gameplay threshold, so a transient stage-colored layout can take gameplay ownership and press frets on its first frame despite the stated three-frame agreement requirement. Return non-gameplay confidence/no usable centers until the lock is established.

Useful? React with 👍 / 👎.

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