Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Showcase Sharing an opensource delay-based rollback netcode project with some success in internet tests

Discussion in 'Multiplayer' started by genxium, Apr 17, 2023.

  1. genxium

    genxium

    Joined:
    Jun 7, 2013
    Posts:
    3
    Hi all, it's a great pleasure to share my project https://github.com/genxium/DelayNoMoreUnity here to show that with relatively simple principles and small amount of codes, Unity can help build a multiplayer Platformer game that works well in internet. There's a thorough introduction to "build & run" as well as the underlying algorithm in README hence I'd like to skip it.

    I feed on every star/folk/clone to fuel my future update, please take it if you find it useful :)

    Here's a part of a recorded play between a celluar 4G Android and a Wifi Android via internet, with successful UDP holepunching it was a smooth 60 fps experience for me (full video is here, it's a Chinese netdrive service, please don't click if you're not happy with that).
    Internet_Dual_1_Merged_SpedUp.gif

    The project has implemented the below notable features by far.
    • Automatically correction for "slow ticker" (including a lockstep-ish approach), especially for "active slow ticker"
    • Peer-to-peer UDP holepunching whenever possible, and will fallback to use the backend as a UDP relay/tunnel if holepunching failed for any participant (kindly note that UDP is always used along side with WebSocket, where the latter is a golden source of frame info)
    • Frame logging toggle for both frontend & backend (i.e. backend/Battle/Room.frameLogEnabled), useful for debugging out of sync entities when developing new features
    There're also upcoming features already implemented in the old project and will be available very soon (you're welcome to view them in the old project's Github repo).
    • Basic fireball and melee bullets, as well as the associated "pushback", "blowup" and "get up" movements
    • Backend dynamics toggle
    • Recovery upon reconnection (only if backend dynamics is ON)
    (recording of old project, also using UDP holepunching and via internet)
    OldVersion.gif
     
    Last edited: Apr 22, 2023
  2. genxium

    genxium

    Joined:
    Jun 7, 2013
    Posts:
    3
    Sharing a recent update on the project, now it's supporting
    • Basic fireball and melee bullets, as well as the associated "pushback", "blowup" and "get up" movements
    • Rollback compatible NPC patrolling and vision reaction
    Please checkout the latest screen recording as follows.