Zone-based multiplayer with blueprints, dedicated Servers and their security

Hello everybody,
Since the beginning of UE4 I’ve been using it to make single-player games and never really looked into networking in Unreal Engine.
In my newest project I’d like to make a multiplayer game where people meet in zones (Small maps, like Towns in WoW or similar; transition between these maps don’t have to be walkable => just load another level if you want to switch) where they can chat with each other, form groups etc. (socialize) before they start a match of the game on another map where the actual gameplay happens.

So, I’ve got these components:

  • Login Scene (they login, then should get redirected to a zone (can be a single one with a fixed IP for now)).
  • Zone Scene(s) (basically a dedicated server where players meet (no gameplay))
  • Game Scene(s) (where preformed groups play, should get redirected from a zone (another standalone server I assume))
  • (Optional: - Transition Scene(s) (Like a Zone but with the purpose of getting to another Zone (you can’t start a match here)))

My questions are:

  • How do I get a player to connect to a server and load the map the server is running with Blueprints? By now, whenever I login and try to connect to a server with “Execute console command” I always land up in my own session and can’t find other players.
  • What is the best approach to fit these components into my project? Should I make different Unreal Engine Projects for each of them?
  • How do I differ between Server and Client Blueprints (I don’t use C++ by now) when packing the client? I just know there is a macro for C++ Code, but not for blueprints.
  • Are any components mergeable? Like, should I put Zones and Transition Scenes together since they almost fit the same purpose (walking around with others)
  • Are there any frameworks for Unreal Engine that are recommended to use for such an “MMO”? (e. g. SmartFoxServer for Unity; Blueprint solutions preferred)

I hope someone can help me with my questions. :slight_smile:
Sincerely,
.

If you are not using a Subsystem (Like Steam or your own self-programmed one), then you are limited to either LAN Sessions (So the Session nodes that are available in Blueprints will only find LAN Sessions)
or connecting directly with the “Execute Console Command” - Node via IP with the command “open IPADDRESS”.

If you have a Subsystem integrated, you can also have ServerLists and join them like, for example, a Counter Strike Server List, where you find other Dedicated Servers.

Hm, don’t really know. I would say you can just make them different Maps. Dedicated Servers can only run one map at a time. So for each zone you need to have a new Dedicated Server.
Means you can just start up one Server with the Map “Login Scene”. One with the “Zone Scene” and one with the “Game Scene”. And of course multiple other Dedicated Servers for
multiple “Zone and Game Scenes”.

And at this point i highly recommend to maybe search for an alternative to the Dedicated Servers of UE4, since UE4’s Servers are not build for MMOs. They are more made for traditional
things, where Players play on one Server and one map and not a multiple different Maps at ones. Hosting so many Dedicated Servers could be an overload. So you might want to integrate
a ThirdPartySystem (like SmartFox for Unity) to UE4.

The node “SwitchHasAuthority” differs between Server and Client in Code. There are no blueprints that are extra made for Server or Clients. Despite the usual stuff that is not
replicated, like GameMode only exists on Server. UI only on Client etc. But things like Characters are one Blueprint for Server and Client and the code is differed by the Switch node
and RPCs.

That’s really up to you. That’s a design point for your project. Can’t help you here.

No idea. I mostly think that people trying to make an MMO should pretty much know what they do. A single developer should NOT get the idea of MMOs at all!
I DON’T want to crush dreams and ideas here, but an MMO is way too big for a single developer, even if he exactly knows what he’s doing.

Implementing all the stuff you asked for will need you to write C++ code. I HIGHLY doubt you can do this with Blueprints only. The whole “SmartFox” stuff needs
extra code and C++ implementation (as long as no one writes a plugin, but that would limit you to use that exact implementation, rather than yours).

Reading your questions, you don’t really know the Framework of UE4 yet. Let alone the Network Framework of it.
I recommend you to move this project aside and learn the Engine first. And also learn the Engine in C++. Otherwise you will be stuck at so many things pretty fast.

I don’t think a genre like MMO can be done in Blueprints only. I see too many stuff missing in it. For example the option to include third party stuff like “SmartFox”.

Hey eXi,
Thanks for your extended reply!

The game I thought of is not a MMO in the traditional way.

Basically I want to have a fixed amount of dedicated servers running one map only where players can transit to if they decide to leave one zone. There don’t have to be a seamless transfer.

And then I want game servers running the maps with game modes.

I want to go with this concept to replace traditional matchmaking menus to have a better social experience.

Hm, that would still need some C++ work i guess to manage the Servers. You could probably start them on different ports and just save the port number for the different “zones”.
So 5000 would be the start zone server. Then you could let the Player Client Travel to other Server.

And it will still need to have either a central place of saving the Characters Data or some kind of save and load system.

Character Data are loaded from an external service, that is working already.

Is it possible to structure it such that you have a dedicated server for each “communal zone” and when players exit the zone, generate their own “instance” by having the client host his own listen server?

On a smaller “MMO” (less than 100 synchronous logins?), the dedicated server could just keep tabs on whos exited the common zone through which gateway and redirect anyone else into that listen server (the one the first player who exited made). Of course provided it still exists/the player hasnt gone to a different zone/any other preset condition that tells that player to just start his own listen server.

Is there a way to retrieve a clients IP on login and pass that around programatically to re/direct where other clients connect?

Your on dangerous ground. Allowing players to host the sessions opens up security flaws. A player could open a zone and start overwriting things to cheat.

Not only that but it would have to be known up front that your system is passing out their ip information and that they are in fact incurring a possible load on their hardware and bandwidth.

You might also run into an issue where a player spawns and instance and their Internet is the ****. Then you have a laggy less then optimal situation.

I find you need to always sit back and look at what could happen before you look at how you want to move forward. “Hope for the best but prepare for the worst.”

Yes, i understand those concerns and i do take them into considerati. I still wanna know if its possible though.

I want to make a smaller game that i dont really intend to release to the general public for friends and such and it just seemed like a plausible way to bypass alot of the back end networky bits.

The bit about the IP is a concern i agree. Stealing that and doing unsavory things with it is a much bigger (and harder to contain) problem than some douche running around trolling people.

Im still curious if currently implemented features will allow such a system.

I would speculate that the current system doesn’t support that put of the box. You would be looking at a different OSS to pull it off. Some sort of mater server system or database that would hold active instances and remove inactive ones while sharing that info with clients as they required. You could play with sessions a bit but I’m not sure it is going to be anywhere near as powerful as I think your needing.