Hi i’m working on a project for a while its an open world online game (Maybe something like GTA) and now its time for making all the game play and everything online . I just can’t get how to do it . I can’t use steam because its unavailable in my country . i’m a bit confused with this multiplayer thing , due to my searches i have to have a dedicated server so that all clients will join to it . now if i’m right with that dedicated server thing . i have 2 question first for creating dedicated server as i saw in tutorials they compile the engine from the source and change some codes and it worked right ? is this the only and the right way to go ? and second after i did this how can i create lobby , sessions and for example how can i create a team deathmatch ? as long as “Create Session” “Find Session” … are only for subsystems . because for my game i have to rent a server run the dedicated server on it and for example 100 people are able to join to that dedicated server and every 10 of them likes to be in a different session.
again I’m so noob in networking correct me if i’m wrong
“for creating dedicated server as i saw in tutorials they compile the engine from the source and change some codes and it worked right ? is this the only and the right way to go ?”
No, every build of UE4 with server code can run in dedicated server even editor build, all you need to do is start game with -server option in command line. you only need that special build if you want build of the game that can only run as a server, which typically needed if you got paid game and you want to give out server for it for free. Read about it here:
“and second after i did this how can i create lobby , sessions and for example how can i create a team deathmatch ? as long as “Create Session” “Find Session” … are only for subsystems . because for my game i have to rent a server run the dedicated server on it and for example 100 people are able to join to that dedicated server and every 10 of them likes to be in a different session.”
Yes those features are only provided by online social services, you would need to create your own OnlineSubsystem using your server services or even something more simple outside of it, but it is recommended to use OnlineSubsystem for better portability. you would need to look up OnlineSubsystemNull code (which oyu should build from it) and other OnlineSubsystem implementations to see how they are build
Online sessions is actually optional to support online game social services like Steam, PSN and Xbox Live under same interface, but as any other network application you normally connect via IP address. If you dont have founds or time or knowledge to do all the server work, this is also viable option to consider, look at minecraft, lack of lobby systems didn’t stop it from being ultra popular in era of social networks, not to mention this is how most multiplayer games operated before 2010s. This is most basic form of multiplayer so you can always build up on top of it, i mean all online services from OnlineSubsystem are just method of hosting and listing servers, it does not change how game server it self works (atleast not as drastically)
You might also consider waiting for Epic games online service to open up, maybe they be accessible for your country, if Fortnite or Unreal Marketplace is accessable for your country, it should be ok, or else you in one of those US sanctioned countries then Epic can’t provide service by law:
Again for now you can concetrait on making game work just by IP connection, you can always add online subsystem later, so while waiting Epic services to open up you can continue making the game
Also note that game server it self can not be used as a lobby system, or else you modify the engine. The standard model that UE4 operates is single game server = single session that runs only one instance of the game. I could see emulation of multiple session to be possible with some tricks and strategic thinking, but if you would connect 100 people it would be like connecting 100 to single game session with all consequences of it in terms of performance
wooooow Thanks a lot it really helped you saved a week of searching. so i’ll use each dedicated server as a session (and that actually will fixes a a huge amount of complexity ) again thank you for all your information and your time . can you name all the services that you know ? things like SpatialOs ? and how can i run several dedicated server on one PC ? i haven’t test that but as long as each pc has its own IP if several dedicated server runs on one pc all of them will be in one IP . correct ?
thanks really i didn’t know such a thing exist . BTW if you where me , and you were developing an online game what exactly would be your road map ? i wanna know the exact way that you would do it . again thanks for your respond and time .
I actually don’t know enough to recommend a roadmap for you. My online programming experience is limited to single-map (very small too) game with 4-8 players.
Actually it wasn’t even online, it was LAN!