All Projects → ValveSoftware → Gamenetworkingsockets

ValveSoftware / Gamenetworkingsockets

Licence: bsd-3-clause
Reliable & unreliable messages over UDP. Robust message fragmentation & reassembly. P2P networking / NAT traversal. Encryption.

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
CMake
9771 projects
python
139335 projects - #7 most used programming language
shell
77523 projects
Roff
2310 projects

Projects that are alternatives of or similar to Gamenetworkingsockets

Stun
A Go implementation of STUN
Stars: ✭ 141 (-97.57%)
Mutual labels:  networking, peer-to-peer
Reliablenetcode.net
A pure managed C# socket-agnostic reliability layer inspired by reliable.io and yojimbo
Stars: ✭ 122 (-97.89%)
Mutual labels:  game-development, networking
Quavo
An open source OSRS emulation server aimed to be fast and informative.
Stars: ✭ 12 (-99.79%)
Mutual labels:  game-development, networking
Gossip Python
Implementation of the gossip protocol
Stars: ✭ 100 (-98.27%)
Mutual labels:  networking, peer-to-peer
Flopnite Ue4
A remake of the popular battle royale game, Fortnite, made in Unreal Engine 4 and integrated with Amazon GameLift
Stars: ✭ 250 (-95.69%)
Mutual labels:  game-development, networking
Ice
A Go implementation of ICE
Stars: ✭ 114 (-98.03%)
Mutual labels:  networking, peer-to-peer
Entitas Sync Framework
Networking framework for Entitas ECS. Targeted at turnbased games or other slow-paced genres.
Stars: ✭ 98 (-98.31%)
Mutual labels:  game-development, networking
Lance
Multiplayer game server based on Node.JS
Stars: ✭ 1,161 (-79.97%)
Mutual labels:  game-development, networking
Pydark
PyDark is a 2D and Online Multiplayer video game framework written on-top of Python and PyGame.
Stars: ✭ 201 (-96.53%)
Mutual labels:  game-development, networking
Socket.io Client Unity3d
socket.io-Client for Unity3D, which is compatible with socket.io v1.x
Stars: ✭ 147 (-97.46%)
Mutual labels:  game-development, realtime-messaging
Quantumgate
QuantumGate is a peer-to-peer (P2P) communications protocol, library and API written in C++.
Stars: ✭ 62 (-98.93%)
Mutual labels:  networking, peer-to-peer
Peerdiscovery
Pure-Go library for cross-platform local peer discovery using UDP multicast 👩 🔁 👩
Stars: ✭ 476 (-91.79%)
Mutual labels:  networking, peer-to-peer
P2p
Practice project to demonstrate p2p file sharing.
Stars: ✭ 16 (-99.72%)
Mutual labels:  networking, peer-to-peer
Rust Libp2p
The Rust Implementation of the libp2p networking stack.
Stars: ✭ 2,062 (-64.42%)
Mutual labels:  networking, peer-to-peer
Zerotierone
A Smart Ethernet Switch for Earth
Stars: ✭ 7,839 (+35.27%)
Mutual labels:  networking, peer-to-peer
E Books
A collections of FREE ebooks
Stars: ✭ 143 (-97.53%)
Mutual labels:  game-development, networking
Game Networking Resources
A Curated List of Game Network Programming Resources
Stars: ✭ 4,208 (-27.39%)
Mutual labels:  game-development, networking
Libzt
ZeroTier Sockets - Put a network stack in your app
Stars: ✭ 486 (-91.61%)
Mutual labels:  networking, peer-to-peer
Comunidade
Informações sobre a comunidade da Rocketseat
Stars: ✭ 546 (-90.58%)
Mutual labels:  networking
Entt
Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much more
Stars: ✭ 6,017 (+3.83%)
Mutual labels:  game-development

GameNetworkingSockets Build Status

GameNetworkingSockets is a basic transport layer for games. The features are:

  • Connection-oriented API (like TCP)
  • ... but message-oriented (like UDP), not stream-oriented.
  • Supports both reliable and unreliable message types
  • Messages can be larger than underlying MTU. The protocol performs fragmentation, reassembly, and retransmission for reliable messages.
  • A reliability layer significantly more sophisticated than a basic TCP-style sliding window. It is based on the "ack vector" model from DCCP (RFC 4340, section 11.4) and Google QUIC and discussed in the context of games by Glenn Fiedler. The basic idea is for the receiver to efficiently communicate to the sender the status of every packet number (whether or not a packet was received with that number). By remembering which segments were sent in each packet, the sender can deduce which segments need to be retransmitted.
  • Encryption. AES-GCM-256 per packet, Curve25519 for key exchange and cert signatures. The details for shared key derivation and per-packet IV are based on the design used by Google's QUIC protocol.
  • Tools for simulating packet latency/loss, and detailed stats measurement
  • Head-of-line blocking control and bandwidth sharing of multiple message streams ("lanes") on the same connection. You can use strict priority values, softer weight values that control how bandwidth is shared, or some combination of the two methods. See ISteamNetworkingSockets::ConfigureConnectionLanes.
  • IPv6 support
  • Peer-to-peer networking:
    • NAT traversal through google WebRTC's ICE implementation.
    • Plug in your own signaling service.
    • Unique "symmetric connect" mode.
    • ISteamNetworkingMessages is an interface designed to make it easy to port UDP-based code to P2P use cases. (By UDP-based, we mean non-connection-oriented code, where each time you send a packet, you specify the recipient's address.)
    • See README_P2P.md for more info
  • Cross platform. This library has shipped on consoles, mobile platforms, and non-Steam stores, and has been used to facilitate cross-platform connectivity. Contact us to get access to the code. (We are not allowed to distribute it here.)

What it does not do:

  • Higher level serialization of entities, delta encoding of changed state variables, etc
  • Compression

Quick API overview

To get an idea of what the API is like, here are a few things to check out:

  • The include/steam folder has the public API headers.
  • The Steamworks SDK documentation offers web-based documentation for these APIs. Note that some features are only available on Steam, such as Steam's authentication service, signaling service, and the SDR relay service.
  • Look at these examples:
    • example_chat.cpp. Very simple client/server program using all reliable messages over ordinary IPv4.
    • test_p2p.cpp. Shows how to get two hosts to connect to each other using P2P connectivity. Also an example of how to write a signaling service plugin.

Building

See BUILDING for more information.

Language bindings

The library was written in C++, but there is also a plain C interface to facilitate binding to other languages.

Third party language bindings:

Why do I see "Steam" everywhere?

The main interface class is named SteamNetworkingSockets, and many files have "steam" in their name. But Steam is not needed. If you don't make games or aren't on Steam, feel free to use this code for whatever purpose you want.

The reason for "Steam" in the names is that this provides a subset of the functionality of the API with the same name in the Steamworks SDK. Our main reason for releasing this code is so that developers won't have any hesitation coding to the API in the Steamworks SDK. On Steam, you will link against the Steamworks version, and you can access the additional services provided by the Steam Datagram Relay network. On other platforms and stores, as long as you ship a version of your game on Steam, you can probably still take advantage of these services! Contact us to get a console version of the code, and see the Steamworks documentation for more info.

If you aren't a Steam partner, or don't have a version of your game on Steam, then use this opensource version of the API and take advantage of the permissive license to do whatever you want. We want you to take maximum advantage of the features in the Steamworks version. That won't happen if this API is a weird "wart" that's hidden behind #ifdef STEAM, which is why we're making this opensource version available.

The desire to match the Steamworks SDK also explains a somewhat anachronistic coding style and weird directory layout. This project is kept in sync with the Steam code here at Valve. When we extracted the code from the much larger codebase, we had to do some relatively gross hackery. The files in folders named tier0, tier1, vstdlib, common, etc have especially suffered trauma. Also if you see code that appears to have unnecessary layers of abstraction, it's probably because those layers are needed to support relayed connection types or some part of the Steamworks SDK.

Security

Did you find a security vulnerability? Please inform us responsibly; you may be eligible for a bug bounty. See the security policy for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].