Well, as you know, MMO’s such as World of Warcraft don’t contain the server inside the client.
What my question is, is that if both the server and the client need to be on the same scene, will this not expose ALL of my servers code, making private servers easy to make a full replica.
Is there any way to make all of the servers code completely isolated, seen as Unity lets you pick scenes to include with the build.
Hi
Two things
1- If you have a code in a project, regardless of scenes that you build, the code will compile and will be included in your assemblies.
2- You can separate client and server scenes and just use the same geometry and colliders in both. Then you can build the client like this
A- Create a scriptto create a copy of the project,
B Delete any server related Script from the copy project
C build all client required stuff.
To build server it’s great to do this.
A Create a copy of the project
B delete any client related stuff,
C delete any unrequired components in the server side part like mesh renderers and mesh filters and Audio Listeners and … which will save you memory and then build server scenes
Ok, second question. If I wanted to make a standalone server from scratch using java, are any specific libraries required as far as networking is concerned?
Unity uses C#, so you can use java, but you’ll have to create your own library that is compatible with both C# and java.
Both languages supports sockets, so you’ll be able to connect them together. But the rest is up to you…
I don’t think such library already exist (forget me if I’m wrong)
I use lidgren, which is a decent C# library that works with unity, so maybe it’s better to look into that first.
If u want to do the logic in java then electrotank or smartfox are your solutions which allow java programs as their server side logic extensions.