alvyxaz / barebones-masterserver

Master Server framework for Unity
476 stars 106 forks source link

[Question] Can I build the following structure with this framework? #164

Open maxi-pc opened 6 years ago

maxi-pc commented 6 years ago

I want to create a single server with divided workflow, for example. Client >

Login Server Chat server Game Server (hidden / behind the scenes) Game Server (hidden / behind the scenes) Game Server (hidden / behind the scenes)

Game Servers divide heavy work such as: Player house creation, NPC / MOB / Wildlife spawners, Localized player marketplaces, etc...

The server will have multiple channels, each channel will handle it owns player created housing separate from one another (if player A creates housing in Channel 1, then moves to Channel 2 the house will NOT be there)

Will the core features of this framework help me with such design, or not?

Thank you very much for your time,

Max

ghost commented 6 years ago

The Framework is just that, a framework. You can build anything on it, it just provides an easier way to setup a MasterServer with all the implementations you decide to use. So, in some sense, it would help you.

First of all, there is already a Login module implemented, with encryption and the rest. You only need to provide a database implementation. There are various "ready" database implementations inside Barebones folder. As for the chat module, there is something lying around but I haven't tested it yet.

Now, what you mean by a GameServer having multiple channels, I would either have each channel you mention be a GameServer itself, or break the way I handle my data in my database implementation. That way, the player should be able to choose the "channel" and you automatically move the player to a specific map. That, I presume, would need to have all your different "channels" and their maps in the same scene, because they would all be running concurrently in the same GameServer.

If you really want each channel to be its own server, then you can use 3 Spawners, each one spawing a max number of GameServers (channels) you want and setting up the way you want it to work. Important Note: The Framework will not help you at all with the GameServer LOGIC, but you might find its Message API quite useful.