My goal is to create session based game (like LOL, Dota, CS:GO etc).
What exactly do i mean?
First of all, i need authorated dedicated server, which will accept connections of all players.
Then players will start “searching” 5v5 game.
Then they will load map and begin playing 5v5 game.
After game, they will return to lobby (Gameless state).
Lobby will contain Chat and Friend List.
Ok.
How do i suppose to do that using UE4 built-in networking?
Now i will try to guess, and i need your help to approve or correct me (i dont actually know yet how UE4 networking work):
All i need is to create single project of my Game.
Then i will create Lobby module which will be compiled using “SERVER” target platform, with #ifdef SERVER checks, to prevent Client from having Server code.
When players found game, they will enter different networking Channel for specific Session.
Session networking logic will be mostly created using Blueprints, i hope.
So, i will have to crate one project and compile it with 2 different ways, 1st with target = SERVER, and 2nd with target = CLIENT.
Then i will run SERVER version on dedicated server, and CLIENT will be downloaded by players and connect to SERVER.
The question is:
Is this scenario possible with UE4 built-in networking?
May be you know some docs or examples for such scenario?
I want to begin developing, but i will have to know what to expect. Help pls. Thx.
Learn game developing successful consist mainly begin with basic things not begin doing a Dota/CS game.
The same for learning multi-player.
People respond to specific questions (if you have luck and they have time), normally not “how to do a dota game”
Since you have the access to the UE4 sources, all scenarios are possible. if you are asking if you can do this only with BP, then the response its NO, i recently found i need small changes in C++ for something like avoid the character get destroyed when player leave/disconnect, something not ok for a Dota style game, easy fix but you need C++ and you can found more problems while developing that need use of C++
You must expect that doing a complex game isn’t a easy task. You need time, dedication and willingness to learn yourself.
I know i need C++, i am just asking 1 question: Is my scenario possible by using UE4 built-in networking? Without using Sockets or other networking libraries or changing UE4 networking code.
no, for something like Dota you need a login/register/score/player or other persistent info, etc you need some communication with sql or web server, you can use a SQL plugin, Json communication or sockets.
I can do Database communication on Server-side by any method.
I am asking only about Server-Client communication.
Is there Rooms support in UE4 networking?
Is there Global Lobby (for all connected users 1000+) support in UE4 networking?
Is there Sessions support in UE4 networking?
EDIT1:
I need something like FOnlineSubsystemSteam, but for Linux.
I can’t help you on that, i learning doing a MP game and i do the lobby/register/login and all that thing inclusive sessions support without use any engine specific API
Now i am trying to understand, how OnlineSubsystem communicate with UE4 replication-networking…
I can only guess right now:
May be OnlineSubsystem is used only for GlobalLobby/Login/Database abstraction, but also has some CreateSession function, which runs separate UE4 session with built-in UE4 replication/networking support…
I dont know.
Is there any example projects for using OnlineSubsystem and Sessions?
You can’t directly use UE4 dedicated server as lobby server, because it’s hardcoded nature (in fact you can, but it is bad solution). But, you can write your own online subsystem and lobby server using sockets, wich will communicate with each other, and use ue4 dedicated server instances for game sessions. Online subsystem interfaces like sessions and UniqueNetId are used in dedicated server logic (you can investigate it in clases AGameMode and AGameSession). For your scenario it is the best.
In our MMORPG game online subsystem, extended with our own interfaces, is used to communicate with our game logic server (we call it Sol server), which communicates with db, dedicated servers (wich are “Location” servers in our scenario), and other clients. When player wants to enter to specific location (by rules of game logic), Sol notifies Location server about player’s assigned net id and access token, and takes to client Location server’s url for travel to it. Then player plays on Location server using unreal networking code (replication, RPC, etc.).