没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
Table of Contents
ATTENTION..............................................3
Introduction.............................................4
Network in Unreal................................5
Framework & Network......................7
Common Classes....................................10
Game Mode.......................................................11
Examples and Usage...............................12
Blueprint..................................................12
UE4++......................................................16
Game State........................................................19
Examples and Usage...............................20
Blueprint..................................................20
UE4++......................................................23
Player State.......................................................25
Examples and Usage...............................26
Blueprint..................................................26
UE4++......................................................28
Pawn......................................................................30
Examples and Usage...............................31
Blueprint..................................................31
UE4++......................................................35
Player Controller.............................................39
Examples and Usage...............................41
Blueprint..................................................42
UE4++......................................................44
HUD.......................................................................47
Widgets (UMG)................................................48
Dedicated vs Listen Server...........49
Dedicated Server.....................................49
Listen-Server..............................................50
Replication.............................................51
What is 'Replication'?............................51
How to use 'Replication'.......................52
Replicating Properties..........................53
Remote Procedure Calls................58
Requirements and Caveats................................59
RPC invoked from the Server......................................60
RPC invoked from a Client.............................................60
RPCs in Blueprints..................................................61
RPCs in C++..............................................................62
Validation (C++)..................................................................64
Ownership...........................................................66
Actors and their Owning Connections..........68
Actor Relevancy and Priority.....................70
Relevancy.....................................................................70
Prioritization...............................................................72
Actor Role and RemoteRole......................74
Role/RemoteRole Reversal...............................75
Mode of Replication...............................................76
ROLE_SimulatedProxy.....................................................77
ROLE_AutonomousProxy...............................................78
Traveling in Multiplayer.................................79
Non-/Seamless travel..........................................79
Main Traveling Functions....................................80
UEngine::Browse................................................................80
UWorld::ServerTravel......................................................81
APlayerController::ClientTravel...................................81
Enabling Seamless Travel...................................82
Persisting Actors / Seamless Travel...........83
Online Subsystem Overview........................84
Online Subsystem Module...................................85
Basic Design........................................................................85
Use of Delegates................................................................86
Interfaces...............................................................................87
Profile.......................................................................................87
Friends....................................................................................87
Sessions.................................................................................88
Shared Cloud........................................................................88
User Cloud.............................................................................88
Leaderboards......................................................................89
Voice..........................................................................................89
Achievements.......................................................................89
External UI...............................................................................89
Sessions and Matchmaking................................90
Basic Life-Time of a Session..........................................91
Session Interface................................................................92
Session Settings..................................................................93
Session Management.......................................................94
Creating Sessions.........................................................94
Create a Session via Blueprint ......................94
Create a Session via C++...................................94
Updating Sessions........................................................95
Destroying Sessions....................................................96
Destroy Session via Blueprint...........................96
Destroy Session via C++.....................................96
Searching Sessions.....................................................96
Searching Session via Blueprint......................97
Searching Session via C++................................97
Joining Sessions............................................................98
Joining Session via Blueprint............................98
Join Session via C++.............................................98
Cloud-Based Matchmaking............................................99
Following and Inviting Friends....................................100
How to Start a Multiplayer Game..........101
Advanced Settings................................................102
Use Single Process.........................................................104
Run as Dedicated Server.............................................105
Start and Connect to a Server.......................106
Blueprint...............................................................................106
Start a Server..............................................................106
Connect to a Server.................................................106
UE4++...................................................................................107
Start a Server..............................................................107
Connect to a Server.................................................107
Starting via Command Line........................................108
Connection Process.............................................109
The major steps are.......................................................110
Page 2
ATTENTION
This Compendium should only be used with a base understanding
of the Singleplayer Game Framework of Unreal Engine 4.
It will NOT teach beginners how to use Unreal Engine 4 in general.
Please refer to the “Blueprint Compendium”,
created by Marcos Romero,
for getting started with Unreal Engine 4 as a beginner.
This Network Compendium expects you to know how to
use Blueprints and also C++ (for the C++ examples).
Please make sure to use Unreal Engine Version 4.14.x for the examples!
It's solely meant to get you started with Networking in UE4!
Page 3
Introduction
Welcome to this, hopefully, useful Unreal Engine 4 Network Compendium.
The official Documentation is already quite good, but I wanted to sum up all the stuff,
which I learned in the past two years while working with UE4 and Multiplayer Games,
in one big Compendium with Blueprint and Code examples.
The following pages will introduce you into the Network Framework, explain Classes,
Replication, Ownership, and more. When ever I can, I will provide a Blueprint and
a C++ example, which should shed some light on how the things work.
The pages will, of course, also contain lots of content taken from the
official Documentation (Source 1*), since this is how the system works after all.
This Document is meant as a summary and not as a written
redefinition of something that already has been explained!
Page 4
Network in Unreal
Unreal Engine 4 uses a standard Server-Client architecture. This means, that the Server
is authoritative and all data must be send from Client to Server first.
Then the Server validates the data and reacts depending on your code.
A small example:
When you move your Character, as a Client, in a Multiplayer Match, you don't actually move your Character
by yourself, but tell the Server that you want to move it.
The Server then updates the location of the Character for everyone else, including you.
Note: To prevent a feeling of “lag” for the local Client, Coders often, in addition, let this Player
directly control their Character locally, although the Server still might override
the Character's Location when the Client starts cheating!
This means, that the Client will (almost) never 'talk' to other Clients directly.
Another example:
When sending a Chat-Message to another Client, you are actually sending it to the Server, which then
passes it to the Client you want to reach. This could also be a Team, Guild, Group, etc.
Page 5
剩余111页未读,继续阅读
资源评论
nullxu
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功