Multiplayer Information

Multiplayer in Wayward is enabled for up to 32 players. Multiplayer works in a simulated turn-based mode where each turn happens on a fixed interval as long as players are performing actions or in a real-time mode where each turn happens on a fixed interval regardless of player action. When playing in hardcore mode (or with permadeath enabled), after dying, you will continue to play in ghost form, allowing you to spectate but not interact normally. Multiplayer also allows for a special PVP flag to be set to allow players to hurt and kill other players. Multiplayer options can be set in the "Multiplayer" menu via the pause menu accessed with escape by default. Additionally, modes and tick time (turn intervals) can be changed via the "Modes" menu.

Creature spawn rates, creature difficulty, and reputation are all based on how many connected players there are and will scale and average based on each individual player.

Commands

You can use several special commands while playing multiplayer. To see a list of all possible commands, type "/commands" in the chat bar and hit enter. The following commands are also available for use:

  • /players – Shows a list of all connected players.
  • /ping – Shows your latency to the host player.
  • /kick – Allows the host to kick a player.
  • /banned – Shows a list of all banned players.
  • /ban – Allows the host to ban a player.
  • /unban – Allows the host to unban a player.

Local Multiplayer

Wayward supports local multiplayer over the same network using IP addresses. Simply start the multiplayer game as per normal and share your local IP address for others on the same network to be able to join. You can join a multiplayer game by IP address by clicking on "Multiplayer" from the main menu and clicking "Join by Game Code or IP".

Note: This method is required if you are trying to connect to your own dedicated server if it is on the same network.

Private Multiplayer

You are able to set your multiplayer game (including dedicated servers) to private. This will only allow others to join your game if you share the game code with them or invite them from in-game through the "Copy Game Code" or "Invite Steam Friends" buttons inside the multiplayer menu available after you start the game.

Note: Copying the game code from a dedicated server will copy the IP address of the server. If you are on the same network, you will not be able to join with this IP address. You will need to use your local IP address.

Forwarding Ports & Networking

By default, when running a non-dedicated server, Wayward will attempt to run multiplayer games over WebRTC, which chooses a randomized port. If the client is unable to connect to the WebRTC port, their game will fallback to using a WebSocket connection, which will connect on port 38740. If that fails, then players will be unable to join the game without port forwarding or firewall configuration. You can find more information about forwarding ports and firewalls here. Every router and network is different and what you need to do will vary drastically. You can attempt to disable firewalls or reduce their security level and ensure that port 38740 is opened under the TCP protocol for the WebSocket fallback to function.

Dedicated Server Info

To run Wayward in a dedicated server mode, run the wayward executable from the command prompt/terminal/console with the following parameters:

On Windows:

wayward.exe +server

On macOS:

Wayward.app/Contents/MacOS/Electron +server

On Linux:

wayward +server

Full arguments list:

  • +server | Switch | Starts Wayward in dedicated "server" mode.
  • +name "Default" | String | Defaults to "Default".
  • +port 38740 | Number | Defaults to 38740.
  • +backup | Switch | Add this argument to enable automated backups to the servers /backups folder. Defaults to no automated backups.
  • +backupInterval 10 | Number | Defaults to 10 (minutes).
  • +maxBackups 24 | Number | Defaults to 24 maximum backups to keep.
  • +load "Game Name" | String | Specify the game name to have it load the save on startup - If the world you specified in +load does not exist, it will be generated. Defaults to nothing.
  • +console | Switch | Starts dedicated server in console only mode (no GUI) - When using this, you must specify a world to load using the +load switch. Defaults to disabled.
  • +seed 123456 | Number | World generation seed. Defaults to a randomized number.
  • +difficulty hardcore | String | Sets the difficulty (or game mode). Valid options: hardcore, casual, challenge, dailychallenge. Defaults to "hardcore".
  • +realTimeTickSpeed 50 | Number | Real time tick speed. Defaults to 50 (833ms). Normal range is between 10 and 80.
  • +maxPlayers 16 | Number | Sets the max players. Defaults to 32.
  • +pvp | Switch | Enables PVP. Defaults to disabled.
  • +private | Switch | Prevents the server from showing up in the server browser. Defaults to disabled.
  • +turnMode realtime | String | Sets the turn mode. Valid options: realtime, simulated. Defaults to "simulated".
  • +new | Switch | Creates a new game every launch.
  • +hardwareAcceleration 1 | Number | Defaults to 1 (enabled).

Example on Windows with some of the arguments:

wayward.exe +server +name "My Server" +port 38740 +backup +backupInterval 10 +maxBackups 24 +load "Game Name" +difficulty Casual +hardwareAcceleration 0

When the server is running, you will be able to see player messages as well as chat as the server.

Note: Port forwarding may be required when running a dedicated server. By default, you will need to forward port 38740.

Dedicated Server Mods

To run modifications using a dedicated server, navigate to the Steam Wayward folder. Create a folder called "mods" in that directory if one doesn't exist. Here, you can upload any mod folder you wish, including modifications from the Workshop. Simply navigate the the /workshop/mods/ folder and copy over any workshop mod folders that you wish to use on your dedicated server.

Multiplayer Design

Packets the server sends to clients: IWorldPacket, ITickPacket, IActionPacket

Packets the client sends the server: IActionPacket, IKeyBindStatePacket, IUpdateDirectionPacket, IConfirmDialogSelectionPacket, IChatMessagePacket, IUpdateOptionPacket

The client doesn't do anything unless the server tells it.

For ticking, it's controlled from the server. A client will never tick unless the servers tells them to (along with most other things).

The server will:

  • Log the current seed (before seed)
  • Execute the tick method
  • Log the current seed (after seed)
  • Send an ITickPacket to all the clients (containing the before and after seeds)

Each client will see the ITickPacket and:

  • Confirm the current game seed is the same as the before seed
  • Execute the tick method
  • Confirm the current game seed is the same as the after seed
For player movement, the client will send the server an IKeyBindStatePacket (if WASD), or IUpdateDirectionPacket (if mouse click).

The server will then:

  • Update the players key bind state or direction state
  • Process the players input
    • If a movement is going to happen, the server will send every client an IActionPacket with the MoveTo action type
When a client wants to execute an action, it sends the server an IActionPacket with the details (action type, item, etc.).

The server will see this and:

  • Log the current seed (before seed)
  • Execute the action
  • Log the current seed (after seed)
  • Send an IActionPacket to all the clients (containing the before and after seeds)

Each client will see the IActionPacket and:

  • Confirm the current game seed is the same as the before seed
  • Execute the action
  • Confirm the current game seed is the same as the after seed

Community & Links