I’ve been brainstorming about a rather tough concept I can’t tackle. For the MMORPG I’m working on I wrote a custom UDP backend (not using Unreal’s server software) because I can taylor it more for MMO needs than the default software (which seems to be opinionated around FPS-like and small-area-based games).
There is one problem I cannot find a solution for, which is movement. The player cannot jump or fall and pretty much is always glued to the navmesh area. Although I have movement working by replicating actors, this is “cheatable” (players could e.g. change their speed or walk through obstacles if they defeat the client-sided collision). The speed is easily tackled in the server by checking the time taken traveling from point A to B and then seeing if that went faster than a player can move.
Anyway, the thing I have issues with is collision. To verify players colliding on the server end, I need a way to check if an actor walks through an obstacle and if so, roll back to the last position. I had thought of a few options:
AABB export: Exporting the maps in a way I can load them into the (headless) server. Then using AABB I could possibly verify collision however it would not be as accurate as the game client would compute it.
Navmesh export: Exporting a navmesh in a way that I can verify a path and test if a specific point the player walks on is “unwalkable”.
Headless: Using a “headless client” which the server replicates all the movement to as if it were a real player, but this fake player has privileges to flag a movement as “false” when it collides with scenery.
These methods sadly have downsides (ones I can think of, that is):
AABB export: would probably be very inaccurate for most cases (see this image)
Navmesh export: I don’t think this feature exists in Unreal and finding a way to load it on the server’s end would be tough too. On top of that I question how accurate I can make this as it’s not really “collision” (even though everything happens in 2d space really, as there is no jumping).
Headless: this would require an extra client for each “feasible” zone (it’s certainly not an option to let that user compute the entire map…)
I’d love to have someone share their knowledge or insight on this problem as I’m pretty much clueless at this point.
As I understand it, your client is Unreal but your server is not - correct? The problem you’re going to run into is your Client will be loading UE4 maps, but your server has no concept of that data. So, you’ll either need integrate that into your server, trust the client (never a good idea), or export the data the server cares about (e.g. Collision, NavMesh, etc) into some format your server can load (FBX, or what not). You’ll also run into issues if you decide to use Blueprints to do anything server side (scripted NPC battles, etc).
I think while having a custom server backend is attractive at first sight, you’ll have issues in the long run. UE3 was used in plenty of MMOs and UE4 is already used in a bunch of large survival “MMOs”. You may want to take another look at just using UE4 for your server rather than re-inventing the wheel, which we are all guilty of from time to time.
Thanks for that reply, I guess you’re right. I just wasn’t too sure on whether Unreal’s dedicated server system would support something like MMO-open-world games because of the large map and number of concurrent players. I would rather upfront have to make certain decisions that make it harder than finding out in the end that Unreal’s networking is not suitable for the MMO I want to create.
Are there any “proven” MMO(RPG) games in Unreal 3 (or 4) that you know of? It might help me to check them out and see what they managed to realise.
If you wanted a seamless world where various zones were running across multiple servers, you’d need to replace it so you could elegantly hand off the client. But I think you could get by with the standard networking if its a more Zone (e.g. Map) based approach. Just depends on the requirements of your game.
Correct me if i’m wrong, but all MMOs i know which have “free movement” (not based on mouse clicks) don’t have server side collision for movement, do they?
E.g. World of Warcraft - You got detected by the anti cheat if you teleport, but server side collision for movement didn’t exist.
It does exist for visibility and enemy movement though - at least on the X & Z axis
e: I know, doesn’t help with your problem because you need the map data anyway for visibility detection and enemy movement, but i could imagine server side movement collision for players would cost a hell of performance.
It’s easier to just use Unreal’s server instead and make the game based on instanced dungeons; a lot easier to develop…
But, the Unreal server is very resource hungry and it will cost you a LOT every month to host a MMO based on this default server architecture; on the long run, if you want to save a LOT of money with hosting, you better make your own server code instead.
For instance, compare UE4 Dedicated Server to Phton server. UE4 Server is HUGE!
I’ve seen also some other MMO servers from asian games; they are really tiny software as well. You can run several of them on a single hardware, that will not work for UE4 dedicated server though.
don’t type Ph.o.ton at its entirety or you gonna spawn that annoying topick hijacking pr guy from them ^^ *
Your bandwidth costs normally far exceed your hosting costs. Hardware is cheap (relatively). Bandwidth is not and most your bandwidth costs are going to depend on gameplay systems (stats, character customization, etc x number of concurrent players). It’s more important, in my opinion, to get something up on screen working as quick as possible so your designers/artists/other programmers can spend time building a fun game. A super tiny server application is pointless in a game that is no fun (or isn’t ever going to launch). Replacing the back end with a leaner executable can be done as you reach the optimization focus of your development cycle. Keeping Design unblocked and working is paramount given the amount of content you need in an average MMO.
Bandwidth is cheap, too! A 10 gigabit unmetered connection, backbone routed, at a co-location facility is maybe $2k/month these days. Chances are, your hardware costs will be higher.
If you go with Amazon, though, prepare to pay through the nose for bandwidth. They aggregate many providers to improve quality, but evenso, I would expect that their markup is generating significant profits for them.
That being said, I would recommend running a headless Unreal on the server. Linux should work fine for this. You don’t need to use Unreal’s physics; you can directly call the navigation mesh; you can also avoid a bunch of overhead in the actor/component system if you don’t need those bits on the server (because they mainly support eye candy and behaviors.)
The C++ code is there. You can build it, and add whatever you need to support your game. You could have a single MMOServerActor that does all of the work for all of the clients and networking, yet has access to the full Unreal world, collision, and navigation systems as an Actor. You don’t need to create Actors for each of your logged-in players, if the MMOServerActor takes care of the communications and verification.
It does help! I wasn’t aware that WoW didn’t really test for collision but only had anti-cheat. I always though they must’ve been doing some testing instead of just assuming it was all legitimate :p.
Yeah, that is more or less the reason why I wanted to go with custom architecture on the backend. I have enough experience to develop that - sadly not enough experience to tackle this topic though haha.
Just to clarify, do you mean running the UE4 dedicated server or do you refer to the third bullet on my list (the headless client)?
I did look into Lineage 2 a few days ago and found a large private server repository of L2J and it seems they handle all movement serversided (server receives the click, computes the movement, broadcasts path to clients). You can look at the repository here.