Skip to content

feat(tunnel-vision): add survivor tunnel vision effect - #178

Open
TheMeinerLP wants to merge 1 commit into
refactor/overlay-foundationfrom
feat/survivor-tunnel-vision
Open

feat(tunnel-vision): add survivor tunnel vision effect#178
TheMeinerLP wants to merge 1 commit into
refactor/overlay-foundationfrom
feat/survivor-tunnel-vision

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Contributor

Summary

Adds the survivor tunnel vision effect: as a survivor's stamina drains, their field of
view narrows, driven by 32 discrete stages with hysteresis (so the overlay doesn't
flicker between adjacent stages) plus a heartbeat pulse layered on top once stamina
runs critically low.

Minecraft 26.2 has no way to switch a post-processing shader on for a single player, so
the effect is delivered as a camera_overlay rendered onto a head-slot item instead of a
shader. The vignette textures that make the overlay look correct ship separately in
cygnus-pack; this branch only wires up the rendering logic and stays off wherever
OverlayProperties reports the pack was not delivered, since without it survivors would
otherwise stare at an empty box.

/tunnelvision lets a designer freeze a single stage or run the heartbeat preview from
the lobby, so glyph sizes and pulse timing in the resource pack can be judged without
starting a round.

Stack

This PR is based on #177 (refactor/overlay-foundation) and targets that branch, not
main. It carries only the tunnel vision slice of the original mixed feat/tunnel-vision
branch — blood splatter and the slender gaze effect are split into sibling PRs.

Important: Cygnus.java wires all three effects (tunnel vision, blood, gaze) into the
same constructor and initListener() guard, so this PR conflicts with the sibling blood
and gaze PRs at that file. Whichever of the three merges second will need a rebase to
reconcile the wiring.

Test plan

  • ./gradlew test passes fully (no pre-existing failures carried over from the mixed
    branch — the two failing SlenderVisibility tests were never part of this feature)

Minecraft 26.2 has no way to switch a post-processing shader on for a single
player, so the narrowing view is delivered as a camera_overlay rendered onto a
head-slot item instead. The renderer drives 32 stages with hysteresis so the
overlay does not flicker between adjacent stages, and layers a heartbeat pulse
on top once stamina runs low.

FoodBar gains a remainingShare() getter so the tunnel vision service can read
a survivor's stamina without coupling to the experience-bar display detail.

/tunnelvision lets a designer freeze a stage or run the heartbeat from the
lobby to judge the resource pack's glyph sizes without starting a round.

The vignette textures themselves ship separately in cygnus-pack; the overlay
stays off wherever OverlayProperties reports the pack is not delivered, since
without it survivors would stare at an empty box.
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