Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Which Networking Assets should I use/learn?

Discussion in 'General Discussion' started by Tarball, May 2, 2019.

  1. Tarball

    Tarball

    Joined:
    Oct 16, 2016
    Posts:
    142
    I am doomed to make a game with online play. There is no way around it. I've been looking into a few assets to help me along, since I don't know too much about master servers, game servers, etc.

    The only bits of functionality I need are:
    • Lobby with chat, create, and join games
    • Spawn new rooms as new games are created
    • handle transforms, physics, and character data on game servers
    • Log in/out, friends list, etc
    The first question is, which tools should I use? I'm currently looking at Forge Networking Remastered and Barebones Masterserver Framework. So far, it looks like I'll use Barebones for a headless master server and Forge for game servers. However, before digging deeper into the documentation, I'd like some advice.

    The second question is, what vps server hosting solutions would you recommend, and how much will it cost me? From my bullets above, what kind of specs would I need for vps? I looked at a few companies, and they use a lot of jargon, and frankly, I'm not sure how much resources I'd need. I'm fairly comfortable around a Linux terminal (ssh etc), so if going Linux saves me a few bucks, I'm all for it.

    Any and all advice is welcome, though I'll not be rolling my own solution. Extending a framework is one thing, but I'm not going to reinvent the wheel.
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    5,428
    Look at several network solutions, see what features match what you're looking for, try them out, and see what works best for you.

    https://forum.unity.com/threads/wha...k-solutions-assets.609088/page-2#post-4478689

    As for VPS, it depends on what resources your game server needs and how responsive the server needs to be. A server that simulates the game world is more likely to need to be more responsive, so probably needs dedicated CPU cores, to operate optimally. This is usually a premium. Some companies advertise a "dedicated hyperthread", which is a fancy way of telling you that you are still sharing the CPU core with another VPS while pretending it is a dedicated resource.

    You really should test your game server to see what hardware resources it really needs, then spec your VPS to match. Otherwise you'll either rent one too small which won't work, or you'll get something too big and waste money.

    If you need a lot more performance, I came to the conclusion that somewhat outdated dedicated servers have a much better price/performance ratio than any VPS. For example, my game is running on a 2x Opteron 4284 (16 cores total) and 32GB ram with 33TB transfer dedicated server for $65/month. A VPS with comparable specs would be $300-$600 per month.
     
    Tarball and Ryiah like this.
  3. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    319
    Have a look at SmartFox Server too. Does all the things you want, with a pretty cool admin area too. www.smartfoxserver.com
     
    Tarball and Ryiah like this.
  4. Tarball

    Tarball

    Joined:
    Oct 16, 2016
    Posts:
    142
    Maybe I'll get a better feel for it after fooling around with it some more. As far as I know, I can get a super basic VPS for like 4$/month that I can play with while I learn. I may do just that. I think I'll stick with Forge (game servers) + Barebones (master server) after doing additional research, and I'll serialize data and then save as JSON. Now I just have to figure out how to make Forge, Barebones, and JSON play well together.

    That sounds great, but I travel too much to maintain the hardware.
     
  5. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    5,428
    Sounds like fun :)


    You rent the dedicated server from the data center. They maintain the hardware. You just need to file a ticket if you notice an issue.
     
  6. Tarball

    Tarball

    Joined:
    Oct 16, 2016
    Posts:
    142
    It's actually not quite as much fun as I thought it would be. I've got a server up and running on a Linux VPS that I can login on through the game and do basic stuff so far, but the Barebones framework is getting kinda long in the tooth, and the documentation is not organized very well. Plus, I hesitate to commit to anything that is based on Unet and getting deprecated.

    However, I found this
    https://support.unity3d.com/hc/en-us/articles/360001252086-UNet-Deprecation-FAQ
    unity blog with a link to this
    https://github.com/Unity-Technologies/FPSSample
    unity multiplayer project which prototypes their new networking solution. I'm going to try it out and see how well-commented it is and see if I can get anywhere with the networking code.

    I will post an update here, after messing with it for a while, to let others know whether I think it's worth digging into in its current state of development.

    (edited a link)
     
  7. Tarball

    Tarball

    Joined:
    Oct 16, 2016
    Posts:
    142
    It turns out the new Unity multiplayer which is in alpha stage, while interesting, has very little functionality at this time. I looked at photon, mirror, and darkrift 2, as well, and I wound up going with

    https://assetstore.unity.com/packages/tools/network/networking-and-serialization-tools-tnet-3-56798

    TNet3 seems to me to be the best all-around solution to networking in Unity at this time. Not only does it have all the features, but the documentation and tutorials seem to be great so far, and there is no CCU limit! You can host wherever/however you want, and you just have the one-time fee up front. Plus, it's on sale right now, which didn't hurt.
     
    Ryiah likes this.
  8. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,036
    Well, you sold me on it. I'm not sure when I'll want to put together another little multiplayer game, but between your recommendation here (after going through other stuff first), some research I've done recently, the sale, and the reviews on that TNet3 asset, I went for it.
     
  9. bobisgod234

    bobisgod234

    Joined:
    Nov 15, 2016
    Posts:
    226
    +1 for TNet from me. Doesn't get mentioned as much as it should when it comes to networking solutions for Unity IMO.