Skip to content

Another new feature: P2P Chat #107

Description

@Incluwin

Hi All

Here with another feature drop. An extension of the Server Profile manager feature: P2P Social Infra

The P2P social system adds cross-server buddy list, guild, and chat to MapleStory WASM. All data lives in each player's browser (IndexedDB). Players talk directly to each other via WebRTC.

The only server component is a signaling relay (web/social_server.py) — a ~100 line Python script that helps browsers find each other. It stores nothing. If it goes down, no data is lost.

How it works:

  1. Player opens the "Social" panel in the top-right corner
  2. Logs in with their character name
  3. The relay tells them who else is online
  4. Browser auto-connects via WebRTC to buddies and guild members
  5. Chat, buddy requests, and guild actions flow directly between browsers

Features:

  • Chat (all / buddy whisper / guild)
  • Buddy list with online/offline presence
  • Guild system with ranks (leader / officer / member), invite, kick, promote

Key constraint: Both players must be online simultaneously for most actions. No offline messages. Buddy requests are saved locally and auto-sent when the target comes online.

Included in future plans is the possibility of hooking into the game's native chat box. You'd need to expose a C++ function via Emscripten (ccall/cwrap) that calls UIChatBar::send_line(), then pipe incoming P2P messages through it. That way you could seamlessly chat with your WASM chat connections across server boundaries but in the same chatbox that you talk to players on the server you're connected to.

I've uploaded the full design doc below, as well as images of the profile manager UI expanded with optional independently hosted social server config, as well as the in game overlay additions:

Image Image

p2p-social-system.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions