Skip to content

WIP: Misc update#27

Open
AntonyGarand wants to merge 4 commits into
masterfrom
feature/music
Open

WIP: Misc update#27
AntonyGarand wants to merge 4 commits into
masterfrom
feature/music

Conversation

@AntonyGarand

Copy link
Copy Markdown
Collaborator

A couple of nice vibe-coded updates: Mostly publishing them here so they can be used as reference and reviewed as there are some good concepts, but I don't trust the source code just yet, need to do a better audit first.

Vite Migration

I couldn't get the app to run locally due to create-react-app being deprecated, and didn't want to spend too much time on the issue.
I tasked my agent to migrate to a more modern Vite setup: This worked great, but would also require changes to the osrs.world deployment to be fully supported.
I think it's a step in the right direction, but pending more review before being merged as it has side-effects.

Camera improvements

Camera here refers to the recording capabilities

  • See and preview the position of the points and camera direction on the world, and speed between points
  • Path smoothing, speed normalization, point replacement settings
image

Music

Music player based off the official world game music data.
Music will play as you move around or via the music player on the bottom left corner of the screen.
The implementation currently downloads music from the osrs wiki: I tried implementing a reader from the cache, but this proved to be overly complex as while getting the midi track is fairly easy, getting the instruments to sound right was not.
Track metadata is stored in a json configuration from parsed-osrs and lazy fetched from the wiki when the music needs to play.

image

Todo:

  • Settings to save music preference (play / volume)
  • Hide music player when recording
  • Port over the music debug map on the game map, and other music settings

Teleport panel and actions

Added the capability to teleport anywhere by a global teleport menu, and follow in-game teleports via the game actions.

Supported are:

  • Spells
  • Jewelry / items
  • Npcs
  • Named locations / regions
image image

Metadata was also imported from parsed-osrs : Now all known teleports named within the wiki can be accessed from a quick teleport bar, and game actions with a matching teleport location within the metadata will transport you to its appropriate counterpart.

If multiple locations are available, say fairy rings, it will open a menu with the options for you to choose from.

image

There are some few rough cases such as fairy rings requiring clicks on the roaming butterflies instead of the rings, but it's a great improvement to navigate the world.

Todo:

  • Add map debug menu option to see links
  • Auto-focus teleport interface on opening
  • Improve npcs: Currently only some npcs are present, would be useful to teleport to monsters and their locations

I've posted few teasers on discord on the capabilities and figured I'd kickstart the PR while I clean it up so I can gather feedback and ideas along the way, or if someone wants to take it over and fix my vibe mess to ship faster!

Port the in-game world music player onto master, wiki-audio-only:
- mapviewer/music: WikiMusicService fetches the authentic in-game .ogg
  render of each track from the OSRS wiki file CDN and plays it via the
  native Web Audio API (decodeAudioData + BufferSource + gain ramps);
  LRU AudioBuffer cache, region crossfade, nearest-track prefetch.
  MusicTrackIndex loads public/all-music.json and answers spatial
  (camera-position -> track) polygon lookups; MusicSettings persists
  volume/mute/mode/autoplay to localStorage.
- components/rs/music: MusicPlayer bar (play/pause/stop/volume/seek/
  mode/library) + searchable MusicLibraryModal browser.
- MapViewerContainer: position-driven auto-play with region crossfade,
  manual library pick, wiki service lifecycle, index load.
- Includes the crossfade-cleanup fix (was mixing AudioContext.currentTime
  with performance.now(); now scheduled in wall-clock time).

Dropped the local MIDI/synth path and its deps (midi-parser-js,
soundfont-player, @wasm-audio-decoders/ogg-vorbis): the wiki engine is
the sole playback path, so they are unused. play() signature simplified
to play(entry). No package.json dependency changes.
Port the full OSRS transport/teleport capability onto feature/music:
- data/transports: TransportIndex + per-network TSV graph (fairy rings,
  spirit trees, gliders, carpets, ships, levers, spells, items, portals,
  minecarts, agility shortcuts, wilderness obelisks, quetzals, ...).
  Lookup by object id + map square so network objects only offer the
  destinations of the clicked node. pickChoiceDestination +
  buildTransportChoices resolve single vs. multi-destination picks.
- data/search: SearchData unifies all-locations.json + all-npcs.json into
  a searchable index for the teleport panel.
- components/rs/teleport: TeleportModal (search a location/NPC and go) +
  TransportChoicesModal (multi-destination picker).
- MapViewer: transportIndex (loaded in init), findTransportEdges,
  teleportTo, open/closeTransportChoices, showTeleportButton, and the
  pendingTransportEdges state the UI polls.
- InputManager: left press/release detection (click vs. camera drag) so a
  left-click triggers the default OSRS-style menu option.
- WebGLMapViewerRenderer: object action menus now wire transport edges to
  their matching actions (Climb-up/Travel/...), single-destination
  transports teleport on left-click, multi-destination ones open the
  picker. Live/spectator click handling is NOT included.
- OsrsMenuEntry.isTransport flag; MapViewerContainer wiring (Teleport
  button, panel + choices modals, transport-index polling) alongside the
  existing music wiring.

Deps: none new (react-select + react-modal already on master).
@AntonyGarand AntonyGarand self-assigned this Jul 10, 2026
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