Search Unity

Torn about multiplayer solutions for small FPS game

Discussion in 'Multiplayer' started by Hertzole, Mar 15, 2017.

  1. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    422
    Hello!

    I've been planning a kind of FPS game and I would like to include multiplayer in it. According to plan, there would be no more than 4 players in a game. But I've been really torn about what I should use.

    I would like to use UNET because it's included in Unity, but UNET just feels so bad. Maybe it's because I haven't given the low-level API a proper go yet, but it also seems so much complicated work to just get a tad bit better network manager.

    Then we have Photon. Photon just works and it honestly feels awesome to work with, but then I get reminded of the price and such. As a very poor indie/hobbyist, I can't afford to pay $95 a month for around 500 connections (even if I probably won't reach that). And if the rooms are filled and no more connections are allowed, no one can play multiplayer, which is where UNET wins because it allows for players to host their own servers, which I believe Photon doesn't support.

    So is there a multiplayer solution is nearly as easy as Photon to work with but still allows for players to host their own servers? (Photon server hosting like would just be a plus at this point)
     
  2. mofirouz

    mofirouz

    Joined:
    Jul 14, 2015
    Posts:
    27
    I think what you are looking for is Nakama - an open-source distributed social and realtime server for games and apps. Nakama doesn't do peer-to-peer (yet) but you can host the servers yourself on whatever cloud provider you like (for instance DigitalOcean).

    I'm one of the devs behind Nakama, so you can ask me technical or non-technical questions.
     
  3. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    There is Photon Bolt, which EXIT GAMES bought out a few years ago . Which in my opinion is better than the other Photon's Photon Bolt was made by someone else before... They bought it.
     
  4. SiliconDroid

    SiliconDroid

    Joined:
    Feb 20, 2017
    Posts:
    302
    I'm also devving a FPS game (for mobile VR).

    When I walked into Unity land some weeks ago from having used another engine for years I was thinking (ahhh... easy cheap networking here we come, weeee... BUMP!)

    Like you I've been checking out solutions:

    RE BOLT:
    Unfortunately Bolt doesn't have relay fallback yet, so ~30% of users cant connect. Downer!
    The perfect solution is going to be P2P like Bolt which falls back to cloud relays distributed around the globe.

    Apparently "Thunder" will give P2P with relay fallback out of the box, I think they closed beta access on that now though?

    OWN HOSTED SERVER:
    having one geographically located relay server is not good for a serious FPS, you need to keep pings <~100ms planet wide really.

    RE RELAYS:
    With the ~70% P2P connect success you're never going to be able to get away from having relay/s easily.

    But there is a way to reduce relay requirements to almost 0: P2P capable clients (with a UPNP opened port or good punch-through) can act as super-nodes and serve data on behalf of clients that cant open port or punch through. you would still need a central matchmaking server, but no problem if it was just one for the whole planet even slow with pings over 1 sec. But don't expect to see this implemented commercially, it would be like opening a restaurant to sell plates of food that never deplete, not good for revenue. However having said that I have a hunch that's how GPGS works under the hood (GooglePlayGameServices realtime), but that's only for mobile, and good luck devving with it because you cant test it without building and uploading to mobile device.

    RE PUN:
    the 100ccu plan (5 years for $95) is pretty good value, I'm sure Exit games would run a considerable loss if anyone had 100ccus connected for 5 years, certainly self hosting to reach the same performance would be way more expensive.

    Having say 12 rooms of 8 players is a reasonable amount for an indie game and you get guaranteed connect, and as you say, its super easy to implement. Their geographically distributed servers are excellent, the whole globe gets reasonable pings. That's what I'm going to start with on launch of my game (PUN+), for now I'm on cheapo free plan.

    However, any solution that has server costs puts the developer in the position where they are afraid of more players, a bad position to be in. We can design around that a little: give players some good offline content to keep them busy. or...

    HYBRID SOLUTION IDEA:
    Build a frankenstein... Mix and match techs, show Bolt rooms to any players capable of p2p. Maybe let non p2p capable players know that if they port forward their router or enable UPNP then they will have more rooms available.

    HINDSIGHT IS 20/20:
    To get 20/20 vision right now: Build an encapsulated networking wrapper for your game, this way you can swap out networking solutions quickly in future without rewiring the whole game and with minimal retesting needed.

    Good luck, we're gonna need it;)
     
  5. Stanchion

    Stanchion

    Joined:
    Sep 30, 2014
    Posts:
    269
    Bolt has relay fallback now, the new version is pending on the asset store.
     
    SiliconDroid likes this.
  6. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    422
    Hello!

    I've done some looking around on Nakama and it looks promising and all, but I personally feel like this wouldn't fit me very much. If I understood the documentation correctly, I need a web server (probably not the correct name but only thing I can think of) to get it going, which is not want I want. I would want my game to be self-sustained, i.e not being dependent on any kind of master server.

    Sorry, but I'll have to pass on Nakama for now.

    I've been checking Bolt out and reading a bit about it, but I can't get a grasp of what it does. My impression is that it is basically Photon but without the cloud server stuff, but I could be wrong. Some simple clarification on what Bolt does and how it is to use would be greatly appreciated!
     
  7. donnysobonny

    donnysobonny

    Joined:
    Jan 24, 2013
    Posts:
    220
    So looking at your post, you are looking for:
    • a peer-hosted setup, where games are hosted by players themselves
    • no license fees, and no strict limitations to how many players can play together (before system resources end up being the bottleneck)
    Your first requirement is the tricky one. Your game would require there to be a list of games somewhere, so that players can select a game to join and/or you can automatically join them to an available game in your code. Although you could make this very simple, this is out-with the realms of the peer-hosted model, because something like this needs a central server to list the available games. Photon and Unity's networking services provide matchmaking capabilities to create/list/join games which you could use. There are alternative third-party solutions too, such as gamesparks; and obviously you could roll your own. This part will always cost you money though, no matter how you implement it.

    Going beyond that, a peer-hosted setup is something that you can achieve with any networking framework. How you do it will differ between frameworks. However, it sounds like your main concern is cost.

    So what you need to understand here is that you can do EVERYTHING that you can do in photon/bolt, in unet. And unet does not cost you any license fees. What you are paying for here is convenience. Photon/bolt are easy to set up, and are as close to "import plugin into unity, convert game into multiplayer" as you'll possibly get. So ultimately you need to decide whether you are willing to spend your own time implementing multiplayer at virtually no cost using something like unet; or whether you would rather pay for convenience.

    Good luck!
     
  8. Stanchion

    Stanchion

    Joined:
    Sep 30, 2014
    Posts:
    269
    Photon Bolt is networking middleware for Unity that automates most of what is needed for multiplayer. It is not based off of PUN or anything like that, it is completely original.
     
  9. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Bolt is way easier to use and nothing like Pun I own both Pun and Bolt. You can make non authoritative or authoritative as well. Bolt pretty much does alot for you for the most part.. Bolt was NOT made by Photon, it was made by Fholm, which was sold to Exit games. I have owned Bolt before the sale. anyways.... if you are new to Networking, you will learn some networking and have an easier time wit Bolt over Pun. Only thing missing from Bolt the cloud service but I hear that is going to change. Bolt also has Steam, XB1 intergration as well which is nice. and great support...
     
  10. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    422
    Thanks for the clarification! Bolt sounds quite good! I'll probably try and save up for it and use that in the future!
     
  11. robochase

    robochase

    Joined:
    Mar 1, 2014
    Posts:
    244
    keep in mind that 500 connections is 500 people playing at the same time. you have to sell a ton of copies of your game to hit these numbers consistently - $95 would be pocket change. most indie games are lucky to even hit 100 CCUs.
     
  12. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    EH??? Bolt has relay using it now for mobile..
     
  13. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    I BEEN A GAME developer for over twenty years, and I use many other engines still today...Bolt is one of the most easiest and cheapest out there in my opinion, cant get any easier than this.... Bolt does a ton for you for crying out loud, its nearly holding your hand.. Now there is stuff you will have to program sure with anything else... or if you are using certain assets you may run into issues, but those aren't Bolt issues.
     
  14. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    Have to remember Unet is one buggy mess, and nearly abandon .. as well.. Most everyone I know tried to use it dislikes it and looks else where....I also love to know how you think Unet is cheap..when they have high costs.. Unless something changed in the past 6 months which I doubt....... This is why many serious developers look else where at Pun, Bolt, or even Forge, and anything else they can, since Unet is a mess..
     
  15. donnysobonny

    donnysobonny

    Joined:
    Jan 24, 2013
    Posts:
    220
    With new documentation appearing occasionally, and each new update of unity having one or two bug/improvements/fixes for unet, I wouldn't say that it is nearly abandoned. It is clear however that it is very low on the priority list for unity to further develop it (which is understandable). You are right though, it has it's quirks and difficulties, but it is definitely usable. At the moment the hardest thing to contend with is the fact that there are "easier" solutions out there, as you have pointed out. Personally though, after being in the trade for a long time, I prefer to be able to squeeze out as much performance as I can from whatever it is that I am doing. It obviously takes longer to do this, and isn't for the feint hearted, but the result is that I am soon to release a game that was built with unet, and has been proven to handle up to 300 players comfortably, where the server-side runs on a micro server, costing me around $14 per month. My experience in multiplayer networking started out in PUN and other Photon products and I can confidently state that I wouldn't have been able to achieve that with a "convenience" solution like Bolt or PUN. In short, if you're patient and dedicated, unet is a viable option.

    My post was referring to license fees, of which unet has none. I assume that you are referring here to unity's multiplayer services (such as matchmaking etc). I did mention in my post that if you intend to use these services that it will cost you, regardless. Again though, if you are able to use unet as nothing but a networking framework (and to clarify: you don't need services such as matchmaking etc), then unet will cost you nothing.
     
  16. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    well I too been in the field for over 20 years, AAA and indie, so we can agree to disagree, great news you are able to find it useful. I been able to achieve nearly anything I needed to in Bolt. and people on my team, some no networking experience, which is news are able to learn it at a fast pace... We didn't have that luck with Unet, and even with people with experience with networking always disliked. Ya I re-read you post, and seen you seem like you where referring to the cost, the overall cost is what I'm talking about , since most people look at the bottom line. Unet is very costly , for a tool that isn't being worked on as it should, BOLT has updates and has great support, and a SLACK, Unity if you run into issues you are on your own, even as a Pro User.... I have made over plenty of games with Unity, with Unet, being used, and always hated it. Just my opinion, glad you got it working to what your after. Best of luck with it:). Look foward to seeing your game with 300 plus games with Unet.

    Yet to see many games with UNet yet. with that many players, so would be great to see this,, As most people make there own solution. such as Rust, or use U-Link, like Gloria Victis has .... Most MMO's end up using U-Link or using there own Solution, personally I use Unreal for my PC games... Due to Unity limitations .. So please keep us updated, on your game. as I personally want to see Unet, with 300 players on one server. Thanks!
     
    Last edited: Mar 17, 2017
    donnysobonny likes this.
  17. SiliconDroid

    SiliconDroid

    Joined:
    Feb 20, 2017
    Posts:
    302
    As of today:
    https://www.photonengine.com/en/Bolt
    Cloud Relay (Upcoming)
    Cloud Matchmaking (Upcoming)

    Latest release on asset store(feb) does not have fall back to relay yet.
    You sure you don't mean zeus, the connection server?
    Either way, Stanchion has told us in this thread relay backup is imminent for bolt.
    And if it works, then yeah, bolt will be the best solution for FPS games hands down.
     
    Last edited: Mar 17, 2017
  18. SiliconDroid

    SiliconDroid

    Joined:
    Feb 20, 2017
    Posts:
    302
    Thanks for the info, I've been developing games for fun for >30 years. Used to work as embedded software engineer so not afraid of coding; my current unity WIP is an empty scene with 1 prefab containing just main script entry, everything is script created, procedural levels, hand rolled GUI lib for 1 drawcall gui. I am building the best daydream FPS game for 2017. An example of my previous work for cardboard is below, procedural stuff, low drawcalls and thourough consideration of entire pipeline for highest FPS:

    My only concern is server costs when trying to make a large player base on mobile, because on mobile users are quite tight fisted. And so I NEED as much P2P as possible with fallback to relay to guarantee 100% connectability. It would be nice if those relays were globally distributed, having 1 server location will give high pings to some on the planet.
     
    Last edited: Mar 17, 2017
  19. SiliconDroid

    SiliconDroid

    Joined:
    Feb 20, 2017
    Posts:
    302
    General bolt question to anyone who may know:
    Can bolt be used from script, or do you need to do stuff with mouse in unity editor?
    i.e.: can bolt be instantiated and used purely from script?
     
    Last edited: Mar 17, 2017
  20. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    People who own it, have access to some of this if you ask for as Stanchion has mentioned in the above post about Bolt having it, we been using it. I do not use the Cloud anything.. Don't need it.

    Cloud is not use to us , currently. But I know they are adding some new stuff for Bolt, which I'M NOT SURE what they shared with the public so I will leave that up to Stanchion to confirm.
     
  21. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    As someone who uses Unity for mobile, that is why we went with Bolt as well, it does have relay to guarantee 100% connectability, Reason we are using Zeus, and not going with a dedicated server as yes Mobile users are cheap, and rarely want to spend money, but there are ways to make plenty of money.. But for new games, I never go with a dedicated server until I see how well the game does.. Your better off having the players host and most will be happy , since the game has some form of multi player..

    Far as not being afraid of coding, you shouldn't be but that don't always mean programmers know how to do Net coding, some do not..Like shaders, some programmers have no idea how to program UI, or AI, or even game play, not saying you, but I seen plenty that have no clue ... But can program other things, so really depends. So Bolt is good for newbie net coders...But not just./..... Its even better for experience net coders, so its a wide range that it will help you, at the end of the day...We were after, a perfect all around solution, and we have used Pun, Forge, Bolt and Unet... and from my experience and the experience of people I hire, they all end up loving Bolt for reasons I stated. Its a great all around and if you have a wide range of experienced users, many teams do, your good to go there.. Not saying Pun, is bad, I personally didn't like it. Unet, was ok, but was to buggy and over all cost was to high..

    But if I where you is either use them all and pick what is best for you, Photon is free, Unet free, and the others not free.. and also do your research and ask questions.
     
    SiliconDroid likes this.
  22. SiliconDroid

    SiliconDroid

    Joined:
    Feb 20, 2017
    Posts:
    302
    Thanks for your info @recon0303. Yes Bolt's looking good at the moment, as soon as the new version hits the store I'll pull the trigger and buy it to try it I think. Bolt with global cloud relay service fallback would be most excellent.
     
    recon0303 likes this.