Built-in Multiplayer in Unity3D without a Server?

心已入冬 提交于 2019-12-30 04:50:07

问题


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.

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.

What is right?


回答1:


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”.

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



来源:https://stackoverflow.com/questions/33457100/built-in-multiplayer-in-unity3d-without-a-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!