39

Steamworks SDK v1.44 - New Networking APIs

 5 years ago
source link: https://www.tuicool.com/articles/hit/Inqqm2n
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

ABOUT Steamworks Development

Official Group for Steamworks Development Support

NOTE: This group is restricted and visible only to accounts with Steamworks access. Announcements however are public.

This community of Steamworks developers is intended for sharing information regarding Steam and Steamworks development.

Please use theDiscussions to ask Steam and Steamworks related questions. You'll also find FAQs and responses to other common questions in there.

And we'll post announcements for relevant updates and changes involving Steamworks SDK.

Steamworks Site

Steam Stats

VIEW ALL

VIEW ALL (158)

Steamworks SDK v1.44 - New Networking APIs

14 March - Fletch | 10 Comments

For the past few years we have been working on improving the quality of multiplayer experiences in DotA and CS:GO by relaying the traffic and carrying it on our network backbone. This protects our gameservers from denial-of-service attacks and gives players all over the world a lower-latency, higher-quality connection.

Today we are releasing APIs that make this service available to all Steam partners. This gives you:

  • Access to our network, giving your players protection from attack, 100% reliable NAT traversal, and improved connectivity.
  • Tools for instantly estimating the ping between two arbitrary hosts without sending any packets.
  • A high quality end-to-end encrypted reliable-over-UDP protocol.

These updates are available as part of the Steamworks SDK v1.44 release, available now .

Access to the Valve network

Valve has relays deployed in 30 network points-of-presence worldwide and several terabits of edge bandwidth. Using these APIs, you can take advantage of this infrastructure. Relaying your game traffic over our network gives you several benefits.

First, relaying traffic anonymizes it, protecting both gameservers and clients from denial-of-service attacks. Furthermore, because routing decisions are made dynamically by the client, if a relay becomes unavailable, clients can switch to a different relay within seconds, perhaps at a different point-of-presence if necessary. For an attacker to disrupt gameplay, they must mount an attack large enough to overwhelm multiple data centers.

Second, clients can select a route that gets off of the public Internet and onto our dedicated links as early as possible. On our backbone we can ensure that the routing is optimal, since we have peered with over 2,500 ISPs. We also prioritize the latency-sensitive game traffic over HTTP content downloads, which we can afford to do because game traffic makes up a relatively small percentage of our overall bandwidth utilization. And on our backbone, a sudden surge of traffic unrelated to gaming won’t degrade the experience.

Finally, by relaying the traffic in software, we can often improve the ping time!

How can a relayed route be faster than a direct route? The Internet is a packet-switched network; there is no such thing as a “direct” route. When a packet is sent “directly” to the remote host's IP address, it takes the route determined by standard IP routing protocols. This route is often not optimal! Our protocol puts the client in charge of routing decisions. The client considers each relay point-of-presence, and determines the end-to-end latency along this route. It then selects the route with the lowest latency.

Giving clients their choice of route makes a difference surprisingly often. Based on a sample of 16M connections from unique client IP addresses to dedicated servers in our data centers:

  • 43% of players experienced an improvement in their ping time.
  • 25% of players experienced an improvement of 10ms or more
  • 10% of players experienced an improvement of 40ms or more.

The amount of improvement varies considerably by region. Here is a breakdown by region.

yaiI7jY.png!web

Ping estimation tools

The ISteamNetworkingUtils API includes tools for estimating pings, powered by the relay network. By measuring the ping times to many different relays, we generate “coordinates” that describe the location of the host on the Internet. Given any two such sets of coordinates, we can generate a high-quality estimate for the ping time between two arbitrary hosts, without sending any packets. This is an extremely useful feature for matchmaking and peer selection.

Open-Source end-to-end protocol

In addition to the features powered by Valve’s relay network and backbone that Steam partners can access, the SteamnetworkingSockets API is also a general-purpose transport library for games, with the following features:

Fragmentation, reassembly, and retransmission. In your code you send and receive “messages”, which can be smaller or larger than a network packet. The protocol combines multiple small messages into a single packet for efficiency, fragments large messages into multiple packets, reassembles them on the receiving side, and retransmits segments of reliable messages that are dropped due to packet loss.

Encryption and authentication. Security is not an optional afterthought for a modern networked game; a vulnerability can destroy the experience for your players. Doing crypto properly is really hard. We took state-of-the art standards for reliable streams and applied them to the unreliable messages used by games. Out-of-the box, the encryption will protect against casual eavesdropping. To protect against a man-in-the-middle attack requires a trusted third party to issue certificates or distribute a shared secret. Steam does this for Steam games; in order for an attacker to eavesdrop or modify packets, they must be inside the game process, where VAC can detect them.

These basic features are also available in an open-source version [github.com] of this API. We want developers to take full advantage of the other benefits this API provides, and they cannot do that without the confidence that comes from having access to the source code for free.

More to come

This is the first of a series of updates aimed at improving the networked gaming experience for Steam partners. Specifically, while this update has primarily improved peer-to-peer networking, we're also working on making the solutions we have developed for our own dedicated servers available to partners. Let us know if you have any questions, and check out our plans for the future of the open-source project on github.

Read More

Steamworks SDK 1.43 Now Available

25 February - martino | 7 Comments

Steamworks SDK v1.43 has been released, and is available for download from https://partner.steamgames.com/ . Like any Steamworks SDK release, updating is recommended but not required - older versions will continue to work without issue.

Release Notes

ISteamParties

  • This API can be used to selectively advertise your multiplayer game session in a Steam chat room group. Tell Steam the number of player spots that are available for your party, and a join-game string, and it will show a beacon in the selected group and allow that many users to “follow” the beacon to your party. Adjust the number of open slots if other players join through alternate matchmaking methods.

ISteamController

  • This interface will be deprecated and replaced with ISteamInput. For ease in upgrading the SDK ISteamController currently has feature parity with ISteamInput, but future features may not be ported back. Please use ISteamInput for new projects.
  • Added GetActionOriginFromXboxOrigin, GetStringForXboxOrigin and GetGlyphForXboxOrigin to allow Xinput games to easily query glyphs for devices coming in through Steam Input’s Xinput emulation, ex: “A button”->”Cross button” on a PS4 controller. This is a simple translation of the button and does not take user remapping into account – the full action based API is required for that.
  • Added TranslateActionOrigin to allow Steam Input API games which are using look up tables to translate action origins from a recognized device released after the game was last built into origins they recognize.
  • Added count and max_possible fields to current enums to make using lookup tables easier

ISteamInput

  • This new interface replaces ISteamController to better reflect the fact this API supports not just the Steam Controller but every controller connected to Steam – including Xbox Controllers, PlayStation Controllers and Nintendo Switch controllers. ISteamController currently has feature parity with the new features added in ISteamInput but new feature may not be ported back. Please use this interface instead of ISteamController for any new projects.
  • Migrating to ISteamInput from ISteamController should mostly be a search-replace operation but any action origin look up tables will need to be adjusted as some of the enum orders have changed.
  • Added GetActionOriginFromXboxOrigin, GetStringForXboxOrigin and GetGlyphForXboxOrigin to allow Xinput games to easily query glyphs for devices coming in through Steam Input’s Xinput emulation, ex: “A button”->”Cross button” on a PS4 controller. This is a simple translation of the button and does not take user remapping into account – the full action based API is required for that.
  • Added TranslateActionOrigin to allow Steam Input API games which are using look up tables to translate action origins from a recognized device released after the game was last built into origins they recognize.
  • Added count and max_possible fields to current enums to make using lookup tables easier

ISteamFriends

  • ActivateGameOverlayToWebPage – Added a new parameter to control how the created web browser window is displayed within the Steam Overlay. The default mode will create a new browser tab next to all other overlay windows that the user already has open. The new modal mode will create a new browser window and activate the Steam Overlay, showing only that window. When the browser window is closed, the Steam Overlay is automatically closed as well.

ISteamInventory

  • GetItemsWithPrices and GetItemPrice - Added the ability to get the “base price” for a set of items, which you can use to markup in your own UI that items are “on sale”

ISteamUGC

  • SetAllowLegacyUpload - Call to force the use of Steam Cloud for back-end storage (instead of Steam Pipe), which is faster and more efficient for uploading and downloading small files (less than 100MB).
  • CreateQueryAllUGCRequest - Added ability to page through query results using a “cursor” instead of a page number. This is more efficient and supports “deep paging” beyond page 1000. The old version of CreateQueryAllUGCRequest() that takes a page parameter is deprecated and cannot query beyond page 1000. Note that you will need to keep track of the “previous” cursor in order to go to a previous page.

ISteamApps

  • GetLaunchCommandLine - Get command line if game was launched via Steam URL, e.g. steam://run/<appid>//<command line>/. If you get NewUrlLaunchParameters_t callback while running, call again to get new command line
  • BIsSubscribedFromFamilySharing - Check if subscribed app is temporarily borrowed via Steam Family Sharing

Steam API

  • Refactored headers to minimize the number of headers that need to be included to use a single ISteam interface.
  • Renamed some macros with STEAM_ prefix to minimize conflicts in the global namespace

Read More

VIEW ALL (22,953)

Group Player of the Week:

vqY7baV.jpg!web

Administrators

yYrAJbf.jpg!web

VvQRvyy.jpg!web

UJFfM3q.jpg!web

auIjaii.jpg!web

MZryE3U.jpg!web

e6Bjm2y.jpg!web

RzIv6zr.jpg!web

iEZ3aaa.jpg!web

Efya2iV.jpg!web

iIFfi2n.jpg!web

U7nYnab.jpg!web

ayURb2i.png!web Moderators

niiIveN.jpg!web

232

IN-GAME

4,646

ONLINE

996 IN CHAT

Enter chat room

Founded

11 October, 2012

Steamworks Site

Steam Stats


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK