A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
New Unity Live Help updates. Check them out here!
Discussion in 'Assets and Asset Store' started by Jamster, Feb 7, 2018.
@Jamster Does it work on WebGL?
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!
the embedded server doesn't seem to work on unity 2018 versions but works fine on unity 2017
i guess it has something to do with the scripting runtime versions
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
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
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
Thanks. Unity LLAPI's NetworkTransport works in WebGL in case you'll consider that platform (although it's painful to use).
I'd like to support WebGL eventually, but it's not high on my priority list at the moment I'm afraid!
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!
Don't forget to fill out the developer survey above if you haven't!
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:
You can preview the 2.3.1 docs in the new format here:
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!
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.
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!
Great thanks! and just to be sure what about sending short recorded audio messages for them to be played when player B joins.
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!
About "Bi-channel UDP and TCP for reliable and unreliable communication", dose it support reliable-UDP?
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!
I was really excited about DarkRift, its a pity about WebGL not being supported
I thought WebGL just used websockets over TCP?
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
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!
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....
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!
DarkRift 2.4.0 has been submitted to the asset store!
Firstly, sorry about the lack of transparency, updates and general information about this release. I've had very little time, some horrendous bugs (just because of the nature of this update!), Christmas, illness, and then even more bugs all since the last release!
This is a huge release, and has some really awesome feature in though, so I hope it's worth the wait!
Firstly, you can now easily measure round trip time to the server or client. *Almost* all of the byte arrays DarkRift uses behind the scenes are now recycled (hence the tonnes of horrendous bugs I've had!) New system tests have been added to make development a bit easier, and many of the unit tests have also seen improvements. And the sniffer has had an update and can now output the data it sniffs.
Check out the full list below!
There are currently some issues with the new build in the recycling of byte arrays internally. If you find you're now getting random `NullReferenceExceptions` from `ObjectCache.ReturnInstance` then try adding the following line to your server configuration:
If you're getting exception son the client side I'm afraid I have no fix for you at the moment!
If anyone finds any other issues don't hesitate to let me know!
DarkRift 2.4.1 has been submitted to the asset store!
This update is essentially a mass of bugfixes, most of which were introduced in 2.4.0! Special thanks to Deusald for finding almost all of them aha
Hello! I am making a game with photon, but it looks like it would be too expensive to handle it with it(if I would release it). So I am thinking that maybe I need to switch to something without CCU limit(like Dark Rift). Currently I have tanks(they can move, shoot so it works nice). Should I remake everything to Dark Rift, or leave it as is?(I am a beginner, so I am afraid that I will break everything..)
Up to you really! The best advice I can give to you is to do the DarkRift tutorial and see what you think, then duplicate/branch your project and start working on a DarkRift version. If at any point you decide you no longer want to switch then just go back to the old version!
DarkRift 2.4.1 is now available on the asset store!
Thanks for the reply, I think that I should try to switch my game to Dark Rift. But I guess I will need a lot of help!
I was just testing to see if DarkRift would connect to Hamachi instead of localhost and it seems to be now struggling and not even starting, any suggestions?
I think you reached out in the Discord server and had some responses there so I'll just continue the conversation there!
Looking at Unity's FPSSample, They have some pretty neat UDP Pitfall workarounds, like packet loss and packet order compensation.
Would you consider looking at the code and implementing something like that into dark rift at some stage? i know DR is low level, but these are fairly important items.
oh no!!! did i miss the sale?
Those are both commonly requested features. DarkRift currently, by default, uses TCP and UDP channels so you can already send reliable packets via TCP, furthermore you can build a custom NetworkListener plugin and make DarkRift operate using another UDP library if you really need reliable UDP (there's already an ENET one available)!
Message order is trickier with DarkRift. Because DarkRift is very multithreaded at the moment having any form of sequencing on packets would damage performance quite significantly. Even if you send via TCP in the default network listener you're not guaranteed to receive the messages in order with DarkRift!
You can build simple sequencing systems on top of DarkRift, and I generally recommend that because you can usually get a lot more flexibility at the loss of a lot less performance
I hope that helps!
P.S. I have no idea if there was a sale or not, Unity don't tell me!
DarkRift 2.4.2 has been submitted to the asset store!
This has some initial fixes and refactoring for the issues we've seen since 2.4.0, most notably this fixes a bug where the wrong sized memory was returned from the cache and a bug where the cache wasn't getting enabled properly.
DarkRift 2.4.2 is now available on the asset store!
Hey guys! This week, I've mostly been doing some stuff on the website in order to get a repository of previous versions up. I wanted to make sure this would work not just for free users but also pro users (you guys paid me after all!) so that's why it's taken a little time. If you want to get your hand on previous versions you can now do so here:
https://www.darkriftnetworking.com/DarkRift2/Releases/Pro/<version number>.unitypackage?invoice=<your invoice number>
There's only a small set of versions available though I'm afraid, I just haven't remembered to keep an export of each version. The following are available currently:
2.1.0 (Pro only)
2.3.1 (Free only)
Hope you enjoy it!
I see Discord mentioned, but I cannot seem to locate the server, what's the server name?
Here's an invite link! It should just be called DarkRift Networking!
Is it at all possible to use references within the plugins? Such as adding the nuget package newtonsoft.json and then referencing and using that lib within the plugin? I can build successfully but after I bring the DLLs over to the plugins folder and run, everything craps out. Any ideas? Or is this not supported?
EDIT: Nevermind, I figured it out. Something near the json code was breaking causing the fault. Sorry about that.
DarkRift 2.4.3 has been submitted to the asset store!
This version fixes a few of the major bugs with message corruptions, improves performance for the .NET Core build, and a few other smaller things. There are definitely still some major bug lurking but I want to get this out to help stabilise your development as soon as possible!
The update is already available on the website here:
https://www.darkriftnetworking.com/DarkRift2/Releases/Pro/2.4.3.unitypackage?invoice=<your invoice number>
Hi! I'm new to DarkRift2 and I'm trying to set up the unity embedded server. Server and Client works as expected. My question is, is there a way to broadcast once the server starts and the client to listen for broadcasts? Or what is the way you suggest for setting up a local-multiplayer game when devices are connected to the same network?
I'm not sure I'm quite clear on what you need here, are you asking for a way for clients to discover the server to then connect to it, or are the clients already connected to the server and you're just starting the game?
The former DarkRift doesn't support without delegating that to your code to do but the latter sounds like it's simply a for loop iterating over each client sending a 'start' message to everyone
My question was about the former. Does DarkRift provide LAN capability? If so, what is the best way you'd suggest to connect two mobile devices in the same wifi network?
DarkRift will work fine over LAN with a PC as the server but it sounds like you're intending to have the server on one of the mobile devices which isn't supported.
If that is the case then you would probably want to host a relay server in the cloud for the two mobile devices to connect to and communicate via.
Does this work on MacOSX. I unzipped the server and they were EXE files