Search Unity

Friends-only networking?

Discussion in 'Multiplayer' started by RighteousWeasel, Apr 3, 2023.

  1. RighteousWeasel

    RighteousWeasel

    Joined:
    Sep 7, 2013
    Posts:
    30
    Hey all, I was looking through the Relay "pricing" and features... Looking for clarification.

    I'm interested in having a "friends-only" multiplayer model for one of my games. Basically, friends would share friend codes and that would be the only way of connecting with eachother. I see that Relay has a Friends system implemented. I'm wondering about cost/usability. Has anyone done something similar to this?

    I really only need the IP used to connect with eachother, which obviously Relay would provide given I use their service. I would find it a bit crazy for Relay to charge me money every month for something so simple, rather than one time up front per user. The dollars don't really add up in a case like this.

    Cost should be extremely minimal, as the only Relay call would be grabbing an IP from an available friend, and then the internal networking code would take it from there.

    Thanks!
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    6,005
    You can have players connect by sharing the host IP. However, in many cases this isn‘t enough since the host will also have to setup port forwarding on the router and possibly configure the firewall(s) too. That‘s where relay comes into play: everyone including host connects to relay to avoid this issue.

    You may be able to use a custom or open source relay solution. You'd still be paying for the server machine itself though, and be responsible for administration and server security and all that.

    The relay has no concept of "users", just clients which can be anyone from anywhere.

    Have you done a cost calculation? See: https://unity.com/solutions/gaming-services/pricing
    You get 50 CCU for free per month. This is difficult to reach for most games anyway. You would have to sell probably between 1,000 to 10,000 copies to reach 50 CCU at any given time, with the exception of the launch period where many players try it out at roughly the same time.

    If your game does get some traction and relay cost explodes and say, you're having to pay $500 per month for Relay. How much money are you making on the game sales in return? If you don't know, or would have to guess, then do an ROI calculation for your particular situation because these services are all about ROI, and their business model simply wouldn't make sense if the ROI just isn't there for many users.

    You may be surprised that you may end up paying what's taken for granted with any ecommerce transaction, namely a fee in the lower single-digit % range.
     
    Last edited: Apr 4, 2023