Skip to content

Open up the room behind the merch booth and put Spencer at the back of it - #119

Merged
JacobDChamberlain merged 5 commits into
mainfrom
booth-back-room-npc
Sep 19, 2026
Merged

JacobDChamberlain merged 5 commits into
mainfrom
booth-back-room-npc

Conversation

@JacobDChamberlain

Copy link
Copy Markdown
Owner

The room

The walkable area used to stop a few steps behind the spawn point (z: 9). It now runs back to z: ~29, with side walls, a far wall and a floor that covers it, so walking away from the booth reads as a long dark venue instead of an open void. Fog pushed from [14, 30] to [16, 44] to match. Room dimensions live in one new file, boothSpace.js.

Spencer

A figure at the far end you can walk up to and talk to: reticle + E (or a click in orbit mode) opens a dialogue box that types itself out with a garbled voice blip per character (garble() in boothAudio.js, same synth approach as the footsteps — no audio files). It doesn't pause the game the way a product panel does: you stay pointer-locked, E / Enter / Space / click finishes the line and then closes it, and walking off ends it. He's solid, and lit by one dim lamp so he resolves out of the fog as you approach.

He says one line per visit, picked fresh — measured over 4000 rolls: ~13% he asks for your ID, ~15% he has to get back to Charlie's, ~6% something else is using his mouth, otherwise a bark, never the same line twice running. Everything he says is three arrays at the top of BoothDialogue.js.

The model auto-fits to ~1.85 units with its feet on the floor whatever its scale or orientation, so swapping him out is a filename change. Without a model file, a plain silhouette stands in and the interaction still works.

Asset weight

The raw scan was 21.4MB (2K normal + 2K base color + a 4096 metallic-roughness, all PNG). Shipped at 2.27MB, same texture resolution, via gltf-transform optimize — WebP textures, MR map down to 2K, mesh quantization. Both extensions it needs (EXT_texture_webp, KHR_mesh_quantization) are read natively by three.js, no decoder files. Verified rendering through this repo's own three build before committing. The command is written down in public/models/README.md for the next one.

Pointer-lock fix

Pressing Esc and then clicking to resume threw Pointer lock cannot be acquired immediately after the user has exited the lock. three-stdlib's controls.lock() calls requestPointerLock() and drops the promise it returns, so Chrome's cooldown rejection had nobody to catch it. WalkControls owns locking now: it waits out the ~1.25s cooldown (still inside the 5s window a click grants) and catches its own rejection. drei's click-to-lock is pointed at a selector matching nothing — leaving the prop off binds it to every click in the document. Esc also ends a conversation now, and keys the dialogue consumes are latched so the press that dismisses a line can't also re-open it or fire a jump.

Testing

react-scripts build clean (only the pre-existing Footer.js unused-import warnings). Model load, auto-fit, orientation and the compressed file were each verified rendering through node_modules/three. The Esc → click-to-resume path was reviewed against three-stdlib and drei source but exercised in Jacob's dev server, not mine.

🤖 Generated with Claude Code

JacobDChamberlain and others added 5 commits September 19, 2026 01:17
The walkable area used to stop at z=9, a few steps behind the spawn point.
The room now runs back to z=30 with side and far walls (and a floor that
covers it), so walking away from the booth reads as a long dark venue
instead of an open void. Fog pushed out to match.

Standing at the far end is a figure you can walk up to and talk to: reticle
+ E (or a click in orbit mode) opens a dialogue box that types itself out
with a garbled voice blip per character. It doesn't pause the game — you
stay pointer-locked, E/Enter/click advances, and walking off ends it.

Drop frontend/public/models/booth-npc.glb to give him a body; any scale or
orientation works (auto-fitted to ~1.85 units, feet on the floor). With no
file there a plain dark silhouette stands in so the interaction still works.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The scan loads, auto-fits to 1.85 units with his feet on the floor, and
natively faces +Z — which is what the group's rotation.y = PI expects, so
he's looking back at whoever walks up from the booth. Collider widened a
little for the fighting stance, and the placeholder dialogue rewritten to
suit a guy standing in the dark with his fists up.

Compressed 21.4MB -> 2.27MB at the same texture resolution (WebP + mesh
quantization, 4K metallic-roughness map down to 2K); both extensions load
natively in three.js. The raw scan is NOT in the repo — see the note in
public/models/README.md before adding another one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Fixed five-line script replaced with pools. Each time you walk up he gets a
fresh 2-3 barks, a 1-in-4 chance of asking for your ID right after the
opener, and a 1-in-3 chance of closing with "gotta get back to charlie's".
He won't open with the same line twice in a row.

Adding more is just adding strings to BARKS / ID_BITS / SIGNOFFS.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Charlie's is the bar he works the door at, not a guy — reworded the one
sign-off that read like a person was waiting on him.

The minotaur line goes in with the regular barks. The clone plea is its own
pool at a 1-in-12 chance, dropped in mid-conversation rather than as an
opener, so he comes out of it and carries on like nothing happened.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Spencer says one thing now. E / enter / space / click finishes the line if
it's still typing, and the next press closes the box — walk up again for
another. The multi-line script became a weighted single pick: ~12% ID bit,
~15% sign-off, ~6% the clone, otherwise a bark, never the same line twice
running.

Esc out of a conversation now ends it, since losing the lock closes the box.

The crash: three-stdlib's controls.lock() calls requestPointerLock() and
drops the promise it returns, so Chrome's "cannot be acquired immediately
after the user has exited the lock" rejection had nobody to catch it. We own
locking now — the request waits out Chrome's ~1.25s cooldown (still inside
the 5s a click buys) and catches its own rejection. drei's click-to-lock is
pointed at a selector that matches nothing, because leaving it off binds it
to every click in the document.

Also latched E and Space while he's talking: the press that dismisses a line
can't also re-open it or launch a jump until you let go.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@JacobDChamberlain
JacobDChamberlain merged commit f4e8414 into main Sep 19, 2026
1 check passed
@JacobDChamberlain
JacobDChamberlain deleted the booth-back-room-npc branch September 19, 2026 07:06
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