I’ve been having some interesting thoughts lately for a multiplayer game that I’m thinking about diving into. The thing is… I know NOTHING about multiplayer game development.
Is anyone able to give me a paragraph or two on technology areas I’ll need to focus on? Recommendations for third-party tools/libraries?
The intention is to have 4 - 8 players within any given “match”. I’ll want friends to be able to play together (i.e. private matches by invitation) and public matchmaking options.
Where I’m most unsure is on whether or not I should just be using out-of-box Unity for all this stuff, or if - especially on the server side - I should be looking at another product/asset/framework. And - if I do go down that path - does that change the client-side requirements for networking, or is that side of the communication still managed with “native” Unity.
Anyway, I know this is probably similar to many “noob” threads on the topic, but I thought it was worth posting. I’m an experienced game developer, but just not in this area. So, talk to me like I’m a beginner, but not TOO much of a beginner
Consider what if any servers you will need, what their role will be, and what kind of authority model your game will need. Based on the answers to that then look at the available networking packages.
From your description though, it sounds like you could use either Photon or the Unity Multiplayer service for your matchmaking needs.
Yes, if you want player hosting. Unity Multiplayer Services (with the Unet lib is prolly the way to go).
Otherwise, if you want Server hosting (Not P2P). Then Photon or Unet without Multiplayer services might serve you well. Other libraries that exist are Lidgren. (Usually best for Server Client but also has P2P functionality, but you loose the Multiplayer Services, its a pure Networking Library like Unet)
How do you define “Multiplayer” in the context of “Then Photon or Unet without Multiplayer services”? I thought Photon and Unet specifically PROVIDED Multiplayer services?
You raise a good point. Maybe all I really want is P2P. I was under the impression that P2P/peer server only allowed someone to create local MP situations (i.e. LAN).
I want to allow players to:
Play solo for training (no problem).
Play with friends by inviting specific people to a match.
I guess in this case, a “match” needs to already exist, and therefore a server of SOME kind needs to exist to host that match - whether it be a true server, or a peer based server (i.e. first player to create the match is the host).
Play random people out on the Internet who are auto matched.
It was this part that I thought REQUIRED a dedicated server, but maybe it’s also doable with the peer server/initiator is host approach?
Basically, UNET is a networking library. It’s just a library for you to send byte[ ]'s between clients (But they made it fancy and all with HLAPI).
Then there is Unity Multiplayer Services. That includes the relay (A way to avoid NAT) and matchmaking.
However, Photon runs servers on their end. No player hosting (AFAIK, might be wrong. But fairly sure). So Photon I think you need to use their Services.
But keep in mind. UNET != Unity Multiplayer Services.
Like with UNET and Unity Multiplayer Services. You can just call createMatch. And it will create a server on a local machine. And it will connect to the relay (So you don’t have to worry about any NAT or anything). And it will also notify Unity Matchmaker so other players can retrieve server lists etc. Then a player can just connect to that user. And no firewall issues will be in your way because of this Relay. (It’s basically a link in the middle for all traffic, and the relay has a public ip etc.)
That seems to be optimal for your needs. Unless you want to write it all by yourself. But that’s a bit of a pain