Broadcast teleport landing sound to nearby users

This commit is contained in:
Jage9
2026-02-24 20:55:02 -05:00
parent a1132ea22a
commit 297f1c0c1a
9 changed files with 72 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ This is a behavior guide for packet semantics beyond raw schemas.
## Client -> Server
- `update_position`: client movement intent; server enforces world bounds and movement rate policy.
- `teleport_complete`: client signals teleport landing; server rebroadcasts spatial landing cue.
- `update_nickname`: nickname change request (server enforces uniqueness).
- `chat_message`: player chat.
- `ping`: latency measurement.
@@ -23,6 +24,7 @@ This is a behavior guide for packet semantics beyond raw schemas.
- `welcome`: initial snapshot with users/items plus server UI/world metadata.
- `signal`: forwarded WebRTC offer/answer/ICE.
- `update_position`, `update_nickname`, `user_left`: presence updates.
- `teleport_complete`: peer teleport landing event with spatial coordinates.
- `chat_message`: system and user chat stream.
- `pong`: ping response.
- `nickname_result`: accepted/rejected nickname result.
@@ -41,6 +43,7 @@ This is a behavior guide for packet semantics beyond raw schemas.
- `item_piano_status` carries machine-readable piano events (`use_mode_entered`, record/playback transitions).
- `item_use_sound` contains absolute item world coordinates (`x`, `y`) and sound path.
- For carried items, source coordinates resolve to the carrier's current position.
- `teleport_complete` contains absolute player world coordinates (`x`, `y`) at teleport landing.
- `item_piano_note` contains:
- `itemId`, `senderId`, `keyId`, `midi`, `on`
- resolved `instrument`, `voiceMode`, `octave`, `attack`, `decay`, `release`, `brightness`, `emitRange`

View File

@@ -39,6 +39,7 @@ Core incoming message effects:
- `signal`: WebRTC negotiation and ICE exchange.
- `update_position`: update peer position; may play movement/teleport world sound.
- `teleport_complete`: play peer teleport landing sound at final tile.
- `update_nickname`: update peer display name.
- `chat_message`: append/readable status; optional system sound class.
- `item_upsert`: replace item snapshot and resync item runtimes.