background top icon
background center wave icon
background filled rhombus icon
background two lines icon
background stroke rhombus icon

Download "Урок 9 | Unreal Engine 5 Мультиплеер - Список серверов | Подключение к сессии / UMG"

input logo icon
Table of contents
|

Table of contents

0:00
Содержимое
0:46
Widget Список серверов
5:04
Закрытие и открытие Виджетов
7:25
Widget Строка с информацией о сессии
8:32
Widget Создать сервер
11:08
Widget Открыть уровень карту
11:39
Вывод виджетов в главное меню
12:32
Переключение между окнами
13:37
Загрузка
14:57
Стиль курсора
16:02
Создание сессии
18:18
Список всех карт (level)
19:45
Настройка сессии
24:24
Открытие карты (level)
25:54
Вывод списка сессий
28:42
Вывод информации о сессии
31:03
Подключение к сессии
32:16
Удаление сессии
33:48
Проверка
Video tags
|

Video tags

cyberstars
unreal engine
unreal engine 5
unreal engine 5 уроки
unreal engine мультиплеер
как создать игру
создание игр
создание сессии
сервер
сессия
создание сервера
мультиплеер
лобби
подключение
blueprint
blueprints
программирование
session
UMG
UI
интерфейс
listen server
online
subsystem
как создать сервер
игра
ue4
ue5
matchmaking
браузер серверов
online subsystem
unreal engine 4
networking
online session
gamedev
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:00
lesson 9 list of servers
00:00:04
in this video we will touch on such an important
00:00:06
thing as creating a session and connecting to
00:00:09
sessions in the first part we will create
00:00:11
umg widgets namely for creating a session
00:00:13
that is for a multiplayer game and
00:00:16
for connecting to other sessions this
00:00:18
will be a list of servers the
00:00:20
name will be displayed here number of players and
00:00:22
Pink from the second part we will already start
00:00:24
programming, we will learn how to create our own
00:00:26
session so that players can connect to us, and
00:00:29
in the third part we will already connect to
00:00:31
other people’s sessions through the list of servers and in the
00:00:33
end we will test it all
00:00:38
[music]
00:00:47
part 1 creation of widgets
00:00:51
will begin with the creation the main widget
00:00:54
will be called server sheet, it will
00:00:56
contain a list of servers in the folder I will hand over the
00:00:58
server sheet folder
00:01:02
and in it I will create a server sheet widget.
00:01:06
In our game, a panel with information about
00:01:09
players and chat have the same style, it is
00:01:11
such a darkened blurred panel with
00:01:13
rounded edges background blur and
00:01:16
so that don’t copy it constantly and don’t
00:01:18
customize it, let’s create a separate widget with
00:01:20
it that will contain this window with a
00:01:22
customized style, create a new widget
00:01:25
called blure Style folders and copy
00:01:28
this Blur panel from the scoreboard widget,
00:01:36
now go to the Blur Style widget and
00:01:38
paste it, remove
00:01:39
everything unnecessary, I’ll leave only
00:01:42
background Blur we created this panel
00:01:44
in previous lessons here Blur strang at 30
00:01:46
blure radius 40 and rounding 20 also
00:01:50
indents on all edges 12 and now in order to
00:01:53
place elements from another widget into it
00:01:54
we will move the
00:01:57
namends Slot element inside and here it should be emphasized that
00:01:59
it is better to immediately rename the Slot for example
00:02:02
add some numbers at the end or for
00:02:04
example My Name Slot, if you don’t
00:02:07
do this, problems may arise.
00:02:09
Anything you place the Slot widget the engine
00:02:11
can mark as Trash and after the
00:02:12
next start of the engine these elements
00:02:14
will be deleted. And if you
00:02:16
rename the Slot widget then
00:02:18
the contents may be deleted Therefore, it is better to
00:02:20
immediately rename this slot
00:02:23
style is ready now we can go to the
00:02:26
widget server sheet and in User created
00:02:29
find bluestyle drag and drop now
00:02:31
thanks to the slot inside it you can
00:02:33
place various elements, you just
00:02:35
need to drag and drop into the slot it is
00:02:37
called Naim Slot 0 we
00:02:41
will also take the necessary elements
00:02:43
scoreboard widget And this will be all in the contents,
00:02:46
copy
00:02:52
and paste into the slot,
00:02:55
now remove the unnecessary stuff, these are the inscriptions
00:02:58
player name, rename it to server name
00:03:03
and remove the Kills column,
00:03:06
also remove everything from bottom to
00:03:11
top, add buttons, take a button from the
00:03:14
widget, chat box
00:03:27
for it, we will need Horizon Box,
00:03:37
drag it to the top Horizon Box,
00:03:40
paste the copied button here,
00:03:43
change the text to an angle bracket, this will be a
00:03:45
button to go back, the text will be size 19,
00:03:51
then add text,
00:03:54
center it, add text server sheet,
00:03:59
stretch it across the entire width, then copy
00:04:02
the button and paste
00:04:07
the text again, replace it with Fresh, this will be a
00:04:10
list update button
00:04:11
Let's replace the inscription Death with the player
00:04:15
and the list with servers will be in the
00:04:17
scroll box; we'll copy this element from the
00:04:19
chat; it
00:04:22
just has a scrollbar configured. And we
00:04:24
stick to the same style
00:04:30
for the strip with names; we'll indent
00:04:33
12 from the bottom;
00:04:37
we'll rename the key elements; a button to
00:04:40
exit this menu; Back Button;
00:04:43
Refresh wraffresh Button
00:04:47
scroll box that will contain a
00:04:49
list of servers
00:04:52
server list
00:04:54
and stretch the scrollbox serverlist across the entire
00:04:57
window by clicking Phil the
00:05:00
main style is ready to be
00:05:04
located this widget will be in the
00:05:06
main menu go to the Main
00:05:09
Menu widget this is the main menu here we have
00:05:11
the main one add a server list button
00:05:13
just copy one
00:05:16
and simply insert the vertical box in which
00:05:18
these buttons are located
00:05:21
and drag it to the top,
00:05:23
change the inscription to the server sheet,
00:05:27
when you click on this button, the
00:05:28
previously created widget will open. That
00:05:30
is, the entire menu will disappear and the
00:05:32
server sheet widget will appear.
00:05:33
We will switch using the
00:05:36
switcher widget And we will place all the contents menu
00:05:38
widget switcher
00:05:43
and now let's add a server sheet widget to it
00:05:46
under index 0 in switchery we
00:05:48
will have the main menu and under index 0 the
00:05:50
server sheet but we have the server sheet on the whole
00:05:53
screen, make it smaller, place it
00:05:56
inside the canvas panel,
00:05:59
make it the right size
00:06:05
and align it in the center, using element,
00:06:11
round the dimensions,
00:06:13
ready to
00:06:16
open, we will open the server sheet in the
00:06:19
main menu, take its events.
00:06:23
Take the variable from the evening
00:06:28
and call Set Active Index widget
00:06:31
server sheet We have under index 1,
00:06:34
now we will close the server sheet,
00:06:36
go to the server sheet widget, call
00:06:40
events on pressing return buttons,
00:06:43
create a dispatcher event with the name
00:06:46
unbackbutton press,
00:06:48
make a count and connect with the button,
00:06:52
return to the Main Menu widget in the
00:06:55
designer where the hierarchy is selected, select the server
00:06:57
list and it will have an available event,
00:07:00
backbutton Press, this is our Ivan dispatcher
00:07:03
for pressing the button, that is, we press the
00:07:05
button in the server widget the sheet and the menu widget
00:07:07
understand this will set a zero
00:07:10
index for the switches with my menu,
00:07:14
check it, open the menu on Escape, press
00:07:17
the button and the server sheet appears, we
00:07:20
can also close it and the
00:07:22
entire menu closes on Escape,
00:07:27
now we will create a line that will
00:07:29
contain information about the server, these
00:07:31
lines will be located in the column of the
00:07:32
widget server sheet and here We will also
00:07:35
copy the style from another widget player
00:07:38
Score copy everything in the folder server sheet
00:07:41
create a new widget server info
00:07:47
now go to it and paste what we
00:07:50
copied
00:07:52
remove the unnecessary skull icon and Kills deft
00:07:57
with rename it to player
00:07:59
ready go to server sheet
00:08:03
and add the widget server info scrollbox
00:08:06
this will be temporary for clarity
00:08:12
This is how it will look
00:08:16
it was for example so delete it
00:08:19
clear the scrollbox server sheet from
00:08:22
widgets server info
00:08:25
change the labels in the widget server info
00:08:34
now create a panel for creating a
00:08:36
server this is a new widget Create Server
00:08:38
let's go to it, the background will be a bluestyle widget,
00:08:43
we'll take the structure from the server, we'll
00:08:51
remove the unnecessary sheet, we'll leave only up with a
00:08:54
back button,
00:08:56
we'll change the title to Create Server,
00:08:58
we'll remove the Refresh button, here there will be
00:09:01
options for setting up the server,
00:09:03
this is the inscription and the option itself, they will be
00:09:05
located in a column, take them from
00:09:07
Main Menu as a basis,
00:09:10
for example, this element is perfect
00:09:17
mindesired type of inscription let's make 200
00:09:21
and for the entire horizonbox line we'll add
00:09:24
a bottom indent of 12 we'll need 4 such
00:09:27
elements copy them the
00:09:31
first option will be server name
00:09:35
second server Map
00:09:37
3 maximum number of players and
00:09:40
fourth whether the session is local
00:09:42
now let's change The server settings fields themselves
00:09:45
will be an input field, a text box,
00:09:47
take it from the main menu. Let's
00:09:59
narrow this field, the padding at the top and bottom
00:10:02
will be 10. Go further, the
00:10:08
Map server will be a combo box, we already
00:10:12
have a ready-made combo box style,
00:10:13
it's located in the Option 2 widget. we used
00:10:16
in the graphics settings, namely choosing the
00:10:18
screen resolution,
00:10:20
then Max players, this will also be a
00:10:23
textbox, but we will make it narrower; we will set the
00:10:27
minimum designer type to 100
00:10:30
and by default the quantity will be entered there;
00:10:32
it will be 2;
00:10:34
LAN; we will leave it as it is; it will be a
00:10:36
checkbox;
00:10:43
the style is ready, all that
00:10:45
remains is to add the Create Server button,
00:10:47
again, take it from my menu,
00:10:55
ready to
00:10:56
call the event for pressing the Back button,
00:10:59
add an evandispatcher for the Back button,
00:11:02
call it Back Button Press, here we
00:11:09
will duplicate the Create Server widget and
00:11:11
call it creat Single widget for
00:11:13
creating a single game,
00:11:15
change the labels
00:11:22
and we’ll remove what is not required in a single-player
00:11:24
game MAX Player, let’s leave it for now, there’s
00:11:27
no point in it, so in the future, you never know,
00:11:29
bots will be added to the game. Of course,
00:11:32
inheritance could be used here. But since
00:11:34
we only have two such widgets, there’s no
00:11:35
need
00:11:37
to add these widgets. in the main menu,
00:11:39
go to the menu and add the
00:11:43
switcher widget of our Create Server menu
00:11:46
and a single server,
00:11:50
these will be indexes 2 and 3, also place
00:11:53
them in the canvas panel,
00:12:02
adjust the dimensions,
00:12:07
align to the center,
00:12:12
do the same with the Create Single widget,
00:12:15
take the width from the Create Server widget
00:12:23
align
00:12:27
ready
00:12:32
set up the switching logic take
00:12:35
events on the Click of the Create and Single buttons
00:12:43
free them from the logic
00:12:46
and switch the corresponding
00:12:48
index
00:13:03
don’t forget about the buttons to go back
00:13:27
check
00:13:34
everything works
00:13:38
after we open the widget the server
00:13:41
sheet will load sessions They are the same
00:13:44
servers but this loading process
00:13:46
takes time and so that the player, while
00:13:48
waiting, understands that loading is in progress, we will
00:13:49
add an element displaying this
00:13:52
loading, go to the server widget, the
00:13:54
server sheet will be displayed in a scroll box,
00:13:56
it is also called a server sheet, and while
00:13:59
loading is in progress, we will replace it with
00:14:00
another widget, so we will place a scroll
00:14:02
box server sheet widget switcher now
00:14:06
this scroll box is under index 0 and to
00:14:09
display the loading process in the section
00:14:11
primitive serkilor fraer
00:14:15
these are dots running in a circle,
00:14:17
we will center this element
00:14:20
here below you can adjust the
00:14:22
number of dots period and make the radius
00:14:25
60 and if there are no servers we will add an inscription
00:14:28
to servers we will add text to we
00:14:31
center the same switch,
00:14:35
change the inscription to the new servers,
00:14:37
set the size to 60 and in Color and apacity Alpha
00:14:40
make it 02 so that it is dim
00:14:43
settings in the switcher the loading wheel
00:14:46
will be at the beginning index 0 then the
00:14:49
server sheet index 1 index 2 will go to the inscription No
00:14:53
servers remember this location
00:14:59
we will change cursor when hovering over a button,
00:15:01
this can be done using the setcursor
00:15:07
or in the element settings, click on
00:15:11
it,
00:15:12
start with the button go back to
00:15:15
details in the search, write cursor, check
00:15:17
the box and select the type of cursor, this will be
00:15:21
hand, and
00:15:36
finally go to the widget server info,
00:15:39
this will be a line displaying information
00:15:41
about the session on the server, let's make the
00:15:44
cursor change completely when hovering
00:15:46
over it. Go to the defaults class and
00:15:50
find the cursor settings here. This is
00:15:57
what it will look like.
00:16:02
Part 2: creating your session,
00:16:06
we can start programming.
00:16:09
Close all unnecessary tabs; leave
00:16:12
only what relates to the server sheet; let's
00:16:15
start by creating a session. go to the
00:16:18
Create Server widget in the graph,
00:16:24
everything related to creating a session
00:16:27
is in the online Session tab,
00:16:30
these are the functions
00:16:34
we will call them Here they are all to create a
00:16:37
delete session, search for a session, this
00:16:42
function returns an array of sessions That is,
00:16:44
all sessions that were created by other
00:16:46
players Here we get a structure with
00:16:48
information of the session and we can already get
00:16:51
from it the number of playing players
00:16:54
the maximum number of players Pink
00:16:58
and the name
00:17:01
there is also a function to join the
00:17:03
session As we can see They have such a clock
00:17:07
This means that it will take some
00:17:09
time to execute after which the function
00:17:12
will report success or failure I will remind
00:17:16
the session is a union of players into a single
00:17:19
network, these functions are available by default in the
00:17:21
engine, but there is a more advanced
00:17:24
version of them, Advance Session, this is a separate
00:17:26
free plugin, we will touch on it later,
00:17:28
but now we will make simple logic for
00:17:31
creating a session, call it to press the
00:17:34
Create Server button,
00:17:37
attach the Create Session function to it,
00:17:42
attach a controller
00:17:46
here we indicate the maximum
00:17:48
number of players and whether the session is
00:17:50
local Let the number of players
00:17:52
be two and upon completion of
00:17:55
this function you need to open the card for sex,
00:17:58
take Open level by name here You need to
00:18:01
enter the name of the card and you need to pass the
00:18:03
parameters to Option this is lysen or server
00:18:06
in our case this will be a bald server,
00:18:07
so we’ll enter bald through this field, you can
00:18:10
transfer information, for example, some
00:18:12
variables, essentially all this logic
00:18:15
will create a session,
00:18:19
now we’ll make it so that you can
00:18:20
configure the session through the Create
00:18:23
Server widget, let’s start by selecting a card,
00:18:26
take the variable of this combo box And
00:18:29
we will fill it with cards Of course,
00:18:31
you can create an array in advance And place
00:18:33
cards there, but we will make a logic that
00:18:35
takes all existing levels in the project,
00:18:37
take get ast, register, pull
00:18:41
get by Class,
00:18:44
we will look for asats of the class World, these
00:18:47
are the levels,
00:18:49
here we will get their array,
00:18:53
we will get this using a loop forex loop
00:18:56
we break the breakasetdata structure
00:19:00
and we need Asad name this is the name of the level
00:19:03
we will place it in the combo box
00:19:06
using adoption
00:19:14
and we also need to display the selected
00:19:17
element That is what is displayed in the
00:19:19
collapsed list Let it always be the
00:19:21
first element index zero index
00:19:25
and we hang this on the construct,
00:19:39
now all the cards from the project have been pulled up, we
00:19:45
will continue the logic when we press the
00:19:48
Create Server button. We can also do this
00:19:49
with a created session, so we
00:19:52
first need to delete the session at the
00:19:54
beginning;
00:20:09
we will get the text
00:20:13
and check whether the text
00:20:15
from the empti is not empty,
00:20:18
at the same time we will add a check so that the specified
00:20:20
number of players is not less than zero
00:20:22
or 0, first we convert to string, we take the
00:20:26
comparison greater than string,
00:20:29
we convert integer
00:20:32
and compare with zero
00:20:34
to comply with the conditions here it must be
00:20:37
True That is, this means the entered number is
00:20:39
greater than zero and the text from the emka displays True
00:20:42
if the line is empty, take not boolean
00:20:46
at the end will be True if here is false
00:20:50
now take endbyan
00:20:54
if its Input is True
00:20:57
then here is True This means that all
00:20:59
conditions are met, that is, the line
00:21:01
is not empty
00:21:03
and the number is greater than zero
00:21:06
We can hang this on brunch
00:21:10
and check for empty server name string.
00:21:12
Also hanging branch
00:21:16
Falls will mean that the line is filled.
00:21:21
Next comes a check for the number of players line
00:21:24
and if here then we can hang logic to
00:21:27
create a session,
00:21:37
first we check whether the field with the
00:21:40
server name is filled, if not is filled then
00:21:43
True is called so the subsequent
00:21:45
logic hangs on false
00:21:47
then we check the field with the number of
00:21:49
players, here two conditions must be met: the
00:21:51
field must not be empty and the specified
00:21:54
number must be greater than zero these are all
00:21:55
Boolean operations that can be combined as
00:21:57
you like I just did it this way Well, here are
00:22:00
the necessary ones we have completed the verification operations,
00:22:02
now we can transfer data for the session,
00:22:06
the maximum number of players,
00:22:10
for convenience, we will rename the variables
00:22:14
Get servername
00:22:17
getmap
00:22:19
getmax Player
00:22:22
getlan
00:22:27
we will transfer the session the maximum number of
00:22:29
players,
00:22:33
then whether the session is local, this is the
00:22:36
getlan checkbox variable, we take a hit somewhere
00:22:42
after creating the session, the Map opens
00:22:45
in the level name you need to enter the name, take the
00:22:48
getmap variable,
00:22:51
this is the map that we will select in the
00:22:54
Get selected Option combo box,
00:23:01
pass the selected name,
00:23:06
connect all the logic.
00:23:08
After clicking the Create Server button, we
00:23:11
delete the session in case it
00:23:13
was created and then the logic will be
00:23:14
attached to Access and filer, that is, it
00:23:17
works for us in any case, finally
00:23:19
let the player know that they correctly kept
00:23:21
some indicators And this is the name of the server and the
00:23:24
number of players, take the variables
00:23:26
of these lines and take Set Error,
00:23:31
write the reason
00:23:34
for the name it will be empty
00:23:37
and for the number of players incorrectly
00:23:43
connect these functions with branches
00:23:48
That is, if the line does not pass the check
00:23:50
that we did for the input lines,
00:23:53
then these functions will be called and an error will be displayed,
00:24:00
look, we have a missing name,
00:24:04
press the Creed Server button, an error will appear,
00:24:07
enter the name but enter
00:24:09
the number of players incorrectly. That is, it is either
00:24:11
empty the column is either 0 or less than 0 and
00:24:14
an error also appears.
00:24:16
And if you fill everything out correctly and click the
00:24:19
Create Server button, then everything will work and
00:24:21
the session will be created.
00:24:25
We’ll create the logic for Create Single, that is,
00:24:27
to create a single game, we’ll copy
00:24:30
the logic to fill the combo box with all
00:24:33
possible cards.
00:24:35
Now let’s move on in Create Single,
00:24:38
select the combo box, rename its
00:24:40
variable to getmap,
00:24:46
go to the graph,
00:24:48
take the variable
00:24:50
and attach the copied logic to Construct,
00:24:59
in principle, we can not change this variable,
00:25:01
they have the same name, we
00:25:04
take it by clicking the creat Single button
00:25:11
and we will simply open the selected map,
00:25:14
first we get it
00:25:17
getzlocket Option
00:25:19
and open using the
00:25:24
Option card Compose empty Connect and
00:25:28
you're done
00:25:37
Select some map, for example
00:25:39
Open World,
00:25:41
load
00:25:47
the truth, we won't be able to play
00:25:49
because nothing is configured for it
00:25:54
part 3 connect to other sessions the
00:25:58
climax let's create a server
00:26:01
sheet list of servers go to the widget
00:26:04
server list into its logic, we will immediately
00:26:07
call the findsation function, we will attach
00:26:10
it to the contract, we
00:26:12
will pass the controller into it
00:26:15
and indicate the maximum number of
00:26:16
displayed servers, let it be 100. As
00:26:19
a result, this function will give us an array
00:26:22
of sessions, that is, an array of servers, we will output
00:26:24
it using the Forge loop, we will
00:26:27
check whether the number is there are
00:26:29
more than zero servers If yes, then we will display them
00:26:31
And if not, we will display the load,
00:26:33
take Long and attach the comparison operator
00:26:36
to the brunch
00:26:39
if with Access we check whether the
00:26:42
number of servers is greater than zero If yes, then
00:26:44
display an array with servers, set it to
00:26:46
false and get here a session is a
00:26:49
data structure about it if sessions are
00:26:51
found then there will be sex, then we check
00:26:54
whether the number of servers is greater than
00:26:55
zero That is, if the number is zero
00:26:57
then True and on Falls we have a loop
00:27:00
that displays an array And Here we
00:27:03
get the session data structure the loop
00:27:05
will create widgets server info this is
00:27:08
this a line with information about the server,
00:27:14
we create a Server info widget, we
00:27:17
will also connect a controller here
00:27:22
and we will add this widget to a scrollbox
00:27:25
in the column,
00:27:27
we take the scrolbox variable, we
00:27:30
called it server sheet and attach it from
00:27:33
Child,
00:27:35
as we remember, the scrollbox displaying the
00:27:37
server is placed with a switcher widget, it has a
00:27:40
loading wheel under index 0
00:27:42
the server itself list servers index 1 index 2
00:27:46
No servers this is if there are no servers,
00:27:49
take the variable of this switcher Set
00:27:52
activejid set the second index this
00:27:55
logic will work if the session is not
00:27:58
found we attach it to the file and also
00:28:01
hang it on the branch pipes That is, if
00:28:03
the number of servers is 0
00:28:05
now we will make the logic for Refresh buttons,
00:28:08
we take events for pressing it, we
00:28:10
delete old servers so that the array is not
00:28:12
replenished with identical sessions, we take the
00:28:15
server list variable, this is scrollbox
00:28:17
clearchildren,
00:28:20
and we switch the switcher widget to the zero
00:28:23
index,
00:28:26
and then the logic for outputting servers is triggered again,
00:28:33
and let’s not forget that if sessions were
00:28:35
found, then this sweater needs to be switched
00:28:37
to the first index the
00:28:43
entire session we display remains to be filled with
00:28:46
information widget server.info this
00:28:49
information about the session name number of
00:28:51
players Pink and we also need to do so that
00:28:54
when we click on the server we can
00:28:56
join it go to the widget
00:28:59
server info Graph we need to get
00:29:02
information we received information about the session
00:29:04
through this function was called in the
00:29:07
server sheet widget Server info we will
00:29:09
transfer information about the session the
00:29:12
data structure through a variable
00:29:14
we will create a new variable called
00:29:17
Session and the type we will select blueprint
00:29:19
sessional result we will
00:29:21
make it open
00:29:23
and check the expalson Spawn box we
00:29:26
will transfer our session to it from the
00:29:29
sheet server widget, go to the sheet server,
00:29:32
find the GCD that creates the
00:29:35
info server widget, update it, the
00:29:37
Session input appears here and pass here our session
00:29:40
that we received from the
00:29:42
findsation array, go back to the info server,
00:29:48
catch this session and get from it
00:29:50
Data
00:29:52
geoserver name Get Pink
00:29:56
current number of players maximum
00:29:59
number of players
00:30:01
Now we will place this data in the
00:30:03
appropriate positions,
00:30:05
we will call the sector for these fields We just
00:30:08
take their variables, by the way, for convenience,
00:30:10
we can rename them
00:30:11
and make a set of text
00:30:14
here we will place the information we
00:30:16
will connect all the logic
00:30:19
we will hang on the construct
00:30:22
We will pass the name
00:30:23
Then we will transfer it to one column two
00:30:26
values, the current number of players and the
00:30:28
maximum, let's take the format text
00:30:31
and here in curly brackets we write the name of the
00:30:34
input variables kyront then put
00:30:37
a slash it will separate these parameters on
00:30:39
the logic it does not affect in any way it's just
00:30:41
text the next parameter Max
00:30:44
Enter and add here current and MAX
00:30:47
Player the
00:30:53
final touch is output Pink let's
00:30:57
arrange this logic in a more understandable
00:30:59
form,
00:31:00
ready
00:31:04
and the final touch will be done so
00:31:07
that when you click on the session. More precisely,
00:31:09
on the server info widget, this is the line
00:31:12
we connected to the session, go function
00:31:15
override on the left there are events on
00:31:18
Mouse, we can take double Click double Click
00:31:21
or Button Down when we press the button
00:31:23
let it be, it will create a separate
00:31:26
function for pressing but inside the function we
00:31:29
cannot call Join Session so
00:31:30
we return Graph and here we will simply
00:31:32
create a custom event let it be
00:31:34
called Join Session and
00:31:37
hang Join Session on it,
00:31:39
attach the controller
00:31:42
and the most important thing is to transfer the structure with
00:31:45
information let's join the session,
00:31:48
as we remember, it was transmitted through the
00:31:50
Session variable
00:31:53
in previous lessons, when we
00:31:54
connected to another player, we
00:31:56
joined his card through the
00:31:58
Open level GCD. As you can see, we do
00:32:00
n’t need to do this now. We connect via
00:32:01
Join Session. Now we’ll call this event
00:32:05
on a mouse click and
00:32:08
compile it. and we see that it gives an error
00:32:10
so that this does not happen output notes when
00:32:12
connecting Make and winterplay everything is ready
00:32:16
should be emphasized when we create a
00:32:18
session for another someone else’s session we will no longer be
00:32:21
able to connect to
00:32:23
do this We will need to
00:32:24
first destroy our session in
00:32:26
which we are and then
00:32:28
connect exactly the same For a client,
00:32:30
if we log into a session,
00:32:33
we won’t be able to log into another. Here we will also
00:32:35
have to delete our session. Therefore,
00:32:37
we will call when creating a single
00:32:40
game And to glue the server, we’ll start with creat
00:32:43
Server; creating a server, go to its
00:32:46
widget; here we already have there is a
00:32:48
destroyceion function. It hangs at the beginning. This is
00:32:50
good for debugging, but it’s better to
00:32:52
hang it before creating a session
00:33:10
and Create Session will be attached to the
00:33:12
sex file because
00:33:14
we will not always create a session while being in another.
00:33:19
We’ll do the same in creat Single before
00:33:22
opening the map.
00:33:34
And the third place is when connecting to the
00:33:37
server, we connect through the server
00:33:39
info, that is, when we click on this
00:33:41
widget, it turns out that we first
00:33:43
disconnect and then connect to the
00:33:45
session,
00:33:50
check what we did, click the ellipsis
00:33:53
here we will put 4 players, also instead of the
00:33:57
bald server we will select Standalone and
00:33:59
launch it as a Standalone Game, we
00:34:04
will create a session on in the first client,
00:34:25
now let's create a session on the second client,
00:34:28
but it will be local, check the LAN box,
00:34:38
also go to the server sheet and see the
00:34:40
session of the first client
00:34:44
from the first client, we also see the session of the
00:34:47
second client, but we don't see ours
00:34:50
now from the third client, open the server
00:34:52
sheet, here we see all the created sessions
00:34:55
local and non-local
00:34:59
We see that the session name is generated
00:35:01
automatically;
00:35:03
we can’t change it via blueprint; this is done via C++,
00:35:05
so the line where we set the
00:35:07
server name will remain for the future; for now, it’s of
00:35:09
no use; let’s join
00:35:12
one of them. Let it be a session
00:35:14
whose name ends on c39,
00:35:27
now we join the c39 session with 4
00:35:30
clients,
00:35:34
now all three players are assembled, press
00:35:36
phrases to update the list of servers
00:35:40
and connect to the session where there are three
00:35:42
players from the first client, we are all in the same
00:35:45
session and one of the Host players is an important
00:35:48
detail if the session is filled with players then
00:35:50
it will not be displayed in the list of
00:35:51
sessions
00:35:54
from the first client, let's create our own
00:35:56
separate session by disconnecting from the general one
00:36:02
and now we will be out of the session from the Host, I'll
00:36:04
remind you This was the Second client, just
00:36:07
like Open the map
00:36:13
and all clients are disconnected from the session and
00:36:15
thrown into the main menu
00:36:17
If a network failure occurs then
00:36:20
special events can be called,
00:36:22
they are available in the Game instance,
00:36:25
we have already created the Game instance object, here it is here Ivan
00:36:28
Network Error, it is called when the
00:36:30
network is collected. For example, if the connection was lost,
00:36:32
this function can return the cause of
00:36:34
the error;
00:36:37
there is also a Travel Error, it can be
00:36:39
called, for example, If you do not have the
00:36:40
required card that is on the server.
00:36:46
Finally, an important detail should be noted:
00:36:48
if you have a Gray and not a white IP, then
00:36:51
other players will not be able to connect to you,
00:36:52
the easiest option is to
00:36:54
use a VPN like hamach or
00:36:56
redmin, but this method is only
00:36:58
needed for testing for a normal game a
00:37:00
proxy server for a tunnel connection
00:37:02
is simply a layer that will
00:37:04
connect players, we talked about it in the
00:37:06
very first lesson How multiplayer works,
00:37:10
third-party services such as
00:37:13
Steam or Epic Games will help you cope with this problem, for this you need to
00:37:16
use their special API and
00:37:18
plugins, this topic will be discussed. in
00:37:20
subsequent lessons, subscribe to
00:37:22
cyberstars, the sources of this project are
00:37:25
in the public domain, all the necessary
00:37:27
links will be in the description

Description:

Это девятый урок из серии Unreal Engine 5 Мультиплеер, в котором мы организуем соединение между игроками, а именно создание сессии, поиск сессий, подключение к сессии, отключение от сессии. Для этого создадим виджеты при помощи UMG UI в том числе список серверов - Server list / Лобби / Браузер серверов. Подключение через Listen Server. Эта тема относится к Networking, Online subsystem, Online session, Matchmaking 00:00 Содержимое ЧАСТЬ 1 Создание UMG виджетов 00:46 - Widget Список серверов 05:04 - Закрытие и открытие Виджетов 07:25 - Widget Строка с информацией о сессии 08:32 - Widget Создать сервер 11:08 - Widget Открыть уровень карту 11:39 - Вывод виджетов в главное меню 12:32 - Переключение между окнами 13:37 - Загрузка 14:57 - Стиль курсора ЧАСТЬ 2 Создание сервера 16:02 - Создание сессии 18:18 - Список всех карт (level) 19:45 - Настройка сессии 24:24 - Открытие карты (level) ЧАСТЬ 3 Подключение к серверу 25:54 - Вывод списка сессий 28:42 - Вывод информации о сессии 31:03 - Подключение к сессии 32:16 - Удаление сессии 33:48 - Проверка Разовый донат https://new.donatepay.ru/@cyberstars Patreon - https://www.patreon.com/cyberstars Discord - https://discord.com/invite/z8t2uSWCBq TikTok - https://www.tiktok.com/@cyberstars_entertainment?lang=ru-RU Google Play - https://play.google.com/store/apps/dev?id=8243028543036659870 Facebook - https://www.facebook.com/unsupportedbrowser Instagram - https://www.facebook.com/unsupportedbrowser ВКонтакте - https://vk.com/cyberstars_entertainment Телеграм - https://t.me/cyberstars1 @UnrealEngine

Preparing download options

popular icon
Popular
hd icon
HD video
audio icon
Only sound
total icon
All
* — If the video is playing in a new tab, go to it, then right-click on the video and select "Save video as..."
** — Link intended for online playback in specialized players

Questions about downloading video

mobile menu iconHow can I download "Урок 9 | Unreal Engine 5 Мультиплеер - Список серверов | Подключение к сессии / UMG" video?mobile menu icon

  • http://unidownloader.com/ website is the best way to download a video or a separate audio track if you want to do without installing programs and extensions.

  • The UDL Helper extension is a convenient button that is seamlessly integrated into YouTube, Instagram and OK.ru sites for fast content download.

  • UDL Client program (for Windows) is the most powerful solution that supports more than 900 websites, social networks and video hosting sites, as well as any video quality that is available in the source.

  • UDL Lite is a really convenient way to access a website from your mobile device. With its help, you can easily download videos directly to your smartphone.

mobile menu iconWhich format of "Урок 9 | Unreal Engine 5 Мультиплеер - Список серверов | Подключение к сессии / UMG" video should I choose?mobile menu icon

  • The best quality formats are FullHD (1080p), 2K (1440p), 4K (2160p) and 8K (4320p). The higher the resolution of your screen, the higher the video quality should be. However, there are other factors to consider: download speed, amount of free space, and device performance during playback.

mobile menu iconWhy does my computer freeze when loading a "Урок 9 | Unreal Engine 5 Мультиплеер - Список серверов | Подключение к сессии / UMG" video?mobile menu icon

  • The browser/computer should not freeze completely! If this happens, please report it with a link to the video. Sometimes videos cannot be downloaded directly in a suitable format, so we have added the ability to convert the file to the desired format. In some cases, this process may actively use computer resources.

mobile menu iconHow can I download "Урок 9 | Unreal Engine 5 Мультиплеер - Список серверов | Подключение к сессии / UMG" video to my phone?mobile menu icon

  • You can download a video to your smartphone using the website or the PWA application UDL Lite. It is also possible to send a download link via QR code using the UDL Helper extension.

mobile menu iconHow can I download an audio track (music) to MP3 "Урок 9 | Unreal Engine 5 Мультиплеер - Список серверов | Подключение к сессии / UMG"?mobile menu icon

  • The most convenient way is to use the UDL Client program, which supports converting video to MP3 format. In some cases, MP3 can also be downloaded through the UDL Helper extension.

mobile menu iconHow can I save a frame from a video "Урок 9 | Unreal Engine 5 Мультиплеер - Список серверов | Подключение к сессии / UMG"?mobile menu icon

  • This feature is available in the UDL Helper extension. Make sure that "Show the video snapshot button" is checked in the settings. A camera icon should appear in the lower right corner of the player to the left of the "Settings" icon. When you click on it, the current frame from the video will be saved to your computer in JPEG format.

mobile menu iconWhat's the price of all this stuff?mobile menu icon

  • It costs nothing. Our services are absolutely free for all users. There are no PRO subscriptions, no restrictions on the number or maximum length of downloaded videos.