Unity Multiplayer Beginner - Where to start.

I am looking to dive into learning multiplayer. It does seem like a daunting task and the more I read through these forums, the docs or google the more I am getting confused.

I have created a few projects with my own matchmaking systems just using PHP and MYSQL on a web server. However this was limited to turn based and online leaderboard projects utilising Unity’s WWW class and am now looking to expand into some small real-time projects.

To get started I planned a learning project.
A ‘simple’ coin flip knock out game. Which is purely UI (no physics for example).

The idea:
Players click start game.
They go into a queue/lobby until either 10 players (just random people - next to click start, no friends lists etc) are in or an allotted time elapses.
If an 11th player then clicks play they go into a new different game/queue instance.
Once playing simply select heads or tails via a couple of buttons.
If right you go onto the next round. If wrong you are out and go back to the menu.
Once the game ends and a winner if confirmed the game instance/room is closed.

I realise this could probably be done through a turn based hybrid type setup using a database and that real-time multiplayer and networking is probably overkill but am using this game logic as almost a hello world type project just to help me learn networking.

I am struggling to even grasp where to start and some of the terminology even seems foreign which makes it difficult to begin researching.

Is learning Unity Multiplayer (UNET) the right pace to start?
My concern here after reading the docs and looking at the samples is that it all seems to point towards a set up with matchmaking where a player/client becomes the host, if this is the case with the above set up, I am assuming this means that if the client host disconnects or is the player that is eliminated then all other clients will be disconnected when the host leaves the game?

Does this mean I will need dedicated servers or cloud based game as service and if this is the case would you code the game logic outside of Unity and not using UNET and only the clients in Unity and work out a way to connect? Also how would this effect scalability if for example there were many games running at once.

What should I be looking up and where should I begin?

Thanks,

I was a beginner with network programming only a few months ago so I know how you feel.

Absolutely start by reading the overview documentation, and poking around in the example projects.
The Unity Cloud Server will meet all your needs to get going, no need to make your own server.

1 Like

Unet Networking Notes - Unity Unet Networking Notes - Pastebin.com

1 Like

Thanks guys. Have managed to get some basics up and running. Once you get your head around some of the terminology and technologies it is actually not that bad. Was probably worried for nothing and should have dove straight in. Just didn’t want to start learning something only to find I am learning the completely wrong thing. Thanks again.

I know how that feels too! UNet wasn’t released yet when I started, and I spent a lot of time learning legacy Unity network code, Photon, and Bolt. In general I like to use as few plugins for the main architecture as possible, but I had great success with BestHTTP to implement Authorization, WebSockets, and REST API calls to my JSON server if you find you need those soon, that’s the one networking plugin I ended up using; and the Dev is amazingly helpful and responsive.