Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

DarkRift Networking 2

Discussion in 'Assets and Asset Store' started by Jamster, Feb 7, 2018.

  1. perevezentsev

    perevezentsev

    Joined:
    Nov 5, 2014
    Posts:
    6
  2. Jamster

    Jamster

    Joined:
    Apr 28, 2012
    Posts:
    972
    Unfortunately, DarkRift does not work on WebGL at the moment, WebGL doesn't support TCP/UDP sockets.

    *Technically you can make it work on WebGL by writing a custom network listener plugin but I wouldn't recommend doing that if you're a new user!
     
  3. Ugochuks

    Ugochuks

    Joined:
    Apr 23, 2018
    Posts:
    6
    the embedded server doesn't seem to work on unity 2018 versions but works fine on unity 2017
     
  4. Ugochuks

    Ugochuks

    Joined:
    Apr 23, 2018
    Posts:
    6
    i guess it has something to do with the scripting runtime versions
     
  5. Jamster

    Jamster

    Joined:
    Apr 28, 2012
    Posts:
    972
    I've heard problems with this. Changing runtime to .NET 4.5. seems to work for people.

    I tried to debug the issue a few weeks ago and just couldn't reproduce it but I'll have another look :)
     
  6. Ugochuks

    Ugochuks

    Joined:
    Apr 23, 2018
    Posts:
    6
    I decided to go with the console server approach. I want to run it on Linux machine but i have no clue how to compile for Linux. A mini tutorial would be very helpful
     
  7. Jamster

    Jamster

    Joined:
    Apr 28, 2012
    Posts:
    972
    There are two approaches, if you're using the Free version then you can use Mono to run the server; if you're using the Pro version then you can use either Mono or .NET core :)
     
  8. perevezentsev

    perevezentsev

    Joined:
    Nov 5, 2014
    Posts:
    6
    Thanks. Unity LLAPI's NetworkTransport works in WebGL in case you'll consider that platform (although it's painful to use).
     
  9. Jamster

    Jamster

    Joined:
    Apr 28, 2012
    Posts:
    972
    I'd like to support WebGL eventually, but it's not high on my priority list at the moment I'm afraid!
     
  10. Jamster

    Jamster

    Joined:
    Apr 28, 2012
    Posts:
    972
    Hey all!

    Since it's nearing the end of the year now I want to get feedback on how everyone's using DarkRift and where people want to see improvement. I've drawn up a 10-minute survey, mostly multiple choice, and I'd be very grateful for people to take some time to fill it out.

    This is a great opportunity to anonymously guide DarkRift's development and give feedback on things you do and don't like about everything DarkRift related!

    https://goo.gl/forms/gVqxNXcQDtcQdvHU2

    Jamie
     
  11. Ceciphar

    Ceciphar

    Joined:
    Jan 21, 2017
    Posts:
    51
    Done!
     
    Jamster likes this.
  12. Jamster

    Jamster

    Joined:
    Apr 28, 2012
    Posts:
    972
    Don't forget to fill out the developer survey above if you haven't!
     
  13. Jamster

    Jamster

    Joined:
    Apr 28, 2012
    Posts:
    972
    Exciting News!
    The latest results on the developer survey (see above to fill it out, last few days remaining!) say that 60% of you would be happy to contribute to documentation if it was open sourced.

    So this weekend has been spent converting the documentation from the old XML format used by Sandcastle to docfx's much nicer markdown format, and I'm happy to announce it's now open for contributions here:
    https://github.com/DarkRiftNetworking/DarkRift.Documentation

    You can preview the 2.3.1 docs in the new format here:
    https://www.darkriftnetworking.com/DarkRift2/Docs/2.3.1-docfx/

    As with the old documentation, it will be released at the same time as new DarkRift versions and historic versions will still be accessible. The next DarkRift release will be using this new documentation format.

    There's a lot of potential for work on the new docs including a nicer template, linking pages together more (it never got done because it was awful in Sandcastle), and possibly even merging in the Wiki if it makes sense.

    I hope this is an exciting prospect for everyone! Contributions welcome!
     
    LostPanda, theuncas and Ceciphar like this.
  14. EthanHooper1023

    EthanHooper1023

    Joined:
    Jan 19, 2017
    Posts:
    3
    Hello,
    I have been working with the unity engine for quite a while now with a few launched games but I'm new to any sort of networking. I have been wanting to develop an asynchronous game for mobile where player A takes a turn then "passes" it to player B who gets a notification for their turn to start. I can't seem to find many services that can help me along. Is DarkRift2 able to do this in Unity and if so where can I start.
     
  15. Jamster

    Jamster

    Joined:
    Apr 28, 2012
    Posts:
    972
    Hi there,

    DarkRift can certainly do some of the work! DarkRift can handle the networking side of things once you're in the game (and it would do that pretty easily by the sounds of it!) but it doesn't support things like push notifications so you'd need an additional asset/service to do that part for you :)

    If you want to get started then there's a tutorial on the website here!

    Jamie
     
  16. EthanHooper1023

    EthanHooper1023

    Joined:
    Jan 19, 2017
    Posts:
    3
    Great thanks! and just to be sure what about sending short recorded audio messages for them to be played when player B joins.
     
  17. Jamster

    Jamster

    Joined:
    Apr 28, 2012
    Posts:
    972
    Short audio messages should be fine for your use case. With DarkRift 1 I did at one point have a decent VoIP demonstration going, and the Dissonance voice chat asset can use DarkRift 2, audio shouldn't be a problem!
     
    Willbkool_FPCS likes this.
  18. bingofly

    bingofly

    Joined:
    Sep 15, 2018
    Posts:
    3
    Hi Jamie,
    About "Bi-channel UDP and TCP for reliable and unreliable communication", dose it support reliable-UDP?
     
  19. Jamster

    Jamster

    Joined:
    Apr 28, 2012
    Posts:
    972
    The bichannel UDP/TCP uses UDP for unreliable and TCP for reliable traffic, so there's no RUDP involved. However, if you need RUDP it's possible to swap the bichannel listener for your own listener based on ENET or something!
     
  20. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,368
    I was really excited about DarkRift, its a pity about WebGL not being supported :(

    I thought WebGL just used websockets over TCP?
     
  21. bingofly

    bingofly

    Joined:
    Sep 15, 2018
    Posts:
    3
    Hi Jamie,
    Thanks for reply.
    After reading the doc and test some demos, I'm very intrested in DarkRift and wanna use it in my indie multiplayer game. Of course I should add my own listener by myself, but the truth is I'm really new to any sort of network. By some tests I found the RUDP is better for network synchronization than the UDP or TCP in my game. Is there any possibility that you could add listener base on RUDP in the DarkRift Pro? So I can buy it and use RUDP :)
     
  22. Jamster

    Jamster

    Joined:
    Apr 28, 2012
    Posts:
    972
    You're right in that it uses websockets over TCP but the problem is that DR's default bichannel listener isn't compatible with the added websockets layer. It is certainly possible to get DarkRift working with websockets by building your own custom listener, there's just no websockets listener provided out of the box yet.

    So it's possible, just requires more advanced work than normal!

    Adding RUDP support via ENet or Hazel isn't too bad an idea for Pro actually! I would recommend that you start with the default bichannel listener and when you get to a high enough confidence level, then try implementing an RUDP listener. Your game logic wont change at all so switching to a different listener would be an easy upgrade!
     
    Meltdown likes this.
  23. unity_ElVfcy1GAoiN4A

    unity_ElVfcy1GAoiN4A

    Joined:
    Nov 27, 2018
    Posts:
    6
    Hello. I have question how to connect this server with database? I just find out Dark Rift 2 dont need connector... and i dont rly know anything about servers and basic knowledge about databases. And i cant find any tutorials how can i do this....
     
  24. Jamster

    Jamster

    Joined:
    Apr 28, 2012
    Posts:
    972
    DarkRift plugins are just C# code, essentially you can do anything you can do in C# in a DarkRift plugin in a pretty similar way. With that in mind, you should be able to modify any decent database-C# tutorial to DarkRift pretty easily (provided you have a little C# experience).

    Without knowing what you're building it's hard to really recommend the right database so I suggest read around and do plenty of research, find a tutorial, and then once you've done the tutorial, think about moving it over to DarkRift!