在没有服务器的Unity3D中内置多人游戏? [英] Built-in Multiplayer in Unity3D without a Server?

查看:324
本文介绍了在没有服务器的Unity3D中内置多人游戏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我听说 Unity3D 具有内置多人游戏功能,它可以提供无需服务器的服务.但是我找不到有关它的任何信息,我发现的所有教程都只是关于使用Photon(PUD)或Google Services的.我知道Photon很好,所以我才开始研究它,并有计划使用它.

I heard Unity3D has a Built-In Multiplayer functionality and it can provide the service without a server. But I couldn't find any information about it, all the turtorials I found were just about working with Photon(PUD) or Google Services. I know Photon is good, so I just started to study it and have a plan to use it.

但是,我仍然想编写一些不使用服务器的非常简单的应用程序,例如One VS One Rock Paper Scissors游戏.使用Photon必须在性能上更好,但是在某些情况下(如我上面所述),它似乎太多了.此外,免费用户的PUD的CCU仅为20,因此这意味着只能同时玩10组游戏,例如Rock Paper Scissors游戏.

However I still want to write some very simple apps not using servers, something like One VS One Rock Paper Scissors game. Using Photon must be better on performance but in some cases like I said above, it seems to be too much. In addition, CCU of PUD for free users is just twenty, so it means only ten groups can play at the same time, Rock Paper Scissors game, for instance.

我看到有些人说没有服务器是可能的,但另一些人说不可能.

I saw some said it's possible without a server, but some other said impossible.

什么是对的?

推荐答案

您完全正确,新的Unity Networking允许您在一个客户端作为服务器的情况下创建一种P2P多人游戏.可以在这里找到文档: http://docs.unity3d.com/Manual/UNetOverview.html

You're completely right, new Unity Networking allows you to create kind of P2P multiplayer where one client is server. Documentation can be found here: http://docs.unity3d.com/Manual/UNetOverview.html

在统一网络系统中,游戏具有一台服务器和多个 客户.如果没有专用服务器,则其中一个客户端会播放 服务器的角色-我们将此客户端称为主机".

In the unity networking system, games have a Server and multiple Clients. When there is no dedicated server, one of the clients plays the role of the server - we call this client the "host".

还有一个很棒的演示,卢卡斯·梅杰(Lucas Meijer)在Unite 2015的几分钟内在多人游戏中改变了单人游戏: https://www.youtube.com/watch?v=tUEreuxmBj0

There is also awesome presentation about it, where Lucas Meijer changes single player game in multiplayer couple of minutes during Unite 2015: https://www.youtube.com/watch?v=tUEreuxmBj0

这篇关于在没有服务器的Unity3D中内置多人游戏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆