Skip to content

Comments

Local Pathfinding with High-Performance Binary Cache#29

Open
grumpyowlbear wants to merge 5 commits intoMaxBittker:mainfrom
grumpyowlbear:feature/binary-pathfinding
Open

Local Pathfinding with High-Performance Binary Cache#29
grumpyowlbear wants to merge 5 commits intoMaxBittker:mainfrom
grumpyowlbear:feature/binary-pathfinding

Conversation

@grumpyowlbear
Copy link

Summary

This PR integrates the local pathfinding engine from PR #28 but adds a significant performance layer. It replaces the 18MB JSON collision data with a packed binary format, reducing bot initialization time from ~260ms to <20ms.

Key Changes

  • Binary Collision Cache: Replaced JSON with a packed bitstream format (7MB).
  • Fast Loader: Implemented a DataView based loader for instant spatial cache initialization.
  • Multi-Segment Routing: Added support for long-distance travel (e.g. Lumbridge to Yanille) with perpendicular obstacle avoidance.
  • Draynor Manor Logic: Integrated specific "escapology" for the one-way front door trap.
  • Zero Dependency: Bundles all necessary data/WASM for universal compatibility.

PapaBlooD and others added 5 commits February 10, 2026 21:20
…sistency and streamline toolchain setup for contributors.
…nt routing

- Add populatedZones cache to reject empty ocean zones in snapToWalkable(),
  preventing the pathfinder from routing through water
- Add FLOOR_DECORATION to collision export FLAG_BITS so all blocked tiles
  are properly captured
- Export wall collision flags and door/gate positions separately, allowing
  the pathfinder to route through doorways while respecting permanent walls
- Add one-way door handling (Draynor Manor front door) and escape routing
- Add multi-segment routing for cross-continent paths (500+ tiles)
- Re-export collision data with all improvements (853k tiles, 1006 doors)
- Add 30-test pathfinding validation suite covering walls, doors, water
  avoidance, and cross-continent routes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Revert PapaBlooD's mining.md changes and remove the interactPlayer
feature (sendInteractPlayer, OPPLAYER packets, trade support) to keep
this PR focused on pathfinding improvements only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove rs-sdk submodule (PapaBlooD's fork reference)
- Revert bun.lock configVersion formatting change
- Revert server/engine/bun.lock reformatting (no dep changes)
- Revert server/gateway/bun.lock (unrelated dep removal)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MaxBittker
Copy link
Owner

sorry, there's been a lot of churn in the process of merging the other code, can't merge this. It seems like a good idea, would welcome another minimal PR including a benchmark

PapaBlooD added a commit to PapaBlooD/rs-sdk that referenced this pull request Feb 11, 2026
…ation

Builds on the binary collision cache concept from PR MaxBittker#29 by grumpyowlbear.

- Migrate pathfinding from JSON to binary v2 format (18MB -> 7MB, 13x faster init)
- Add close-door detection (default-open doors that need wall collision added)
- Export endpoint now returns closeDoors and wallLocs for diagnostics
- Export script generates JSON, gzip, binary v2, and PNG overlay in one run
- PNG overlay includes overworld, dungeons, wilderness dungeons, and legend key

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PapaBlooD added a commit to PapaBlooD/rs-sdk that referenced this pull request Feb 11, 2026
…ation

Builds on the binary collision cache concept from PR MaxBittker#29 by grumpyowlbear.

- Migrate pathfinding from JSON to binary v2 format (18MB -> 7MB, 13x faster init)
- Add close-door detection (default-open doors that need wall collision added)
- Export endpoint now returns closeDoors and wallLocs for diagnostics
- Export script generates JSON, gzip, binary v2, and PNG overlay in one run
- PNG overlay includes overworld, dungeons, wilderness dungeons, and legend key

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PapaBlooD added a commit to PapaBlooD/rs-sdk that referenced this pull request Feb 11, 2026
…ation

Builds on the binary collision cache concept from PR MaxBittker#29 by grumpyowlbear.

- Migrate pathfinding from JSON to binary v2 format (18MB -> 7MB, 13x faster init)
- Add close-door detection (default-open doors that need wall collision added)
- Export endpoint now returns closeDoors and wallLocs for diagnostics
- Export script generates JSON, gzip, binary v2, and PNG overlay in one run
- PNG overlay includes overworld, dungeons, wilderness dungeons, and legend key

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

3 participants