Unuty3d_Multiplayer Networking1

Introduction to a Simple Multiplayer Example

介绍一个简单的多人游戏示例。

Multiplayer Networking is inherently detailed and complex. There are particular issues and difficulties associated with synchronizing and communicating between multiple instances of a project which are often running on different machines that could be in different and distant parts of the world.

多玩家网络的本质是详细和复杂的。在一个项目的多个实例之间进行同步和通信时,会遇到一些特殊的问题和困难,这些实例常常在不同的机器上运行,这些机器可能位于世界的不同和遥远的地方。

With Unity’s built-in Multiplayer Networking and the associated High Level API (HLAPI), we hope to make creating Multiplayer projects easier to use.

有了Unity内置的多玩家网络和相关的高级API (HLAPI),我们希望能让创建多人游戏的项目更容易使用。

With this simple Multiplayer Networking Example, we will show how to set up a Networked Multiplayer project from scratch using the simplest of assets and scripts. With this example, we hope to give you a quick introduction to the most important aspects of the built-in Multiplayer Networking system and its High Level API.

通过这个简单的多人网络示例,我们将展示如何使用最简单的资产和脚本从头创建一个联网的多人游戏项目。通过这个例子,我们希望能够快速介绍内置的多玩家网络系统的最重要的方面以及它的高级API。

This document is a step-by-step assignment showing how to set up a new Multiplayer Networking project from scratch using Unity’s built-in Multiplayer Networking system and its HLAPI. The steps in this lesson are relatively generic and are designed to convey the basic concepts behind the Multiplayer Networking system and can be customized for many different types of Networked Multiplayer games. By the time we are done, we should have an example that has two players controlling their own Player GameObjects in two different instances of the project with an authoritative Server controlling and synchronizing the action. The players should be able to shoot each other, defeat other players and static enemies, and finally respawn if they are defeated.

这个文档是一个逐步的任务,展示了如何使用Unity内置的多人网络系统和它的HLAPI,从头开始建立一个新的多人网络项目。这一课的步骤是相对通用的,旨在传达多玩家网络系统背后的基本概念,并且可以针对许多不同类型的联网多人游戏进行定制。到我们完成的时候,我们应该有一个例子,有两个玩家在两个不同的项目实例中控制他们自己的游戏对象,一个权威的服务器控制和同步这个动作。玩家应该能够互相射击,打败其他玩家和静态敌人,如果他们被打败了,最终重生。

This lesson is targeted at Intermediate users. It is best to have read the section of the manual on Multiplayer Networking, particularly the pages on Networking Overview and The High Level API and it's child pages, including Network System Concepts.

这一课针对的是中间用户。最好阅读多玩家网络的手册章节,特别是关于网络概述和高级API的页面,以及它的子页面,包括网络系统概念。

To get started:

Create a new empty 3D project in Unity.

在Unity中创建一个新的空3D项目。

Save the default scene as “Main”.

将默认场景保存为“Main”。

你可能感兴趣的:(Unuty3d_Multiplayer Networking1)