How do modern games solve the NAT issue in multiplayer?

This page summarizes the projects mentioned and recommended in the original post on /r/gamedev

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • lidgren-network-gen3

    Lidgren Network Library

    I use the NAT holepunching implementation in https://github.com/lidgren/lidgren-network-gen3 for my game, and it works without issues for most users.

  • GameNetworkingSockets

    Reliable & unreliable messages over UDP. Robust message fragmentation & reassembly. P2P networking / NAT traversal. Encryption.

    I do wonder if you'd get better performance if the clients connected to an adapter running on the local machine, and those adapters then communicated through the bridge over UDP. Valve made their networking library opensource, so you could just directly use that. It'll do the p2p STUN stuff for you, and if that fails you could route the traffic through your server(s) (and at least it will UDP behind the scenes, so hopefully less acknowledgement latency).

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts