Confuse in unity networking

Hello everyone
I am confused in unity networking. I am trying to create a multi player game. I checked lot to forum and tutorials. Everything is based on peer to peer networking. For example one player host the game and create server. Other player join as client.
I build my own master server.
Please could you tell me is unity networking is peer to peer , client server or hybrid(combination of peer to peer and client server) ?

here is link to game http://www.miniclip.com/games/boxo/en/
I want to do this type of networking in my game. My game play is very near to this game. Can i do this type of networking in unity.
Thanks a lot.

Based on my personal research there are several ways you can go about your networking. The simplelist is to have a player host the game, making that player the server. The another way is to create a “gameClient” , which is the same game but without the player. Note that if you want your networking to be better you will need to add delays when needed. Example, When I use RPCs I needed to create a yield WaitForSeconds(0.5); at the receiving end when that RPC was needed on the client side.

Yes this sounds very confusing and honestly it is. You can use authoritative servers approach from what my friend told me, using master server. To answer your question, no. I believe on Peer-to-peer connections everyone is client and server, so in that case you can’t have everyone be both. There is a Server and many clients for Unity Networking, and the server should have the power and the control of what needs to be done i your game. This will depend on your programing as well. If you are using RPCs you need to make it clear who is execution them, if Network.isServer of Network.isClient; if you do not then you might be running it from everyone to everyone, which should corrupt the expected data.

I am not sure if this info helps, but I sure hope so … Good luck!

Thanks for you response

from this tutorial http://www.paladinstudios.com/2013/07/10/how-to-create-an-online-multiplayer-game-with-unity/ i created a simple networking.
I can connect to my master server.
On player side one player can host the game as server and other can join as client.
When server shut down all client to goes to main menu.
Is there any better tutorial. I am totally new to networking programming.

After searching on the web and unity forum, i got basic grip on the unity networking. I can communicate through the master server. I can create the one machine as server and other can join it as the clients. Now i can also use RPCs .
I am very thankful to the community for the help.
Please can someone help me little more.
I was reading this page. http://docs.unity3d.com/Documentation/Components/net-HighLevelOverview.html

In this page in What is Networking? section it says. The server can either be a dedicated host machine used by all clients, or simply a player machine running the game (client) but also acting as the server for other players.

I know the second bit to work. How can i work on the first bit. Create dedicate server host machine and connect all player as clients. Can i create this type of network in unity? Is there any tutorial on this

I know one case is to use Authoritative Server. But i do not want to host server on player’s machine. I want to host server on dedicate machine which is far away from players.
Thanks a lot

I found this tutorial site that explains the different servers you can host and how one can set their game for it. It explains the authoritative server method. One way is to make the “Server/host” as a separate “game” with not players. once that game is available then you can join in as clients. in fact the game does not need a full scene, just the server side networkViews.

This is the site I mentioned → http://www.playblack.net/zee-code
hope this helps.

MrGamer,
http://www.addframe.net/d/fpshootnet/FPShootNet.pdf
Is not really about an authoritative server (clients send RPCs to server and server relay to clients) but may help a bit.

Mr Gamer: You can run Unity instances on any machine, so you can certainly also run it on your own machines “away from the players”. You will need to come up with some way to run one or multiple instances for your players then. At the beginning you can just start them manually.

Thanks a lot everyone
Your links and suggestions are very helpful. Now I got everything I need. Thanks a lot. :smile:

Now last question. I am looking to make match making thing. So when player start multiplayer server find matching player and connect both. It means player no need to manually create server and manually join server. Everything is automatic and random. One solution i thinking is use php. Create php page on web server. Game connect to php page. Then php decide find other player to play with him.It decide who is going to be client and server.
My question is there any solution already build or i need to write my own code in php.?
Or is there any better solution?

Thanks for your fantastic help.
:lol: