Thanks for reading my question and I’m not good at using English but I’ll try my best to explain my idea
I’m not crazy because I’m not working on a MMO project.There are only 50 clients connecting to Server.But there are more than 2000+ even 7000+ characters with AI.And normal delicate server can’t afford this.(My test shows the high line is 1400)
So I need more than one server to simulate these characters.And I thought about setting a master server with many child servers.But communication is really a problem because they are simulating different parts of one map.Characters in the map will move cross servers’ bound frequently.
Then after searching, I got an idea from forum.Just like this picture:
Let’s just image there is a client already connecting to four server.
There are four servers simulating one map together.And there are many characters in this map.
When a actor spawned(by client’s RPC call), each server will spawn because they receive this message.But only the server which the actor is in its area will simulate and replicate this actor.Other just keep it “silent”
Then when there is a client move to the bound, it can easily see things in each side (both two server replicate actors to the client).
But when a actor move to the bound, it has to make a RPC call,or tell its client owner to make a RPC call to make the server in another side know it will soon come into the server’s area.So the server will quickly move the actor in server at right location as the client told.Then start simulating and replicating.The old server will detect the actor is move outside its area and stop simulating and replication.
I think it’s not a bad plan.But I don’t know how to make a client connect to other server without changing map.I read the source code of “UEngine::Browse”, so I think I may need to create another NetDriver.But how to make new Actor channels,set up actor replication from another server is still no idea.
Anyone having idea?
(I need to say sorry first because I’m not good at English as I say so if I misunderstand your idea,please don’t get angry
I’m looking at a similar problem right now. I am coming to think that the Unreal Engine is not suited for MPOG where transitions of characters must happen from one server to the other. At least not their build in network. The solution I am currently exploring is to make my own network connection through a master server that is a stand alone program and does not use Unreal. To make contact between the servers I use a third party tool (Raknet). Maybe it’s easier for you if you use such a tool to send messages between servers rather than using the Unreal network scheme
May I ask how do you deal with Actor replication if you don’t use Unreal’s Network? It looks Actors are using ActorChannel to replicate themselves to clients,so if you change the network solution, do the Channel System still work?Or you just made another system to replicate your actors by yourself?
What I try to do how is made many UWorlds (for example,four),and each one is connected to one server,then copy the actors’ state into the game worlds.I’m still trying yet:)
Sorry I just saw your answer. I assumed that the Forum would tell me if there are new posts in threads I was active in, but thats not true
Anyway, I am still in the infancy, learning Unreal and switching my game, which was pretty far, from another graphic engine to UE that’s why I have been thrown back months. But the general Idea is to have a Main server that’s pure C++ and sends data down to an Unreal client. That client then has a small C++ part which handles the network and forwards data to the Blueprint part of my code where the main work happens.
I implement all replication myself.
If you can confine into these few limitations, solution shouldn’t be too hard:
Player can see mobs that exist in all 4 tiles, at the same time.
Player can interact only with mobs on server C
There is a (brief) ‘loading’ step (either hidden with loading screen, or with a freeze) when player moves between tiles.
If these fit your project, you could either add back-end to keep information where all mobs are, or use something simple, like TCP Sockets to communicate this info between servers, so then when client is connected to server C, mobs from other 3 servers are spawned and shown by server C, in locations that are controlled by other servers.
When crossing the boundary, you would switch server and map via GEngine->SetClientTravel() or similar…
Actually I run path finding on client.
And I test the performance of delicate server. AI code is not the most slow code. Character movement costs so many time on each tick
So, main objective here is to distribute server CPU usage caused by so many characters moving, right? Of those “up to 7000+ characters” can a player interact with most of them? Perhaps player is controlling armies of mobs moving around and attacking?
If CPU is biggest obstacle, perhaps you should look into multi-threading, rather than multi-processing – it could give you much simpler overall architecture.
Is pathfinding or actual execution of movement along the path biggest problem?