viewwatch: announce objects entering and leaving view while walking
Walking blind, the hard part is not "what is next to me" -- that is `/` --
but "what changed when I moved". Rounding a corner reveals a room, stepping
back hides it, a rat walks into sight behind you, and none of it is spoken.
Shift+/ cycles three modes:
settled (default) changes accumulate while moving, spoken once you have
stood still for 0.4s
always every step reports its own change
off
`settled` diffs against the state at the last ANNOUNCEMENT, not the last
step, so a long walk gives one combined summary that is a genuine net
change: something that came into view mid-walk and left again before you
stopped is not mentioned, and something visible throughout is mentioned
once. Summing per-step diffs would report both. A single step is the
degenerate case -- you are already standing still.
Arrivals and departures are deliberately asymmetric. Membership is current
FoV only (never rememberedFoV), but furniture drops out of FoV constantly
indoors as walls come between you and it, and "the bed is out of view"
every other step is noise. Arrivals are reported for every watched
category; departures only for creatures.
Terrain is unwatched by default -- water arrives dozens of tiles at a time.
Step detection polls playerActor.x/y as walltones does, so pathing, portals
and pushes are covered with no game function wrapped; the scan is a 14-tile
box and runs only on a step or a due settle, never per frame.
snapshot() and diffText() are pure and exposed so the testbed can assert
the wording and the FoV invariant directly instead of capturing speech.
34/34 testbed checks, 0 failures. Game footprint unchanged: main.lua | 1 +.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
86c71fc001
commit
973e62c8fe
@@ -55,10 +55,38 @@ the cursor away — press `Shift+]` to return to the newest.
|
||||
| Key | Action |
|
||||
|---|---|
|
||||
| `/` | Scan all eight neighbouring tiles, clockwise from north |
|
||||
| `Shift+/` | Cycle automatic announcements of what comes in and out of view |
|
||||
| `;` | Where am I — area name, in-game date and time, coordinates |
|
||||
| `Ctrl` + numpad `1`–`9` | Describe the tile in that direction without moving |
|
||||
| `Ctrl` + numpad `5` | Describe the tile you are standing on |
|
||||
|
||||
#### Announcing things as they come into view (`Shift+/`)
|
||||
|
||||
`/` tells you what is around you *now*. `Shift+/` decides how much of that
|
||||
happens by itself as you walk, cycling three settings:
|
||||
|
||||
- **View announcements when you stop** *(the default)* — changes pile up while
|
||||
you are moving and are read out once you have stood still for a moment. A
|
||||
single step reports as soon as the step lands. A ten-tile walk gives you **one
|
||||
combined summary at the end** rather than ten reports on top of each other,
|
||||
and it is a *net* change: something that came into view halfway along and went
|
||||
out again before you stopped is not mentioned.
|
||||
- **View announcements on every step** — each step reports its own change. Best
|
||||
when you are creeping along carefully; too talkative for crossing a room.
|
||||
- **View announcements off**.
|
||||
|
||||
You hear things arriving — `In view: a rat, 4 tiles north-east. barrel, 3,
|
||||
nearest 2 tiles east` — and creatures leaving: `Out of view: a rat`. Only
|
||||
creatures are reported when they leave. Furniture drops out of sight constantly
|
||||
as walls come between you and it, and being told the bed is out of view every
|
||||
other step would bury everything useful; a creature you can no longer see is
|
||||
worth knowing about.
|
||||
|
||||
These announcements are queued rather than urgent, so anything you asked for
|
||||
yourself is spoken first, and any key that acts in the game clears them.
|
||||
|
||||
Nothing outside your current field of view is ever reported.
|
||||
|
||||
The game's own examine mode (**`x`**) is also fully spoken: the arrow keys move a
|
||||
cursor around the map and each tile is described with its distance and direction
|
||||
from you. Press `f` in examine mode to jump between exits.
|
||||
|
||||
Reference in New Issue
Block a user