Friday, August 25, 2017

Can I do server side programming with unity?



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?



Answer



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.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...