Another thought to my last question. If i were to do a client/server game with unity3d would i be able to do serverside programming with unity? if not can i use C# .net? if not then is there some sort of package or lib i can use with C++? is the communication just raw sockets?
-
1\$\begingroup\$ @fireDude67: I'd do it if i liked the answer :( or if it wasnt a wiki like question \$\endgroup\$ – user1047 Jun 24 '11 at 21:57
-
2\$\begingroup\$ Congrats, you went up 16.7% \$\endgroup\$ – Joe the Person Jun 24 '11 at 23:17
Unity's built-in networking is RakNet. As far as I know, inside Unity it's only really for peer to peer games (i.e. you can't really run a standalone server).
Most web games I know of that use Unity and have multiplayer use Exit Games' Photon. Paradise Paintball uses it. So does Atmosphir. You write server code in .NET that gets compiled to a DLL and run with their server software. There's a client DLL you can just drop into Unity along with your own specific code.
You can't distribute the server since it's licensed per machine you're running on, but if you just want clients to be able to connect to your servers then it's a proven solution for that.
-
\$\begingroup\$ hmm, good link, +1 \$\endgroup\$ – user1047 Nov 17 '10 at 16:01
There are multiple tutorials on network-based programming:
- Unify MMO Tutorial - This uses SmartFoxServer
- Unity iPhone Multiplayer Tutorial - While this applies to iPhone development, the networking part of it still applies
- Unity Networking Example - An example project which shows how to use NetworkView's
- Can I Make a MMORPG in Unity? - UnityAnswers question about making MMO's with Unity
Network programming can be done in C#/Boo, not sure about JavaScript.
Another way to get client/server programming done is with Unity Pro/C++ Plugin
You can using this
Master server can facilitate connecting to your server.
Which would be most useful for fps or rts style games where players connect to each other to play a game.