Unity+ Photon服务器实时对战游戏——Photon服务器介绍(三)

分享一些Photon的文章,翻译不准确的地方请多多包涵。

Introduction

Photon is a real-time multiplayer game development framework that is fast, lean and flexible. Photon consists of a server and several client SDKs for major platforms.

Photon 是一个实时多人游戏开发框架,它是快速、精益和灵活的。 光子由一个服务器和客户端sdk为主要平台。

Photon Unity Network (PUN) is a special client framework which aims to re-implement and enhance the features of Unity's built-in networking. Under the hood, it uses Photon's features to communicate and match players.

Photon Unity Network (PUN)是一种特殊的客户端框架旨在重新实现,加强团结的内置网络的特点。 在引擎盖下,它使用光子的特性来进行交流和比赛的球员。

As the PhotonNetwork API is very similar to Unity’s built-in solution, users with prior networking experience in Unity should feel at home immediately. An automatic converter could assist you porting existing multiplayer projects to the Photon equivalent.

随着PhotonNetwork API非常类似于统一的内置解决方案,用户提供统一的网络经验应该立即有宾至如归的感觉。 一个自动转换器可以帮助你将现有多人项目移植到光子等价的。

Full source code is available, so you can scale this plugin to support any type of multiplayer game you’d ever need.

完整源代码可用,所以你可以扩展这个插件来支持你所需要的任何类型的多人在线游戏。

This plugin is compatible with the hosted Photon Cloud service, which runs Photon Servers for you. A setup window registers you (for free) in less than a minute.

这个插件兼容托管光子云服务,将光子服务器。 设置窗口注册(免费)在不到一分钟。

Most notable features: 最显著的特点:

  • Dead-easy API •易如反掌API
  • Server available as hosted service (free for development) or as "On Premise" •可用服务器托管服务(免费开发)或“前提”
  • Load-balanced workflow scales across servers (with no extra effort) •负载均衡工作流尺度跨服务器(没有额外的努力)
  • Outstanding performance of the Photon Server •出色的光子服务器的性能
  • No direct P2P and no NAT punch-through needed •没有直接P2P和不需要NAT击穿现象
  • Offline mode: re-use your multiplayer code in singleplayer game modes •离线模式:重用你的多人代码在单人游戏模式

First Steps

If you know how to use Unity's networking, you should feel right at home. You might want to run the converter (start in Wizard: ALT+P) on one of your projects and dive into the code and reference. 如果你知道如何使用统一的网络,你应该感觉得心应手。 您可能希望运行变换器(启动向导:ALT + P)的一个项目,并深入代码和引用。 

Brief overview of Photon, subscriptions, hosting options and how to start. 简要概述的Photon,订阅,托管选项,以及如何开始。

Photon

Unlike Unity's built-in networking, PUN always connects to a dedicated server which provides rooms, matchmaking and in-room communication for players. Behind the scenes Photon Unity Networking uses more than one server: Several "Game Servers" run the actual rooms (matches) while a "Master Server" keeps track of rooms and match players.

与Unity的内置网络、PUN总是连接到一个专用的服务器,提供房间,相亲为玩家和客房的沟通。 幕后PhotonUnity网络使用多个服务器:一些“游戏服务器”运行实际的房间(匹配),而“主服务器”跟踪房间和比赛的玩家。

You have two options for the server side. 你有两个选择的服务器端。

Exit Games Cloud

The Exit Games Cloud is a service which provides hosted and load balanced Photon Servers for you, fully managed by Exit Games. Free trials are available and subscription costs for commercial use are competitively low.

编辑游戏云服务,为您提供托管和Photon负载均衡服务器,完全由退出游戏。 免费试用是可用的和订阅有竞争力的低成本商业用途。

The service runs a fixed logic, so you can’t implement your own server-side game logic. Instead, the clients need to be authoritative.

服务运行一个固定的逻辑,所以你不能实现自己的服务器端游戏逻辑。 相反,客户需要权威。

Clients are separated by “application id”, which relates to your game title and a “game version”. With that, your players won’t clash with those of another developer or older game iterations.

客户由应用程序id,这关系到你的游戏标题和“游戏版本”。 ,你的玩家不会冲突与另一个开发人员或老游戏迭代

Subscriptions bought in Asset Store

Follow these steps, if you bought a package with Photon Cloud Subscription in the Asset Store:

Photon Server SDK

As alternative to the Photon Cloud service, you can run your own server and develop server side logic on top of our “Load Balancing” C# solution. This gives you full control of the server logic.

作为替代Photon云服务,您可以运行你自己的服务器和开发服务器端逻辑上的“负载均衡”c#的解决方案。 这使您可以完全控制服务器的逻辑。

The Photon Server SDK can be downloaded on: www.exitgames.com/en/OnPremise/Download 下载地址

Starting the Server: doc.exitgames.com/en/onpremise/current/getting-started/photon-server-in-5min



  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值