Riptide Networking Documentation

repository·main·Indexed 23 days ago

https://github.com/riptidenetworking/riptide

A lightweight C# networking library optimized for multiplayer games, compatible with Unity and other .NET environments. It provides low-level control over connection establishment and data transmission via UDP, TCP, and Steam transports. The library features three message send modes—Unreliable, Reliable, and Notify—to balance delivery guarantees, ordering, and efficiency.

Tokens
8.2K
Snippets
12
Records
59
Agent score
78%

What's inside Riptide Networking

  1. What is Riptide Networking?

    main

    Riptide Networking is a lightweight C# networking library designed for multiplayer games. It is compatible with Unity and other .NET environments (such as console applications).

    It provides the low-level primitives for establishing connections and exchanging data, allowing developers full control over the data being sent and the timing of transmissions. This makes it suitable for developers who want to manage their own networking logic and understand the underlying communication flow.

  2. Overview of Riptide Networking

    main

    Riptide Networking is a lightweight C# networking library designed for multiplayer games. It is compatible with Unity and other .NET environments (such as console applications).

    The library focuses on providing the low-level functionality required to establish connections and exchange data, allowing developers full control over the data being sent and the timing of transmissions.

  3. Replace Server.AllowAutoMessageRelay with MessageRelayFilter

    main

    The Server.AllowAutoMessageRelay property and shouldAutoRelay parameter have been removed to prevent unintended message relaying.

    New Approach: To relay messages, assign a Riptide.MessageRelayFilter instance to the Server.RelayFilter property. The server will then automatically relay only the messages whose IDs are explicitly enabled in that filter.

  4. Available Low-Level Transports

    main

    Riptide supports several transport layers for moving data across the network. You can use built-in transports or third-party implementations depending on your requirements:

    • UDP Transport: Built-in, typically used for high-performance, unreliable/ordered data in games.
    • TCP Transport: Built-in, typically used for reliable, ordered data streams.
    • Steam Transport: A third-party implementation available via SteamTransport.
  5. Platform and Environment Compatibility

    main

    Riptide's compatibility depends on the transport layer used:

    • Default Transport (UDP Sockets): Works on PC, Mac, Linux, iOS, and Android.
    • Steam Transport: Works on platforms supported by Steam.
    • Unsupported: There is currently no web transport, so Riptide does not work in browser-based games. VR and consoles have not been officially tested.
    • Runtime: Since Riptide is not dependent on Unity, it can be used in any environment capable of running C# code, including .NET console applications, Flax Engine, and Godot.
  6. Update the Assembly Version in RiptideNetworking.csproj

    main

    To prepare a new release, update the assembly version in the RiptideNetworking.csproj file:

    1. Increment the version number in the VersionPrefix tag using semantic versioning.
    2. Update the version number in the PackageReleaseNotes tag to point to the new release notes link.
    3. Commit the change with the message: Bump version number to <version here> (e.g., Bump version number to 2.1.0).
  7. Get started with Riptide Networking

    main

    Riptide Networking is a lightweight C# networking library designed for multiplayer games in Unity or other .NET environments (like console applications). It provides the foundation for establishing connections and exchanging data, allowing developers full control over the data being sent and the timing of transmissions.

    To begin using Riptide, follow these steps:

    1. Follow the installation instructions.
    2. Follow the guide on setting up the basics.

    If you are upgrading from version 1.1.0, refer to the upgrade guides to ensure compatibility with newer versions.

  8. Install Riptide in Unity via DLL File

    main

    If you cannot use the Package Manager, you can manually add the compiled DLL to your Unity project:

    1. Download the RiptideNetworking.dll from the latest release or build it from the repository source.
    2. Place RiptideNetworking.dll anywhere inside your Unity project's Assets folder.
    3. Recommended: Also download and place RiptideNetworking.xml in the same folder to enable IDE intellisense for the API documentation.
    4. Optional: For Unity-specific functionality, manually add the MessageExtensions.cs class to your project, as it is not included in the DLL.
  9. Add Release Notes to the Documentation

    main

    Follow these steps to document the new version in the manual:

    1. Update Installation Instructions: In Docs/manual/overview/installation.md, update the version number in step 4 of the Unity Package Manager instructions. You must update all 3 occurrences (the package URL and the two following text mentions).
    2. Create Release Notes File: Create Docs/manual/updates/release-notes/v<version>.md (e.g., v2.1.0.md).
      • Update the _description metadata.
      • Update the # v<version> Release Notes header.
      • Update the Unity Package Manager install URL.
      • Update the version comparison link (format: [link](url_to_prev_version_vs_new_version)).
    3. Update Table of Contents: Add the new file to Docs/manual/toc.yml.
    4. Verify: Build the documentation site locally to ensure it renders correctly.
    5. Commit: Use the message Add v<version> release notes (e.g., Add v2.1.0 release notes).