Skip to content

feat(network): p2p mode - #452

Merged
Tchips46 merged 6 commits into
mainfrom
feat/network/p2p
Nov 5, 2026
Merged

Tchips46 merged 6 commits into
mainfrom
feat/network/p2p

Conversation

@Tchips46

Copy link
Copy Markdown
Member

Peer-to-peer mode: the server app runs in the host’s browser
With network: "p2p" in the nanoforge.config.ts, the first player hosts the game in their tab and the others join over WebRTC. Game code is unchanged. Th server only does signaling, on LISTENING_TCP_PORT. ctx.network.roomCode and ctx.network.inviteLink give the invite

Closes #284

With NETWORK_MODE=p2p (set by nf from network: "p2p"), the client hosts
the server app in its tab or joins a room over WebRTC, and the Bun server
only does signaling. Removes the /peer entry point and pong-p2p example.
@github-actions github-actions Bot added documentation Improvements or additions to documentation modules:ecs Related to ECS library modules:network Related to Network library labels Oct 24, 2026
@Tchips46 Tchips46 changed the title Feat/network/p2p feat(network): p2p mode Oct 24, 2026
@github-actions github-actions Bot added the packages:core Related to Core library label Oct 24, 2026
@Tchips46
Tchips46 merged commit 9f99718 into main Nov 5, 2026
3 checks passed
@Tchips46
Tchips46 deleted the feat/network/p2p branch November 5, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation modules:ecs Related to ECS library modules:network Related to Network library packages:core Related to Core library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow no server multiplayer game with server hosted by a client : lib network browse

2 participants