Size: 1611
Comment:
|
← Revision 16 as of 2023-03-13 12:16:07 ⇥
Size: 1874
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
Line 6: | Line 5: |
Line 14: | Line 14: |
Line 19: | Line 18: |
Line 22: | Line 20: |
* [[/MultiplayerProgrammingQuickStart | Multiplayer Programming Quick Start]] * [[/TestingMultiplayer | Testing Multiplayer]] |
* [[UE4-Networking-And-Multiplayer/MultiplayerProgrammingQuickStart|Multiplayer Programming Quick Start]] * [[UE4-Networking-And-Multiplayer/TestingMultiplayer|Testing Multiplayer]] |
Line 26: | Line 24: |
* [[/Setting_Up_Dedicated_Servers | Setting Up Dedicated Servers]] * [[/Actor_Replication | Actor Replication]] |
* [[UE4-Networking-And-Multiplayer/Setting_Up_Dedicated_Servers|Setting Up Dedicated Servers]] * [[UE4-Networking-And-Multiplayer/Actor_Replication|Actor Replication]] |
Line 34: | Line 31: |
Line 39: | Line 35: |
1. 在前置关卡中自定义一个!GameMode 1. !GameMode中设定特制的UMyPlayerController,这个特制PC的作用是用来获取特制的UMyLocalPlayer,该!LocalPlayer通过定制的AddGameLoginOption接口设定连接参数,然后发起远程连接。这个参数可以有SpectatorOnly=1 |
1. --(在前置关卡中自定义一个!GameMode)-- 1. --(!GameMode中设定特制的UMyPlayerController,这个特制PC的作用是用来获取特制的UMyLocalPlayer,该!LocalPlayer通过定制的AddGameLoginOption接口设定连接参数,然后发起远程连接。这个参数可以有SpectatorOnly=1)-- 1. 无需上面这么复杂。针对OB,只需要在open server时传递SpectatorOnly=1参数即可,即open server?SpectatorOnly=1即可。 |
Pre-Introduction
现代多人体验须要同步海量数据在分布于世界各地的大量终端之间。
有两个选择特别重要,对提供引人入胜的用户体验来说:
- What data you send
- How you send it
Replication is the name for the process of synchronizing data and procedure calls between clients and servers.
Replication系统提供了一个高阶抽象,同时也附带低阶自定义的能力,来共同应对在线多人游戏中可能会碰到的所有状况。
Introduction
Getting Started
新手入门。
Fundamentals
- Character Movement Component
- Multiplayer in Blueprints
- Performance and Bandwidth Tips
个人经验
跨关卡传递数据可以通过SaveGameObject来实现。
- 本地只需要执行一次的代码可以考虑放在关卡蓝图里实现
- 通用的第三人称支持方法:
- 设置一个前置关卡:用于读取本地参数
在前置关卡中自定义一个GameMode
GameMode中设定特制的UMyPlayerController,这个特制PC的作用是用来获取特制的UMyLocalPlayer,该LocalPlayer通过定制的AddGameLoginOption接口设定连接参数,然后发起远程连接。这个参数可以有SpectatorOnly=1
无需上面这么复杂。针对OB,只需要在open server时传递SpectatorOnly=1参数即可,即open server?SpectatorOnly=1即可。