veratown-prototype

Map Character Movement and Pathfinding Proposal

Status: Proposed. Source review confirms a viable BC-client mechanism for room-admin teleports to another online character. Veratown does not yet expose character-targeted movement or pathfinding. The recommended no-server-change route mode is explicitly a sequence of teleports, not native BC walking.

Recommendation

Use the existing Bondage Club MapViewTeleport hidden-message behavior to move an explicitly selected character who is online in the configured room, then reconcile every change from BC map-position syncs:

  1. Teleport mode: issue one targeted map teleport to a validated coordinate or enabled configured location.
  2. Stepped mode (the requested “walk” UX): calculate a bounded, four-neighbor route and issue one targeted teleport per tile. Wait for the target member’s matching BC-observed position before sending the next step. Name this mode walk only in the user-facing command if it is accompanied by a clear notice that it is simulated with teleports.
  3. Do not add a BC server event or claim normal movement semantics. The checked in Bondage-College source contains the BC client implementation, not the authoritative production server implementation. Live server/target-client qualification is therefore a release gate.

This is the most viable approach under the constraint that BC server-side code cannot be changed. It supports the existing BC behavior for compatible clients and reuses current BC packet types. It is not a way to forcibly change another member’s server-side MapData when their client cannot or will not process the admin message.

Findings from source review

The Bondage-College checkout was clean at commit 614937bb8856713d18dc6709af09638b276f465e (R133), which matches the protocol baseline recorded by Veratown.

The checked-out BondageClub/Scripts/Server.js is part of the browser client and wires Socket.IO events; it is not the authoritative BC server. This review validates the shipped client-side /maptp flow and the pinned protocol declarations, but cannot independently prove production-server routing, availability, or behavior. Those points must be tested in a controlled room with the actual BC server and representative target clients before release.

Supported scope and limits

Supported by the proposed design

Not supported or guaranteed

If native BC movement restrictions are a hard requirement, this feature cannot honestly promise them using the no-server-change design. A separately implemented client-side input driver would not make the headless bot control another character’s input. That requirement would need a supported BC server/client capability or a change to the constraint.

Command and destination contract

All commands that move another character require the requester to be a current room admin. The bot itself must also be a current room admin, because BC’s recipient-side handler checks the message sender’s admin status. These are separate checks: authorization of the requester does not make the bot an admin.

Use a member number for the character target so a nickname collision cannot select the wrong person. A target must be present in the current synchronized room roster and have an observed map position. Do not infer identity from a name or accept arbitrary member numbers that are absent from the roster.

Recommended command shape (both /bot map ... and !map ... through the existing parser):

!map teleport @<memberNumber> to xy:<x>,<y>
!map teleport @<memberNumber> to key:<locationKey>
!map teleport @<memberNumber> to name:"<locationName>"

!map walk @<memberNumber> to xy:<x>,<y>
!map walk @<memberNumber> to key:<locationKey>
!map walk @<memberNumber> to name:"<locationName>"

walk is a compatibility-friendly command label for stepped teleport, not a claim that the character walked. The response should disclose that limitation, especially before the first step.

Resolution rules:

Pathing design

Route model

Plan routes on the current room’s 40-by-40 tile grid, not a room/location graph. The path planner is a pure, bounded feature service that accepts the current observed position, observed room map data, selected goal tile(s), and a conservative passability projection. It must not own BC transport or mutate snapshots.

Use breadth-first search over the four cardinal neighbors because BC’s native map controls move north, south, east, and west. The grid has at most 1,600 nodes, so BFS is bounded and simpler than A* or Dijkstra for an unweighted stepped-teleport route. Search at most 1,600 cells and return a clear no_route result if no goal is reached.

Passability should be derived from the latest BC room map (Tiles, Objects, and relevant cell configuration) using the pinned BC catalog and reviewed movement-blocking rules. Unknown object/tile definitions must fail closed for route planning rather than being assumed walkable. Current observed character positions may be considered as dynamic blockers, except where BC’s shared teleporter tiles permit co-occupancy. Revalidate the next step immediately before dispatch.

This projection is only a conservative route policy. The step itself remains a teleport and bypasses target-specific movement checks in BC, including private immobilization/effect state, movement speed, and server-side collision. It cannot promise exact equivalence with ChatRoomMapViewCanEnterTile().

Step execution

  1. Require a synchronized room, fresh target position, current room-admin status for both requester and bot, a valid target, and a known room map.
  2. Resolve the requested coordinate or location to a goal tile. For a region, enumerate its tiles and select the lowest-cost reachable tile.
  3. Plan the full route from the target’s observed current coordinate. Reject an empty/invalid route and routes over an initial hard cap of 80 tile moves; this cap is a qualification starting point, not a user-configurable promise.
  4. For each next cardinal tile, confirm the room and map have not changed, dispatch one guarded targeted MapViewTeleport, and wait for a fresh ChatRoomSyncMapData matching both the target member and that tile.
  5. Continue only after the step is observed. On any failure or timeout, stop at the last observed position and report that the final destination was not confirmed. Never resend the uncertain step automatically.
  6. On final confirmation, report the observed destination and number of steps.

Each tile changes BC-observed state and should be its own journaled executeObserved action. A route orchestrator may coordinate the sequence but must not introduce a second journal owner for the same packet. Serialize routes per target member as well as using the existing global BcClient queue and 14-packet/1.2-second limiter. A route can be slow; observed syncs, not packet dispatch speed, control the next step.

Veratown architecture changes if approved

Validation and release gates

Unit and integration coverage

Controlled BC qualification

Before enabling in an operational room, use a dedicated test bot and at least two ordinary test clients in a non-production room to verify:

  1. An admin bot can target another online character and that recipient applies the hidden map-teleport entry and emits map-position sync.
  2. A non-admin sender is ignored by the target.
  3. The behavior across supported BC client versions, map modes, and target reconnect/departure cases.
  4. Teleports to blocked/occupied tiles and step sequences behave as documented (including that normal movement restrictions are bypassed).
  5. Observation latency and failure behavior fit the action timeout and route cap.

No live BC room or production account was used in this source review. The feature must remain disabled until these controlled checks pass.

Decisions and known limitation

The requester confirmed that the target may be any character in the room and that a step sequence of teleports is acceptable as a possible implementation; the requester also ruled out changes to BC server-side code. Accordingly, the proposal recommends room-admin-targeted teleports and a clearly disclosed stepped-teleport mode. If “walk” is later required to obey all normal BC movement restrictions, this proposal does not satisfy that requirement and must not be relabeled as genuine walking.