Hi everyone, I would like some advice. (I am new to Unity but I am not new to programming at all).
I have been working on a card game that it is almost finished for local gameplay (AI included). My game is done with 3D objects, uses the 52 standard deck, and can be played either 1v1 or 2v2. Since this is my first “serious” Unity game project, I have the intention to publish it (maybe on Steam first, then port it to Android/iOS) so I can have a bit of earnings for myself. Since I know people may not like to pay for a local-only card game I would like to add the multiplayer part, but I cannot figure out what would be the best way to do it, or if I should do it at all.
Because this is my first project, I would like to avoid renting and setting a dedicated server (which I don’t fully know how to) for my game; so I have in mind to let my game be played locally, on LAN, and P2P; and the P2P is because I don’t want to set a global matchmaker yet, I want it to be played only with friends you know (Steam friends, Google friends, Facebook friends, etc) so that one of them creates a room and invites the rest to join. I know that P2P may required adding permissions to routers which I know is not so hard but it is tricky, and even worse if there is not a unique host, but I really want to avoid the dedicated server (if possible).
I have been researching and watching videos about Unity Networking, but I have also heard about other technologies like Mirror or Photon, and I don’t really know what should I use for my project.
So, with the “little long” explanation I have given, can I get some advice about what and how should I tackle this problem of adding LAN and “Friends only” multiplayer? If you also have some advice about why should I really try to set a dedicated server (and where), or to not only made this “Friends only”, or if I should just release the game as local and LAN only, I would like to hear about it as well.
I’d recommend for a first project to just complete the project as single player. Adding multiplayer to the project is very likely to add more work than all the work you have already put into it combined.
Renting a dedicated server is likely the easier solution than multiple friends list integrations, steam networking API, etc.
Unet is deprecated, so don’t use that. Really my advice is to not do multiplayer. As far as which way to go, it is hard to say because you’re talking about at least 3 different networking solutions needed. The Steam friends list and P2P use the Steam API. LAN play won’t be through Steam so I’d assume you’d use a different networking system. And your mobile P2P need yet another solution. At least just pick one of them, say Steam P2P and spend the next several months just getting that going instead of trying to tackle all these at once.
I read that Mirror got drop in support for the Steam network transport, so you might consider looking into that route. This might make adding LAN support easier if it is just swapping out the transport without having to do many changes to the high level systems.
Thank you very much for your advice, I really appreciated it.
I had been looking at Mirror, and as you said, making the multiplayer part run well make take me the same time I have spent in the game itself, and I still have to add details and finish the interface (so it looks “pretty”).
I will take your advice: I may publish my game in “Early Access” with Single Player only (once it is fully finished), then stick to the Steam P2P, and keep adding more features (like the Steam friends and LAN multiplayer). Then based on that, I will think If porting to mobile and/or adding Global multiplayer (renting a server, and also having a friend list there only) is worth it or not (based on my game’s reception).