Steamworks-dokumentation
Flera spelare

Översikt

Steam startade som en flerspelarplattform med lanseringen av Counter-Strike 1.6, och flerspelarspel har alltid varit ett stort fokus. Steam har många olika funktioner och API:er som förbättrar flerspelarupplevelsen för både utvecklare och kunder. Med dessa funktioner kan du göra det lätt för spelare att hitta och spela med varandra med Steams matchnings-API:er. Du kan också använda Steams spelserver-API:er för att tillhandahålla beständiga, dedikerade servrar som spelarna kan skapa gemenskaper kring.

To facilitate multiplayer games on Steam, there are many options available and different paths to take. Before starting you will want to have the following questions answered:

Does your game already have networking?

If your game is peer-to-peer then all you need to do is integrate Steam Matchmaking & Lobbies with your networking to provide a great experience for Steam users.

Do you want your game to be Peer-to-peer based or server based?

Depending on the type of game one or the other will likely make your game more enjoyable for users.

If your game is highly competitive like an esport then we recommend that you use Steam Game Servers.

If your game has smaller party sizes, you'll likely want to use Steam Matchmaking & Lobbies and Steam Peer-to-peer Networking.

Do you want voice chat?

The Steam Voice APIs provide almost everything you need to implement voice chat quick and easily. It does not network the recorded audio by itself, so you'll still need to send this data to other users using something like Steam Peer-to-peer Networking or Steam Game Servers.

What is available?

Steam Matchmaking & Lobbies

This provides the backbone for getting players playing together. The lobby system is most common when you have players get together before actually starting the game session. Matchmaking and lobbies do not provide networking features, you'll want to use something like Steam Peer-to-peer Networking or Steam Game Servers, or the networking that your engine provides along side.

You can read more about it in the Steam Matchmaking & Lobbies documentation.

Steam Peer-to-peer Networking

This provides peer-to-peer networking for small groups of players.

You can read more about it in the Steam Networking documentation.

Steam Game Servers

The Steam Game Servers API provides everything you need to create dedicated servers for your game. You can host these game servers yourself, or allow your community to host them for you. This is the best choice for highly competitive games (such as Dota 2) or games with persistent servers that keep running even after all players leave (such as Team Fortress 2).

You can read more about it in the Spelservrar documentation.