> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/dolphin-emu/dolphin/llms.txt
> Use this file to discover all available pages before exploring further.

# NetPlay

> Setting up and using NetPlay for online multiplayer in Dolphin

NetPlay allows you to play GameCube and Wii games online with other Dolphin users. This guide covers setup, hosting, joining sessions, and troubleshooting.

## What is NetPlay?

NetPlay is Dolphin's built-in online multiplayer feature that:

* Synchronizes emulation between multiple players
* Supports 2-4 players (or more for some games)
* Works with both GameCube and Wii games
* Requires all players to use identical game versions and settings

<Info>
  NetPlay emulates local multiplayer, not original online services. Both players run the game in sync over the internet.
</Info>

## Requirements

### System Requirements

* **Stable internet**: Low latency connection (\< 50ms ping preferred)
* **Matching Dolphin version**: All players must use the same Dolphin version
* **Same game version**: Identical ISO/ROM (same region and revision)
* **Sufficient CPU**: Host needs good single-core performance

<Warning>
  NetPlay requires all players to have identical game files. Different game versions, even by a single byte, will cause desyncs.
</Warning>

### Network Setup

For hosting:

* **Open port**: Default port 2626 must be accessible
* **UPnP support**: Automatic port forwarding (if router supports)
* **Manual port forwarding**: Configure router if UPnP unavailable

## Accessing NetPlay

<Steps>
  <Step title="Open NetPlay">
    Click **Tools** > **Start NetPlay** in the main menu
  </Step>

  <Step title="NetPlay Window">
    The NetPlay setup window appears with options to host or join
  </Step>
</Steps>

## Hosting a NetPlay Session

### Creating a Session

<Steps>
  <Step title="Host Tab">
    In the NetPlay window, click the **Host** tab
  </Step>

  <Step title="Configure Settings">
    Set your session parameters:

    * **Traversal Server**: Enable for easy connection (recommended)
    * **Host Port**: Default 2626 (change if needed)
    * **Host Code**: Generated for Traversal Server method
  </Step>

  <Step title="Start Hosting">
    Click **Host** to create the session
  </Step>

  <Step title="Share Code">
    Share the **Host Code** with players (Traversal) or your **IP address** (Direct)
  </Step>
</Steps>

### Connection Methods

<Tabs>
  <Tab title="Traversal Server (Recommended)">
    Uses Dolphin's central server to facilitate connections.

    **Advantages:**

    * No port forwarding required
    * Easy to connect
    * Share simple host code

    **Setup:**

    1. Check **Use Traversal Server**
    2. Note your **Host Code**
    3. Share code with players
  </Tab>

  <Tab title="Direct Connection">
    Players connect directly to host's IP address.

    **Advantages:**

    * Lower latency
    * More control

    **Requirements:**

    * Port forwarding configured
    * Public IP address known

    **Setup:**

    1. Forward port 2626 on router
    2. Find your public IP
    3. Share IP with players
  </Tab>
</Tabs>

### Host Options

#### Session Settings

* **Session Name**: Descriptive name for your session
* **Password**: Optional password protection
* **Limit Players**: Maximum number of players (2-4 typically)

#### Game Configuration

Before starting:

* Select the game from your library
* Configure which controllers are used by each player
* Adjust buffer size (see Lag Mitigation)

### Configuring Player Controllers

<Steps>
  <Step title="Assign Controllers">
    In the NetPlay window, assign GameCube/Wii controllers to players:

    * Port 1-4 for GameCube controllers
    * Wii Remote 1-4 for Wii games
  </Step>

  <Step title="Set Controller Type">
    For each port, select:

    * **None**: No controller
    * **Standard Controller**: GameCube controller
    * **GBA**: Game Boy Advance
    * Player 1, 2, 3, 4: Assign to specific player
  </Step>
</Steps>

## Joining a NetPlay Session

### Joining via Traversal Server

<Steps>
  <Step title="Connect Tab">
    In the NetPlay window, click the **Connect** tab
  </Step>

  <Step title="Enter Host Code">
    Enter the **Host Code** provided by the host
  </Step>

  <Step title="Connect">
    Click **Connect**
  </Step>

  <Step title="Wait for Sync">
    Wait for session to sync (host will configure settings)
  </Step>
</Steps>

### Joining via Direct Connection

<Steps>
  <Step title="Connect Tab">
    Click the **Connect** tab
  </Step>

  <Step title="Uncheck Traversal">
    Uncheck **Use Traversal Server**
  </Step>

  <Step title="Enter Address">
    Enter the host's **IP address** and **port** (e.g., `192.168.1.100:2626`)
  </Step>

  <Step title="Connect">
    Click **Connect**
  </Step>
</Steps>

## NetPlay Configuration

Configure NetPlay settings in **Options** > **Configuration** > **NetPlay** (or via NetPlay window settings):

### Connection Settings

* **Traversal Server**: `stun.dolphin-emu.org` (default)
* **Traversal Port**: `6262` (default)
* **Traversal Port (Alternate)**: Backup port if primary unavailable

### Buffer Size

Controls input lag to compensate for network latency:

* **Lower (1-5 frames)**: Less lag, requires very good connection
* **Higher (6-15 frames)**: More stable, higher input delay
* **Auto-adjust**: Dolphin can adjust based on connection quality

<Tabs>
  <Tab title="Low Latency (<20ms)">
    Use 2-4 buffer size for minimal input lag.
  </Tab>

  <Tab title="Medium Latency (20-60ms)">
    Use 5-8 buffer size for balance of stability and responsiveness.
  </Tab>

  <Tab title="High Latency (>60ms)">
    Use 9-15 buffer size. Consider if connection is suitable for NetPlay.
  </Tab>
</Tabs>

<Info>
  Buffer size adds frames of input lag. Lower is better, but too low causes stuttering and desyncs.
</Info>

### Save Data Synchronization

* **Load Savedata**: Use host's save data for all players
* **Write Savedata**: Allow saving during NetPlay
* **Sync All Wii Saves**: Synchronize all Wii save data (not just current game)

<Warning>
  Enabling write savedata during NetPlay can corrupt saves if desyncs occur. Use with caution.
</Warning>

### Code Synchronization

* **Sync Codes**: Ensure all players use same Gecko/AR codes
* Required for competitive play

### Network Mode

Choose netplay timing mode:

<Tabs>
  <Tab title="Fair Input Delay">
    All players experience same input lag based on slowest connection.

    * **Recommended** for competitive play
    * Ensures fair gameplay
    * Everyone has identical experience
  </Tab>

  <Tab title="Host Input Authority">
    Host has minimal lag, clients compensate.

    * Host has advantage
    * Better for co-op play
    * Host needs good CPU
  </Tab>

  <Tab title="Golf Mode">
    Players take turns (turn-based games).

    * For turn-based games only
    * No simultaneous input
    * Special use case
  </Tab>
</Tabs>

### Other Settings

* **Record Inputs**: Save NetPlay inputs for replay analysis
* **Strict Settings Sync**: Enforce identical settings on all players
* **Golf Mode Overlay**: Show turn indicator in Golf Mode
* **Enable QoS**: Prioritize NetPlay traffic (Quality of Service)
* **Use UPnP**: Automatic port forwarding

## Starting the Game

Once all players are connected:

<Steps>
  <Step title="Host Configures">
    Host selects game and configures settings
  </Step>

  <Step title="Assign Controllers">
    Host assigns controller ports to each player
  </Step>

  <Step title="Start Game">
    Host clicks **Start** to begin emulation
  </Step>

  <Step title="All Players Sync">
    All players' Dolphin instances sync and start the game
  </Step>
</Steps>

<Note>
  The game must be in each player's configured game directories. Dolphin will detect if all players have matching game files.
</Note>

## During NetPlay

### Chat

Communicate with other players:

* Built-in text chat in NetPlay window
* Messages appear for all players
* Useful for coordination

### Pause and Resume

Host can pause emulation:

* Useful for breaks or configuration changes
* All players pause simultaneously

### Save States (Host Only)

Host can create and load save states:

* All players sync to the same state
* Useful for retrying difficult sections
* States are session-specific

<Warning>
  Save states in NetPlay are controlled by the host. Clients cannot independently save or load.
</Warning>

### Kicking Players

Host can remove players:

* Right-click player in player list
* Select **Kick Player**

## Lag Mitigation

### Optimizing Buffer Size

<Steps>
  <Step title="Start with Auto">
    Begin with automatic buffer adjustment
  </Step>

  <Step title="Monitor Performance">
    Watch for stuttering or slowdowns
  </Step>

  <Step title="Adjust Manually">
    Increase buffer if desyncs occur, decrease if input lag is too high
  </Step>

  <Step title="Test">
    Test in non-critical gameplay moments
  </Step>
</Steps>

### Connection Quality

Check connection quality:

* **Ping indicator**: Shows latency to other players
* **Desync warnings**: Alert when synchronization issues occur

<Info>
  Enable **Show NetPlay Ping** in Graphics settings to display ping on-screen during gameplay.
</Info>

### Reducing Lag

* Close bandwidth-heavy applications
* Use wired Ethernet instead of Wi-Fi
* Connect to geographically close players
* Reduce buffer to minimum stable value
* Disable background downloads/uploads

## Spectator Mode

Watch NetPlay sessions without playing:

<Steps>
  <Step title="Join as Spectator">
    Connect to session normally
  </Step>

  <Step title="No Controller Assigned">
    Host assigns no controller ports to spectator
  </Step>

  <Step title="Watch">
    Spectator can watch gameplay without affecting synchronization
  </Step>
</Steps>

## Troubleshooting

### Connection Failed

If unable to connect:

<Steps>
  <Step title="Verify Versions">
    Ensure all players use identical Dolphin version
  </Step>

  <Step title="Check Code/IP">
    Verify host code or IP address is correct
  </Step>

  <Step title="Port Forwarding">
    For direct connection, confirm port 2626 is forwarded
  </Step>

  <Step title="Firewall">
    Check firewall isn't blocking Dolphin
  </Step>

  <Step title="Try Traversal">
    If direct fails, try Traversal Server method
  </Step>
</Steps>

### Desynchronization

<Warning>
  Desyncs cause players' games to diverge, breaking multiplayer.
</Warning>

Causes of desyncs:

* Different game versions or ISOs
* Different Dolphin settings
* Unstable connection
* Gecko codes or patches not synced

Solutions:

1. Verify MD5/SHA-1 hash of game files match
2. Enable **Strict Settings Sync**
3. Disable all codes unless synchronized
4. Increase buffer size
5. Restart session if desyncs persist

### High Input Lag

If input delay is too high:

* Reduce buffer size incrementally
* Use wired internet connection
* Close background applications
* Choose geographically closer host
* Consider if connection is suitable for NetPlay

### Poor Performance

If NetPlay runs slowly:

* **Host**: Ensure adequate CPU for game + NetPlay overhead
* **All players**: Close unnecessary programs
* Lower graphics settings (internal resolution, enhancements)
* Ensure emulation reaches 100% speed

<Note>
  NetPlay requires all players to maintain 100% emulation speed. The slowest player determines session speed.
</Note>

### Game Doesn't Start

If game fails to launch:

* Confirm all players have the game
* Verify game files are identical (check file size and hash)
* Ensure game is in configured ISO directories
* Check for missing BIOS or system files

## Compatible Games

Most GameCube and Wii games work with NetPlay:

* **Best**: Local multiplayer games (Mario Kart, Smash Bros, Mario Party)
* **Good**: Co-op games, split-screen titles
* **Limited**: Games with heavy randomization or complex timing
* **Not Compatible**: Games requiring original online services, Wii Speak, or specific peripherals

<Info>
  Check the Dolphin Wiki for game-specific NetPlay compatibility and recommended settings.
</Info>

## Best Practices

### Before Starting

1. Verify all players have matching game files
2. Use same Dolphin version (check About > Dolphin)
3. Configure settings before connecting
4. Test connection with a short session first

### During Play

1. Host should have the fastest CPU
2. Use Fair Input Delay for competitive games
3. Communicate via chat for coordination
4. Save states for checkpoints in co-op games
5. Monitor ping and adjust buffer as needed

### For Best Experience

* **Connection**: Wired Ethernet, \< 50ms ping
* **Buffer**: Lowest stable value (test and adjust)
* **Settings**: Moderate graphics settings for stability
* **Players**: Geographically close for lower latency
