[GH-ISSUE #4618] [Issue]: Make queued navigation explicit: step-by-step and fast travel modes #2523

Closed
opened 2026-10-21 05:49:30 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @thetopham on GitHub (Aug 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4618

Originally assigned to: @thetopham on GitHub.

Summary

Game Mode and Roleplay need one simple, shared navigation contract. The original behavior was step-by-step travel through attached or adjacent nodes. Newer queued and instant-travel behavior was layered on top, and the two semantics now conflict across map clicks, CYOA choices, typed actions, and other submit paths.

Users may want both traversal styles, so travel mode should be explicit instead of inferred from whichever movement path handled the action.

Proposed behavior

1. Select a travel mode

  • Step-by-step (default): travel only to the next validated attached or adjacent node.
  • Fast travel: validate the complete route and travel directly to the selected destination in one narrative turn.

Selecting a destination only creates or updates a pending route. It must not silently generate a turn or mutate the narrative location.

2. Inject one canonical movement event

When the next accepted narrative action is submitted, the server adds a movement event that both Game Mode and Roleplay can understand:

<movement_this_turn>
From: Spiral Forecourt
To: Floor 1 - Verdant Foundations
Route target: Floor 5 - Horned Warden's Court
This movement is canonical. Narrate the travel and arrival, then resolve the
selected or typed action. Do not produce another location change.
</movement_this_turn>

In step-by-step mode, To is the next attached node and Route target remains the selected destination. In fast-travel mode, To is the selected destination.

3. Consume movement consistently

  • Typed text and CYOA choices use the same movement-aware submit pipeline.
  • A successful turn advances or clears the pending route according to the selected mode.
  • Failed requests leave the route available for retry.
  • Exactly one validated location change may occur per accepted turn.
  • The assistant must not invent a second movement after the canonical event.
  • Non-travel actions do not accidentally consume or bypass the route.
  • Step-by-step and fast travel must both respect one-way links.
  • An unreachable assistant move directive must not create a link or upgrade an existing link.
  • Discovering a hidden path may create a link only as an explicit discovery mutation with a defined direction.
  • Narrative movement must never silently convert an incoming or outgoing one-way link into a bidirectional link.

The current spatial state resolver can call addAvailableLink(...) with bidirectional: true when an assistant move or exact location guidance targets a known but unreachable location. The unified movement contract must remove that fallback from ordinary movement and keep discovery as a separate, explicit map mutation.

Current problem

  • Game Mode still has legacy pendingMapMove state alongside hierarchical pendingSpatialTransition.
  • GameSurface.handleChoiceSelect sends CYOA choices directly with sendMessage, bypassing the movement-aware path used by typed input.
  • The prompt exposes current location and history but not a distinct canonical From to To event, so the GM can resolve the action at the wrong location or add another movement.
  • Step-by-step attached-node travel and fast or route travel are not represented as an explicit user-selected mode.

Scope

Preserve map generation, hierarchical World Maps, attached-node validation, and lorebook attachments. Simplify the navigation orchestration and make the movement event the single contract shared by Game Mode and Roleplay.

Acceptance criteria

  • The UI exposes an explicit travel mode for a queued destination, defaulting to step-by-step.

  • Both modes produce the same movement_this_turn contract with different validated From and To values.

  • CYOA, typed Game Mode input, and typed Roleplay input behave identically when a route is queued.

  • The server owns route validation, one-step or fast resolution, atomic state commit, and route advancement.

  • Directed links are enforced in both travel modes, and an unreachable assistant move cannot mutate link direction or availability.

  • Tests cover adjacent step travel, multi-node step travel, fast travel, one-way route acceptance and rejection, unreachable assistant movement, explicit hidden-path discovery, CYOA submission, typed submission, failed-turn retry, and duplicate movement suppression.

  • I DID NOT read this template and provide the requested details.

Originally created by @thetopham on GitHub (Aug 5, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4618 Originally assigned to: @thetopham on GitHub. ## Summary Game Mode and Roleplay need one simple, shared navigation contract. The original behavior was step-by-step travel through attached or adjacent nodes. Newer queued and instant-travel behavior was layered on top, and the two semantics now conflict across map clicks, CYOA choices, typed actions, and other submit paths. Users may want both traversal styles, so travel mode should be explicit instead of inferred from whichever movement path handled the action. ## Proposed behavior ### 1. Select a travel mode - Step-by-step (default): travel only to the next validated attached or adjacent node. - Fast travel: validate the complete route and travel directly to the selected destination in one narrative turn. Selecting a destination only creates or updates a pending route. It must not silently generate a turn or mutate the narrative location. ### 2. Inject one canonical movement event When the next accepted narrative action is submitted, the server adds a movement event that both Game Mode and Roleplay can understand: <movement_this_turn> From: Spiral Forecourt To: Floor 1 - Verdant Foundations Route target: Floor 5 - Horned Warden's Court This movement is canonical. Narrate the travel and arrival, then resolve the selected or typed action. Do not produce another location change. </movement_this_turn> In step-by-step mode, To is the next attached node and Route target remains the selected destination. In fast-travel mode, To is the selected destination. ### 3. Consume movement consistently - Typed text and CYOA choices use the same movement-aware submit pipeline. - A successful turn advances or clears the pending route according to the selected mode. - Failed requests leave the route available for retry. - Exactly one validated location change may occur per accepted turn. - The assistant must not invent a second movement after the canonical event. - Non-travel actions do not accidentally consume or bypass the route. ### 4. Preserve directed links - Step-by-step and fast travel must both respect one-way links. - An unreachable assistant move directive must not create a link or upgrade an existing link. - Discovering a hidden path may create a link only as an explicit discovery mutation with a defined direction. - Narrative movement must never silently convert an incoming or outgoing one-way link into a bidirectional link. The current spatial state resolver can call `addAvailableLink(...)` with `bidirectional: true` when an assistant move or exact location guidance targets a known but unreachable location. The unified movement contract must remove that fallback from ordinary movement and keep discovery as a separate, explicit map mutation. ## Current problem - Game Mode still has legacy pendingMapMove state alongside hierarchical pendingSpatialTransition. - GameSurface.handleChoiceSelect sends CYOA choices directly with sendMessage, bypassing the movement-aware path used by typed input. - The prompt exposes current location and history but not a distinct canonical From to To event, so the GM can resolve the action at the wrong location or add another movement. - Step-by-step attached-node travel and fast or route travel are not represented as an explicit user-selected mode. ## Scope Preserve map generation, hierarchical World Maps, attached-node validation, and lorebook attachments. Simplify the navigation orchestration and make the movement event the single contract shared by Game Mode and Roleplay. ## Acceptance criteria - The UI exposes an explicit travel mode for a queued destination, defaulting to step-by-step. - Both modes produce the same movement_this_turn contract with different validated From and To values. - CYOA, typed Game Mode input, and typed Roleplay input behave identically when a route is queued. - The server owns route validation, one-step or fast resolution, atomic state commit, and route advancement. - Directed links are enforced in both travel modes, and an unreachable assistant move cannot mutate link direction or availability. - Tests cover adjacent step travel, multi-node step travel, fast travel, one-way route acceptance and rejection, unreachable assistant movement, explicit hidden-path discovery, CYOA submission, typed submission, failed-turn retry, and duplicate movement suppression. - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:49:30 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2523
No description provided.