Add named Marks and cross-room NPC pathfinding

- Mark: a debug non-collidable named destination (pixel-art target icon),
  editor tool + name modal, globally-unique names, programmatic Room:addMark
- NPCs walk to Marks: each RGB copy is a per-room resident (like the player),
  running its own A* on its own colour layer, transferring rooms as it crosses
  seams; rendered and collided by the room it currently stands in
- Player copies are obstacles in NPC pathfinding
- A* is footprint-aware for multi-cell NPCs
- Editor: click an NPC to open a filterable destination picker
- Ink: Dialogue.open binds walk_to; Jorge can be sent to "end"/"begin"
- Fix: a blocked NPC now replans each tick and resumes instead of freezing
- [npc] move diagnostics under DEBUG (start/goal/route or block reason)
- Docs (adding-npcs) + CLAUDE.md LÖVE 11.x/float-colour corrections
- Fix test harness loadSprite stub; movement tests green (28)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Your Name 2026-08-21 15:56:53 -04:00
parent ad405ed590
commit c348b81a93
17 changed files with 2755 additions and 43 deletions

View file

@ -26,9 +26,15 @@ local function advance()
selected = 1
end
function Dialogue.open(book)
-- `bindings` (optional) is a {name = function} table wired in as Ink external
-- functions before the story starts, so a book can call e.g. `~ walk_to("gate")`
-- to drive game state. Dialogable supplies these per talker (see dialogable.lua).
function Dialogue.open(book, bindings)
if story then return end -- already talking: ignore repeat bumps
story = narrator.init_story(book)
if bindings then
for name, fn in pairs(bindings) do story:bind(name, fn) end
end
story:begin()
advance()
end