Netplay
Intermittently broken on nightly EmulatorJS
Netplay is currently unstable on the nightly EmulatorJS build and may not work. Expect failed connections, desyncs, or rooms that won't start until upstream fixes land.
Netplay lets you play in-browser games with other users in real time over the internet, whether co-op, turn-based, or party games.
Prerequisites
- EmulatorJS Netplay enabled in
config.yml(server owner-level) - ICE servers configured (STUN + TURN). Without them, Netplay only works when all players are on the same LAN.
- All players need access to your instance, as Netplay doesn't proxy the ROM to people without accounts.
- A reverse proxy that forwards WebSocket upgrades, since Netplay connects over WebSockets only, with no long-polling fallback (see Reverse Proxy).
See Configuration File → emulatorjs.netplay for the server owner setup.
Hosting and joining
The host creates a room with an optional password from a supported game and becomes Player 1. Up to three more players can join as Players 2-4 (depending on the core, since some only support 2). Other players must be on the same instance, since Netplay doesn't federate across instances.
Opening a room needs the roms.read scope and access to the game, so a game that's hidden from you, or above your age limit, can't be hosted. The same check applies to joining a room without a password, and only players who can see the game find its rooms in the list. A password-protected room admits anyone with the password instead.
Controls
Every player controls their own gamepad/keyboard locally, and inputs are sent to the host, which runs the game and broadcasts video. Slight lag is expected over the internet (~50-150 ms typical), with higher latency on transatlantic hops or when using TURN servers.
ICE servers (the NAT stuff)
WebRTC, the protocol Netplay uses, needs help to punch through some consumer routers. That's what ICE (STUN + TURN) servers do:
- STUN: helps two peers find each other's public IPs, and usually works unless one of you is behind symmetric NAT.
- TURN: relays traffic when STUN can't, but is more resource-intensive, and most free TURN services have quotas.
Limitations
- Not all cores support Netplay. SNES9x, Mupen64Plus, Mednafen PSX, Genesis Plus GX are the most battle-tested.
- Frame-perfect fighting isn't realistic. Netplay is meant for casual co-op. For tournament-level fighting games, use something like FightCade.
- All players need an account. Without a User account on your instance nobody can reach the player at all, and the account has to see the game unless the room has a password.
- RTC over TURN uses real bandwidth. Hosting a 4-player N64 session over TURN can saturate a modest uplink.
Security
Netplay room data is short-lived, with no persistent record beyond the Netplay Cleanup scheduled task sweep. Passwords protect room access but aren't stored long-term.
Troubleshooting
- Other players can't see my room: either they're not on your instance (shouldn't happen if they have accounts) or the WebSocket connection is broken (see WebSocket Troubleshooting).
- Game plays fine locally but Netplay glitches: network round-trip is too high. Test with players on the same LAN first, then add TURN and re-test from outside.
- Audio desync: Try a different browser (Chrome should work well), or restart the session.
More in Netplay Troubleshooting.