Personally, I’d set up the server with Unity, as I would guess that in most cases, you’ll have rather significant game logic residing on the server, and the way Unity is handling networking (making extensive Use of NetworkViews) might be tricky to set up only using RAKNET (I don’t know that API as “standalone”, so I don’t know how much of what Unity is using is part of that API).
I could think of a few other good reasons creating your server with Unity, like very nice testing features, sharing code between client and server etc. etc. etc.
The major disadvantage of that approach is that Unity doesn’t support a headless mode, yet - at least not for Unix or Windows (which I think is a much more convenient server OS than Mac OS… simply because it’s available, and comparatively cheap to get dedicated servers with these OSs). I hope that when more people are developing multplayer games, the issues involved in setting up (distributed, hosted) standalone servers will be handled… This has been brought up before, so I won’t repeat it…
The solution is to simply switch off the cameras and live with the inconveniences of having an application where you would actually want to have a service (speaking “Windows speak”). Or having to rent a Windows server, where you might prefer renting a Linux box
If you can live with that, check out the examples and the documentation - it’s really rather well-documented (except for a few things that haven’t been updated, yet - you can now use bool and byte[ ] as parameters for RPCs). The server would then simply be a “different build” of your game project, and based on, for instance, a variable globally accessible through a singleton pattern, you could check the relevant code paths.
Btw, I’m using the master server functionality even though I’m also only having one single standalone server that clients connect to. Reason is simple: It seemed to me that this is the easiest and most painless way of setting things up (including NAT punchthrough and stuff like that).
Um… links… see my other posting in thread;
http://forum.unity3d.com/viewtopic.php?t=9478 (almost at the end, I had a little collection of nice links into the documentation)
If you really want to build your server based on RAKNET (without Unity wrapping around it), I guess Larus is the only one who can help you
Jashan