Hub and Instance Multiplayer Model - need help

Hi, completely new to gamedev, but have a concept thats been nagging to be created. A critical part of this is the multiplayer architechure: i want to create a system similar to the original guild wars (that being city hubs/lobbies surrounded by instance zones which are affected by quests/missions). naturally i have no idea what this would entail and would like some pointers.

the way i see it is characters are stored on a master server, client is pointed to the last hub that character was in. Hubs are never destroyed, but instances are upon failure state (booting the client back to last hub). the way this concept works in my head is the client sends a launch request to the master server upon interacting with the zone change mechanic, the master server then launches another DS to play that instance sequence until return to hub. everything is a separate instance of the game’s dedicated server. this seems to be the easiest method of creating the system.

now, i wish for all these to be on the same hardware/server/computer.

anyway, thank you for taking the time to read this mess.

This is the setup that I have worked on for my current project:

I have one central server which is written in Java. This Java server uses .NET TCP ports to communicate with the server instances and the clients. When the central server first starts, it will decide on how many Unity instance servers it needs before players can correctly connect to it (it would assume 1 per HUB) It would end up running code like this:

This will simple run a batch file that is located right next to the server.jar that should look something like this:

This will launch a copy of the Unity Server Instance. This should then connect to the Java central server and the java server will decide what kind of instance this is, and what scene to load.

The player will sign in to the central server, and the central server will then tell the player the IP and port to connect to (the one of the instance they are trying to reach) and their client will connect to the instance server. You can make this part more secure by having the central server tell the instance server who is about to connect before they actually connect. That way, you can disconnect people you don’t want in this instance for security reasons.

There is a lot of work in this, but I just recently completed programming this for myself, so I can tell you that it works great if done properly.

EDIT: This is also assuming that you are running from a windows server.

Great then. Most of people posting these actually don’t know even anything about programming. You obviously know and started correctly. However i want to recommend you to take a look at www.muchdifferent.com and their uLink, uLobby and uZone set of products. They are cheap compared to the time required to develop all of these and work well. You’ll have benifits if you at least use uLink instead of built in networking for your games and use your own java based server for hubs/lobbies/…

uLink is like unity’s built in networking system and unlike other middlewares doesn’t require you to write server logic in another platform but has many powerful additions.
1- separate prefabs for client, server and proxies (proxies are clients not owning your character)
2- serialization of custom classes in RPCs
3- unreliable RPCs
4- choosing security flags on a per RPC basis instead of per game

If you are interested in coding your game server in java as well then take a look at smartfox server and electrotank.

Hope this helps

Yeah… My custom multi-player code can already do everything that uLink can. It also won’t cost me 500 per title.

Great then! Going with own’s technology is the best decision whenever you have the ability to do so :slight_smile:
I doubt that your java code can run logic inside unity itself but surely you can make that possible with a thin C# layer as well.