You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Build and start the server app in the browser for peer-to-peer games #244
Sub-issue of NanoForge-dev/Engine#284 (multiplayer without a game server). In peer-to-peer mode the game's server app runs in the host player's browser, so the CLI must build and start it differently.
Ideal solution or implementation
@nanoforge-dev/config: add network: "dedicated" | "p2p" to the workspace config (default dedicated).
nf build with network: "p2p": also build each server app with --target browser into the client's output, under server/. This runs after the client build, since that one resets the output.
nf start with network: "p2p": add NANOFORGE_NETWORK_MODE=p2p to the env of both apps. The engine reads it.
Dedicated mode is unchanged.
Other context
Engine side: @nanoforge-dev/network/server and @nanoforge-dev/ecs/server pick their browser builds on their own. In p2p mode the Bun server process only does WebRTC signaling, on LISTENING_TCP_PORT.
Activity