I am working on a multiplayer networked game with a dedicated authoritative server, clients connecting from a web player, and am experiencing server issues and wondering if Raknet would be a better choice for my game. However, I'm not finding an easy introduction to Raknet. Can anybody answer a few questions? 1. Does Raknet come with Unity 2.6? Or do I need to download it separately? 2. How integrated into Unity 2.6 is Raknet? Is it a transparent implementation? Or do I need rethink my coding? 3. Is there any documentation or a tutorial written that gets you started with using Raknet on your server? Thanks!
1. There is a masterserver file created from RakNet. Here it is: http://unity3d.com/support/documentation/Components/net-MasterServerBuild.html 2. First, you need Pro. You will be calling Raknet through a plugin inside of Unity...i believe. 3. The RakNet website has general info on it. Nothing specific to Unity as far as i could see. hope this is helpful.
2/3. Unity's NetworkViews are RakNet driven actually. You have no access to anything related to raknet for manual usage, you can decide to use NetworkViews or implement an own solution. Thats why you don't find any information on it on the RakNet page.
And you are not able to put your own raknet plugin (unity pro) on a webplayer game. So you have to use libs which can be used without plugins like photon or smartfox server (please correct me if one of these is plugin based) OR you have to use unity's builtin raknet solution. If you want to use unities builtin networking raknet stuff, then wait for unity 3.0, because in 2.6 it's too buggy. Cheers Ethan
Thanks everyone for the replies. A couple more questions for those who have already figured this stuff out, if you don't mind. And, yes, I have Unity Pro. So, is RakNet primarily designed for master server implementation? Does it not make sense to implement RakNet if I'm not implementing a master server design? The game I'm working on that I'm referring to does not have nor need a master server. It's just experiencing a lot of lag in object creation and I'm wondering if Raknet will speed things up. However I will be needing to implement a master server on another project I'm working on that is still relatively early in development. When I read that RakNet won't work in webplayers, does that mean that I cannot have a client running as a webplayer? Or only the server? Why I would run a server as a webplayer I don't know, but I just want to be clear. Dreamora, when you say Unity's network views are RakNet driven, what do you specifically mean? That I'm already using RakNet and it's just transparent to me? Or that with my existing network views will integrate with the proper RakNet libraries? Ethan (and/or others), you say I should wait for Unity 3.0. Is RakNet going to be transparently built in to the 3.0 release? Thank you all so much!
You cant use RakNet in webplayer builds because these cant load plugins like DLLs. RakNet is a whole networking library not a masterserver. You can do a masterserver with RakNet, but you don't have to. Unity uses RakNet internally, but you don't get direct access to it, it's kinda wrapped with unity's logic. There will be a newer version of RakNet and Mono in Unity 3.0, the unity networking stuff stays the same. Cheers Ethan