Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Showcase RakNet Networking

Discussion in 'Multiplayer' started by ep1s0de, Jun 25, 2019.

?

Did you like the demo?

  1. Yes

    34 vote(s)
    91.9%
  2. No

    3 vote(s)
    8.1%
Multiple votes are allowed.
  1. beheadedwarrior

    beheadedwarrior

    Joined:
    Jul 24, 2020
    Posts:
    8
    As someone who has worked with raknet extensively I strongly suggest you drop raknet for something more maintained.
    1. There are 63 open issues on github, including some serious security vulnerabilities here, here, here, and here
    2. Memory leaks and data corruption. here, here, here, and here
    3. Its been over 6 years since any updates to the library.
    4. The library is bloated, and has many features that are straight up broken.
    5. The coding practices are outdated and "slow" in comparison to more modern approaches.
    6. Prone to dead locks.
    7. The c# library is generated using swig and is a nightmare on the garbage collector.
    The DOS vulnerabilities make the library unusable, even with ddos protected servers clients can abuse raknets code to make software specifically designed to crash your servers.
     
    ConAim likes this.
  2. ep1s0de

    ep1s0de

    Joined:
    Dec 24, 2015
    Posts:
    168
    I'll post the source code soon...

    The lagocompensation system did not work because in single-threaded mode, FPS falls heavily, in fact it works but only because of poor performance, I deleted it, and the performance falls due to the fact that I save the position of hitboxes every tick and to make it all work, you need to switch to ECS and I do not want to (too lazy to study ECS :) )
     
  3. ep1s0de

    ep1s0de

    Joined:
    Dec 24, 2015
    Posts:
    168
    How long have I been using the library and have not noticed such problems.
     
    Litwin likes this.
  4. Litwin

    Litwin

    Joined:
    Aug 15, 2013
    Posts:
    70
    I understood, it would be great to be able to learn the technologies without using ECS, as it would increase another stage of difficulty.
     
  5. AdvsNoob

    AdvsNoob

    Joined:
    May 27, 2013
    Posts:
    13
    Is this still being worked on? Looks really cool, I tried to build it but kept getting errors relating to RakNet.dll.
     
  6. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,363
    Hello, does this solution use nat-punch through? Can it use the RakNet facilitator here?

    I am trying to work UDP packets to the facilitator to establish a connection using System.Net.Socket. Not luck yet though.
     
    ep1s0de likes this.
  7. ep1s0de

    ep1s0de

    Joined:
    Dec 24, 2015
    Posts:
    168
    not used ... But there is a plugin for RakNet in the project
     
  8. ep1s0de

    ep1s0de

    Joined:
    Dec 24, 2015
    Posts:
    168
  9. ep1s0de

    ep1s0de

    Joined:
    Dec 24, 2015
    Posts:
    168
    RakNet Updated!
    - Fixes bugs and crashes
    - Added Query - to request data about the server
     
    PutridEx likes this.
  10. ep1s0de

    ep1s0de

    Joined:
    Dec 24, 2015
    Posts:
    168
    RakNet Updated!
    - Restrictions on connections from the same address for some time
    - You can disable encryption to implement your own encryption method, disabling encryption reduces the size of packets
    - Minor bug fixes

    Visit Github for more information
     
    Last edited: Feb 21, 2021
  11. ep1s0de

    ep1s0de

    Joined:
    Dec 24, 2015
    Posts:
    168
    RakNet Updated!
    - Fixed a bug with sending packets over channels (some data was not sent or received)
    - Added a pool for the bitstream
     
  12. GcRayden

    GcRayden

    Joined:
    Mar 25, 2013
    Posts:
    4
    I'm actually working on a project I started 6 years ago with the original Raknet. Since my project had Raknet built in the foundation, now I have to lift it up because of lack of unity support on newer versions.

    I wanted to ask you a few questions:

    1. If I switched to this version of Raknet, I should be able to use it on consoles (PS4, Switch, Xbox) correct?
    2. Does this have the same functionality as the original Raknet? What's missing?
    3. Does this have Master Server capabilities? As in, I can host a server list from Unity Master Server and connect to it.
    4. Can you choose which data to buffer, or not to buffer - where to send it (Server, Client, or Both)?

    Sorry for all of the questions, I've just been looking for a suitable replacement for a while now and I would like to know all of these things before I rip everything out and begrudgingly re-add networking to my game so I can release while on the newest Unity.
     
  13. ep1s0de

    ep1s0de

    Joined:
    Dec 24, 2015
    Posts:
    168
    I can't answer the question, because I focus on Standalone builds, and I've never built projects for consoles...
    All the main functionality works (sending/receiving, recording using bitstream, etc.) with the exception of NAT traversal, I'm still working on it
    You can make your own master server with your own server database and request information about the server over UDP (there are examples on github)
    Depending on where and to whom to send, there are different options for sending data in RakNet by default, you can distribute packets by priority, by channels, and by reliability of delivery

    If you want to implement a network game in the likeness of Peer2Peer (like Photon Cloud) , then this will not work with RakNet at the moment.
     
    PutridEx likes this.
  14. ixdeveloper

    ixdeveloper

    Joined:
    Jan 5, 2016
    Posts:
    14
    Looks great, would love to try it! I cannot find the updated RakNet server source code however, only the client DLL:s. Is there a way to build these for other targets (ARM, ARM64) as well?
     
    ep1s0de likes this.
  15. ep1s0de

    ep1s0de

    Joined:
    Dec 24, 2015
    Posts:
    168
    It is possible, but it will take some time...
     
    ixdeveloper likes this.
  16. ep1s0de

    ep1s0de

    Joined:
    Dec 24, 2015
    Posts:
    168
  17. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,352
    If anyone has time to make one, please do :)
     
    ep1s0de likes this.
  18. ChakibChemso

    ChakibChemso

    Joined:
    Jun 25, 2019
    Posts:
    9
    so thats it? is it still ongoing project or got dropped?
     
  19. Romenics

    Romenics

    Joined:
    Jan 10, 2015
    Posts:
    4
    Wow, if it works, we will try to update our project from unity 2017. Thanks for this work!