Need Help on basic Multiplayer functionalities

Hi all,

I’m really confusing on understanding the functionalities on multiplayer gaming. Am working on 2 player fighting game[Like wresting only with 2 player] which provides you to play either with AI (Single player) or Multiplayer (Play with another one) . I have already done the single player type, now am working on Multiplayer. Here am really confusing on understanding the basic techniques behind to develop the multiplayer game. because i need to fight with another one who is connect in the same network (LAN or Wi-Fi).

My basic questions are,

  1. Do i need to Start and Initialise server, whenever a user select multiplayer button ? but, we can’t initialise more than one server at a time under same IP and Port, isn’t it ?

  2. Just consider another user launching the game and tapping multiplayer button, here, i cant initialise the server again, so i need to show the existing servers available for this game, and he can able to send request to the server (or) he can able to connect the server directly ? Is it possible ?

  3. Does any player can be act as a server ?

  4. I saw lot of tutorials available on net, it have only how to start the server and connect as a client, no one providing the much information how to manage with the game ? Any good tutorials available for 2 player multiplayer game ?

I hope you all understand my question, These all are my basic understandings on network, please provide good suggestion if you think its worng, please bare if there is any grammatical mistakes …

Thank u…

you need 1 server per game

Unity does not provide this functionality.

You allways need 1 server instance, so clients can connect to it.
Unity’s networking is the Client/Server model, so 1 server and many clients connecting to that 1 server.
If you only want 2 players per game, you will need 1 server and 1 client connect to the server.

Hi appels ,

Thank u for your reply.

According to your point we should have a server already. Then we have to show the users to connect with this game server. isn’t it ?

i got your point in 1 server and 1 client, Here i need to provide max connections as 1 (i.e 1 client) .

consider if 10 user’s starting the applications and they need to play multiplayer game, how can i manage that ? I couldn’t able to get exactly ?

can you please explain with more details ?

To advertise a server instance you can use the master server.

Yes

Except for the master server, you don’t have any options unless you roll your own with another solution that’s more flexible like Lidgren.

Hi @apples,

Yeah, Now am very much clear on the basics. I read throughly about Master server and functionality. Its the better solution to work on.

Because of using master server either i can host a game, or join game with existing servers.

Thank u for your suggestions and reply.