- Home /
Multiplayer Networking in Unity?
I am very new to unity. This will be my third day to play around with everything it has to offer. I saw some examples of how to make a multiplayer with unity, but i was getting confused on how the client and server work. On almost all tutorials, i saw that a client Hosted the game instead of a main server. To prevent some hacking, i would like to use a Dedicated Server to host multiple server, or lobbies. Is there a way to build an server.exe
and have it run on the command line. I would use each mini-server on a Virtual Machine. And then the games connect to that one server. I also have heard of a "Master Server" that connects clients to a specific server. Since i want to have a cluster of server, hosting many game lobbies (Like Call of Duty), this sounds great. How would i do and and how would i get the kills of each player and save it into a Database? Thanks!
Also good to know: The default networking system Unity provides with is optional. Check out WWW and TcpClient for hints. The wiki has one example in php to send data to a database. There are also a ton of addons to Unity that provide networking plugins.
Regarding using masterserver and server.exe on dedicated machine, take a look at FPShootNet documentation.
Answer by xt-xylophone · Dec 04, 2013 at 10:34 PM
This is a lot of requirements. Have you made multilayer games before? If this is your first time and you are new to Unity I would recommend against this plan. Start smaller. If the smaller is easy then you can move up quickly. If smaller is hard, go smaller until its easy then work up.
Yes you can do all of the above though by the way. You also do not need to use Unity's default networking solution, there are many others out there such as photon and smartfox. I found photon good for starting out as a beginner.
However hard you think networking a game is, it is much more involved and complex than that. I dont want to scare you away from doing it though! Once you get the hang of the basics you can make some simple fun stuff really quickly but if you jump to AAA level game networking it will kill your enthusiasm much faster
Your answer
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
How to instatiate two players simultaneoulsy before loading level 1 Answer
Proper way to handle Master Server and NAT 0 Answers
Unity Multiplayer Design. Is it complicated to implement and learn? 1 Answer
is there a way so that i dont have to buy a game server for my multiplayer game? 3 Answers