Skip to content

Adventure Arena: tappable prose links, no chapters, optional drop caps, no compass - #70

Merged
corepunch merged 2 commits into
mainfrom
adventure-arena-reader-links
Sep 29, 2026
Merged

corepunch merged 2 commits into
mainfrom
adventure-arena-reader-links

Conversation

@corepunch

Copy link
Copy Markdown
Owner

Depends on corepunch/zilscript#82 — this branch pins the zilscript submodule to that PR's commit (0161b78). Merge it first, then re-pin to the merge commit if it is squashed.

What changes

# Request Result
1 Prose gives away what must be examined Sanitarium's drawing, cabinet, serum label and ledger are revealed by examining them (zilscript PR)
2 go back / walk back Works in every story, from the bootstrap (zilscript PR)
3 Drop "Chapter" Rooms are scenes named for the room; no numbering in the page, running head, Library, accessory or saves
4 Optional drop cap Drop Caps toggle in Themes & Settings, persisted, default on
5 Remove the compass Off the reader's page; the command field fills the bar. Compass.etlua and CompassGesture are kept and still tested
6 Tappable words Links authored in the story's prose, ruled with a dashed underline, open a native menu of actions

Framework: <Hyperlink> in <Paragraph>

<Paragraph text="A corroded brass plaque hangs askew on the gate.">
  <Hyperlink location="11" length="12" label="plaque">
    <MenuItem title="Examine plaque" action="examinePlaque" />
  </Hyperlink>
</Paragraph>
  • UIKit: a tagged text item (UITextItemTagAttributeName); the text view presents the menu itself on tap.
  • AppKit: an NSLinkAttributeName run; a click pops up an NSMenu under the words.
  • Links follow the typewriter reveal, skip a dropped initial, and are replaced in place by a retained template (updateRecords).
  • Shared link model and bridge: src/shared/paragraph_links.m.

App

  • Session.parseLinks strips [[label->target]] markup into per-paragraph links; Session:linkActions offers "examine" plus the story's verbs for the object (those needing no second object), or the walk for a direction.
  • Links are live only in the scene the reader stands in; the words of rooms left behind are plain prose.

Verification

  • make test: 197 test files pass (2 new: paragraph_links, adventure_arena_links).
  • iPhone 17 simulator: opened Sanitarium, tapped "brass plaque", chose Read plaque from the menu; checked Paper and Night, drop caps on and off.
  • Not checked visually: the AppKit menu popup on macOS (covered headlessly only), and iPad.

Notes

  • Saves made before this change replay their commands against the new prose, so a Sanitarium save that took the scalpel without examining the cabinet will replay differently.
  • Only Sanitarium's opening rooms carry links so far.

🤖 Generated with Claude Code

corepunch and others added 2 commits September 29, 2026 15:04
…s, no compass

Paragraph takes <Hyperlink> children: runs of text ruled with a dashed
underline that open a native menu of <MenuItem>s when tapped (a tagged
text item on UIKit, an NSLink run with an NSMenu on AppKit).

The reader parses the story's [[label->target]] markup into links, live in
the scene the reader stands in, offering examine plus the verbs the story
accepts for the object, or the walk for a direction. Rooms are no longer
numbered as chapters, Drop Caps is a reading setting, and the compass is
off the reader's page so the command field fills the bar.

zilscript: prose links, GO BACK, and Blackwood Horror descriptions that
withhold what must be examined.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@corepunch
corepunch force-pushed the adventure-arena-reader-links branch from 4d39ff2 to 6f198be Compare September 29, 2026 13:04
@corepunch
corepunch merged commit 958a7c7 into main Sep 29, 2026
@corepunch
corepunch deleted the adventure-arena-reader-links branch September 29, 2026 13:07
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