Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Noble Connect - Relays and Punchthrough

Discussion in 'Assets and Asset Store' started by thegreatzebadiah, Mar 15, 2019.

  1. vyral13

    vyral13

    Joined:
    Sep 13, 2014
    Posts:
    18
    Thanks for the fast reply!
    More than happy to help out. Tested a new blank example scene on unet. Connects via wifi, doesn't connect via 4g but doesn't freeze compared to running my game. Again all works on other device One Plus. Could be a setting in my phone. But Photon still connects regardless.

    Reason I switched was due to time limitations. My original plan was to use Ignorance/Mirror/Noble Connect. However switching from Unet - Mirror, my cars became more jittery, and things like wheel rotation just stopped working. All worked fine in unet, so decided to just stick with UNET and use Noble Connect. But again as Unets been completely abandoned, plus I still get random errors now and again. So you can see my dilemma. Plus now I'm using pun, I have to do everything locally rather than server controlled I believe, not only that very restricted on player count!
    I'll join the discord once I'm home.
    Thanks again!
     
  2. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    691
    Hi, I'm interested in NAT solution for faster net play but then I'm concerned about the hacking.
    You said if the game is successful, it will cover the cost but then if it's successful, I'm afraid we can't take the risk of being hacked. P2P cannot fight the hackers and any serious developer will not solely rely on P2P.
    I think you will need to realign the strategy and provide some options.

    Ideally, this what I would like to see.

    Self-hosted server and make whether to use NAT optional.
    Normally, we'll let NAT punch-through as much as possible, but for suspicious users, we will turn NAT off for security checks.

    What do you think?
     
  3. toddkc

    toddkc

    Joined:
    Nov 20, 2016
    Posts:
    89
    I can't get this working with mirror. Following the included instructions I imported noble connect, then mirror, then ignorance, then the mirror noble connect package. I then get the following error:
    Assets\Noble Connect\Mirror\Internal\NobleNetworkManager.cs(285,30): error CS0506: 'NobleNetworkManager.StartHost()': cannot override inherited member 'NetworkManager.StartHost()
    .

    Was hoping it would be an easy fix, but changing the modifiers just causes more and more errors. I tried both the 2018.4 lts and the newest 2019.3 versions, same issues.

    -edit: apparently due to a mirror update
     
    Last edited: Mar 20, 2020
  4. Zebadiah

    Zebadiah

    Joined:
    Apr 6, 2014
    Posts:
    34
    @toddkc I believe I already replied to you on discord but a new version is coming that works with the latest version of Mirror. Sorry for the issues, it's hard to keep up with Mirror sometimes, they release so often.

    @chrisk What you're talking about is outside of the scope of Noble Connect but you could certainly implement something like what you're talking about using Noble Connect. You're basically describing a hybrid dedicated host / peer-hosted solution though and I don't think I've ever heard of anyone actually doing that. Usually it's one way or the other, if you are super serious about cheating you don't let players host and you use dedicated servers, which would not need Noble Connect. If you're not as worried about cheating then you go with peer-hosted with Noble Connect. I would be interested to hear if you do get a hybrid solution working though. It certainly doesn't seem impossible, but I've never heard of it.
     
    toddkc likes this.
  5. RukiMx

    RukiMx

    Joined:
    Mar 6, 2015
    Posts:
    1
    Hi! I recently bought MatchUp and I m not capable to making work outside a test environment. I use mirror and recently I'm trying to integrate Noble connect to avoid permission issues and such. Can you help me to integrate due to as I can see you are already working on the last version on Mirror.
     
  6. Trev3333

    Trev3333

    Joined:
    Apr 29, 2018
    Posts:
    2
    hi hope someone can help me. hope im not missing something silly. ive been trying install with mirror like toddke. ive tried both LiteNetLib and Ignorance. after i install mirror noble connect package i get 6 errors in the scripts located in Assets\Noble Connect\Mirror\Internal

    Assets\Noble Connect\Mirror\Internal\NobleNetworkLobbyManager.cs(24,20): error CS1061: 'NetworkWriter' does not contain a definition for 'Write' and no accessible extension method 'Write' accepting a first argument of type 'NetworkWriter' could be found (are you missing a using directive or an assembly reference?)

    Assets\Noble Connect\Mirror\Internal\NobleNetworkLobbyManager.cs(25,20): error CS1061: 'NetworkWriter' does not contain a definition for 'Write' and no accessible extension method 'Write' accepting a first argument of type 'NetworkWriter' could be found (are you missing a using directive or an assembly reference?)

    Assets\Noble Connect\Mirror\Internal\NobleServer.cs(582,27): error CS0117: 'NetworkServer' does not contain a definition for 'SendToClient'

    Assets\Noble Connect\Mirror\Internal\NobleServer.cs(605,111): error CS0117: 'NetworkServer' does not contain a definition for 'SpawnWithClientAuthority'

    Assets\Noble Connect\Mirror\Internal\NobleServer.cs(606,116): error CS0117: 'NetworkServer' does not contain a definition for 'SpawnWithClientAuthority'

    Assets\Noble Connect\Mirror\Internal\NobleServer.cs(607,130): error CS0117: 'NetworkServer' does not contain a definition for 'SpawnWithClientAuthority'

    am i doing something wrong?
    hope someone can help
    thanks in advance Trev
     
  7. Zebadiah

    Zebadiah

    Joined:
    Apr 6, 2014
    Posts:
    34
    What issues are you running in to? Match Up and Noble Connect both come with examples that should work with the latest version of Mirror on the asset store.
     
  8. Zebadiah

    Zebadiah

    Joined:
    Apr 6, 2014
    Posts:
    34
    Is this with the latest version of Mirror from the asset store or github? We only support the latest from the asset store.
     
  9. Trev3333

    Trev3333

    Joined:
    Apr 29, 2018
    Posts:
    2
    latest mirror from asset store and ignorance 1.3.6 from github releases.

    the errors are exactly the same when i used latest mirror from asset store and LiteNetLib4Mirror 1.2.8 from github releases

    alos i found LiteNetLib4Mirror 1.2.10 on here https://github.com/MichalPetryka/LiteNetLib4Mirror/issues/21 that says it should work with latest Mirror on asset store 11.4.2 and get same errors

    btw this is all on unity 2019.3.8f1

    hope this helps if u need any more info just ask :)

    thanks for getting back so quick trev

    quick up date i went on the discord chat and there was a Nobel Connect package for 2019.3 for download and that fixed the errors i was getting :)
     
    Last edited: Apr 28, 2020
  10. jough

    jough

    Joined:
    Aug 18, 2013
    Posts:
    41
    This might not be the right place to put my question, but here goes.

    I started using MatchUp awhile back, everything works really well when testing. I created my own Linux virtual machine and am able to run the "MacthUpServer_Linux".

    From the docs:
    Also make sure to update the matchmakerURL on your MatchUp component to point to your server.

    Where do I find the URL? Do I need to link it to a domain somehow?

    Sorry I'm a noob, but I don't know where else to look! Any pointers would be super helpful!
     
  11. Erdal42

    Erdal42

    Joined:
    Sep 17, 2018
    Posts:
    19
    I wanted to try Noble Connect out, but ran with the exact same issue.

    Easy to reproduce with a new project, trying to make it work with Mirror :

    - Create new Unity project (tested in 2019.3.9.1f)
    - Asset store : download latest Noble Connect Free : OK
    - First issue: Read the README inviting to try out an example which doesn't exist in the imported libs
    (I just supposed here that you have to choose between UNet and Mirror, no pb)
    - Follow the INSTALL in Mirror folder:
    - Download and import last version of Mirror from the store: OK
    - Download and import from github one of the two mentionned transport lib (I chose Ignorance) : OK
    - Import the mirror support (provided unity package in the mirror folder) : same bugs as mentionned by Trev

    Project cannot compile, I'm stuck :/

    MirrorErrorNoble.png
     
  12. Erdal42

    Erdal42

    Joined:
    Sep 17, 2018
    Posts:
    19
  13. Erdal42

    Erdal42

    Joined:
    Sep 17, 2018
    Posts:
    19
    Ok, so after some digging here is my feedback: DO NOT BUY THIS ASSET

    While on paper it may look great. It doesn't follow Mirror's updates (which is on the contrary very active).
    Except the bugs cited above (I did fix those issues, that was pretty simple actually. Mirror just changed some signatures), it's not as "plug and play" as said (nothing given to replace Mirror's Discovery for example). And I ran randomly into bugs like
    Code (csharp):
    1. Noble Connect [34922]: No bridge found for peer: 127.0.0.1:51829
    The website has zero doc.

    The dev didn't give any feedback for the reported bug above for more than a week. And while that might be normal in this period (Covid19), it makes you think about how your game will continue working if a one-guy project is not responding if something happens to the relay servers.

    This project looks like good if you were using UNet and want some P2P multiplayer (didn't try but I'm supposing as there is no more updates in UNet) but definitely not if you're using Mirror latest asset store version.

    I don't think this project deserves (currently) 5 starts and will write a review in this way. But I'd be glad to give ffor free the fixed files / assists you in testing with Mirror / discuss about my remark above, to change my mind a put 5 stats back.

    Cheers.
     
  14. Erdal42

    Erdal42

    Joined:
    Sep 17, 2018
    Posts:
    19
    Just joined the Discord...

    THIS PROJECT IS DEAD.
    DO NOT BUY OR EVEN TRY THE FREE VERSION

    You're warned now :)
     
  15. Zebadiah

    Zebadiah

    Joined:
    Apr 6, 2014
    Posts:
    34
    It's the Matchmaker URL on the Matchmaker component, you can change that to point to whatever domain or IP that you want.
     
  16. Zebadiah

    Zebadiah

    Joined:
    Apr 6, 2014
    Posts:
    34
    @Erdal42 Sorry for your issues. I've been working on some major updates for Noble Connect and the support got away from me a bit. The mirror update is coming shortly, and going forward we will indicate which version of Mirror is supported on the Asset Store page. It is not possible for me to keep up to date with Mirror's rapid release schedule, but I can at least make things easier when getting started so it's clear which version of Mirror to use.

    https://noblewhale.com/docs/
    https://noblewhale.com/docs/annotated.html
    https://noblewhale.com/faq/
     
  17. Zebadiah

    Zebadiah

    Joined:
    Apr 6, 2014
    Posts:
    34
    @Erdal42 The latest version of Noble Connect that was just released supports the latest version of Mirror on the Asset Store. Going forward I'll make sure to indicate which version of Mirror is supported in the Product Description. The "no bridge for peer" issue is also now fixed. Sorry for the delays.
     
  18. liuyang61

    liuyang61

    Joined:
    Nov 25, 2013
    Posts:
    3
    Hi, I've purchased the starter pack but my CCU limit remains 8. What should I do?
     
  19. Zebadiah

    Zebadiah

    Joined:
    Apr 6, 2014
    Posts:
    34
    @liuyang61 I believe I already responded to you on discord, but this issue has been resolved. Thanks for reporting it.
     
  20. yangyang233

    yangyang233

    Joined:
    Nov 20, 2018
    Posts:
    2
    I'm going to buy it and use it with mirror. I want to know if there is any way for other players to reselect the current host after it exits the game instead of ending it together
     
  21. yangyang233

    yangyang233

    Joined:
    Nov 20, 2018
    Posts:
    2
    And it can hardly be used in games at 4G
     
  22. vyral13

    vyral13

    Joined:
    Sep 13, 2014
    Posts:
    18
    One of the reasons I had to switch networking.
    God, I would LOVE to use Mirror and Noble Connect.
    My game is android/mobile based. So host migration or soft host drop is 100% needed without going the dedicated server route. Trouble is the alternate networking solution sends 10x more data than my setup with Mirror, however host migration is included and thats vital for me.

    On the plus side, the 4G Host & Client freeze issue on the Samsung S10 is now fixed!

    +1 for a host migration (but i think thats more down to Mirror?)
     
  23. Zebadiah

    Zebadiah

    Joined:
    Apr 6, 2014
    Posts:
    34
    @vyral13 Yeah, that's pretty much down to Mirror, it's kind of outside of the scope of Noble Connect, whose only job should be to establish a connection. You can definitely implement Host Migration on top of Noble Connect though, it's just not built in. You can take a look at the old UNet host migration code to see how you might go about doing that.
     
  24. Zebadiah

    Zebadiah

    Joined:
    Apr 6, 2014
    Posts:
    34
    Not totally sure what you mean here, but if you want to stay connected to the current host then just don't disconnect :)

    Noble Connect supports pretty much every kind of connection these days including 4G, tethered, vpn, etc. I believe the only thing it doesn't support is web sockets.
     
  25. voody2506

    voody2506

    Joined:
    Jun 21, 2018
    Posts:
    14
    Hello. Is there msg/sec limit like in Photon Cloud? Can I handle 100 Network Transforms with it?
     
  26. Zebadiah

    Zebadiah

    Joined:
    Apr 6, 2014
    Posts:
    34
    @voody2506 There is no rate limit but there is a monthly bandwidth limit and ccu limit depending on your plan.
     
  27. xhkong

    xhkong

    Joined:
    Jul 2, 2020
    Posts:
    6
    @Zebadiah I'm really interested in using this with Mirror. It seems that mirror support is an issue. The current Mirror version in Asset store is 16.1.1. The noble connect in Asset Store says it support 13.0.1. Is there any plan in publishing an update soon? Or I will have to move on. Thanks!
     
  28. Zebadiah

    Zebadiah

    Joined:
    Apr 6, 2014
    Posts:
    34
    @xhkong Yes I am releasing an update today that is compatible with the latest version of Mirror on the Asset Store.
     
  29. pashara123

    pashara123

    Joined:
    Feb 12, 2018
    Posts:
    1
    Hi, @Zebadiah.
    How I can start using p2p on stack Noble Connect + Mirror? Is it possible?
    If I'm trying to use LiteNetLib4MirrorTransport on Example Mirror, Connection type is Always DIRECT.

    Because NobleClient.cs contains the following lines:

    Code (CSharp):
    1.  
    2.         private void OnClientConnect(NetworkConnection conn, ConnectMessage message)
    3.         {
    4.             // This happens when connecting in LAN only mode, which is always direct
    5.             if (baseClient == null) latestConnectionType = ConnectionType.DIRECT;
    6.  
    7.             isConnecting = false;
    8.             if (baseClient != null)
    9.             {
    10.                 baseClient.FinalizeConnection(hostBridgeEndPoint);
    11.             }
    12.         }
    There is no any mentions in the code ConnectionType like PUNCHTHROUGH or RELAY.
    How to start using RELAY and does it helps to start using Noble for p2p connection?
    Have a nice day!
     
  30. Zebadiah

    Zebadiah

    Joined:
    Apr 6, 2014
    Posts:
    34
    @pashara123 By default Noble Connect will use relays only when necessary. You don't generally tell Noble Connect what type of connection to use, it picks the best one automatically. If you would like to force a relay connection though there is a Force Relay Connection option on the NetworkManager that you can use. You'll need to set it on both client and host to force relays to be used.
     
  31. HealSoup

    HealSoup

    Joined:
    Oct 1, 2013
    Posts:
    1
    Hello @Zebadiah
    I am looking to make a P2P game on desktop only. I dont have any want of relays.

    Is there a way to never use relays? Ie only connect if it can be direct or punch through?
    With only using direct/punch through, is an account/game still limited by CCU?

    Thank you,
     
  32. WarpedPixel

    WarpedPixel

    Joined:
    Jun 21, 2020
    Posts:
    1
    This seems like the perfect package for my needs, but Im having a hard time getting it to work. I have a multiplayer game that works well with Mirror on open networks. I have a matchmaking server ready to form matches and share server IP/port connection information. But I can't get Noble Connect to run reliably.

    I went back to the basics and created a clean project: Unity 2019.4.4f1 (basis for my project), Mirror 1.7.3, Noble Connect latest and either LiteNet4Mirror 1.2.10 (the official release 1.2.8 has a different bug) or Ignorance 1.3.9. Both give the same error. This is on Mac OS Catalina latest.

    I am running the Example Mirror scene from Noble Connect. Just replaced the transport to point to the new transport component I added to the Network Manager (threaded for Ignorance). Just clicking on the "Host" button shows me the messages below. Naturally things don't work after this. The HUD does show a server and port, for example 161.35.236.97:53353.

    Code (CSharp):
    1. NetworkServer.RegisterHandler replacing handler for Mirror.ConnectMessage, id=55829. If replacement is intentional, use ReplaceHandler instead to avoid this warning.
    2. (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    3.  
    4. NetworkServer.RegisterHandler replacing handler for Mirror.DisconnectMessage, id=8819. If replacement is intentional, use ReplaceHandler instead to avoid this warning.
    5. (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    6.  
    7. Server received a client connection.
    8. Client connected.
    9. Noble Connect [5570]: Failed to send over socket: 169.254.240.83:53803 -> 161.35.236.97:3478
    10. No route to host
    11. UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    12. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    13. UnityEngine.Logger:Log(LogType, Object)
    14. UnityEngine.Debug:LogError(Object)
    15. NobleConnect.Logger:Log(String, Level) (at C:\Users\thegr\Noble Whale\Noble Connect\Noble Connect DLL\Noble Connect\Logger.cs:39)
    16. NobleConnect.Stun.Controller:SendMessage(Message, IPEndPoint, IPEndPoint) (at C:\Users\thegr\Noble Whale\Noble Connect\Noble Connect DLL\Noble Connect\Stun\Controller.cs:277)
    17. NobleConnect.Stun.StunExtension:Send(Message, IPEndPoint, IPEndPoint) (at C:\Users\thegr\Noble Whale\Noble Connect\Noble Connect DLL\Noble Connect\Stun\StunExtension.cs:131)
    18. NobleConnect.Stun.<>c__DisplayClass54_0:<_Send>b__0(IStunExtension) (at C:\Users\thegr\Noble Whale\Noble Connect\Noble Connect DLL\Noble Connect\Stun\Controller.cs:713)
    19. NobleConnect.Stun.ExtensionList:ForEachUntilTrue(Func`2) (at C:\Users\thegr\Noble Whale\Noble Connect\Noble Connect DLL\Noble Connect\Stun\ExtensionList.cs:57)
    20. NobleConnect.Stun.Controller:_Send(Message, IPEndPoint, IPEndPoint) (at C:\Users\thegr\Noble Whale\Noble Connect\Noble Connect DLL\Noble Connect\Stun\Controller.cs:712)
    21. NobleConnect.Stun.Controller:SendRequest(Message, IPEndPoint, IPEndPoint, IPEndPoint, Action`1, Action`1, Int32, Int32) (at C:\Users\thegr\Noble Whale\Noble Connect\Noble Connect DLL\Noble Connect\Stun\Controller.cs:684)
    22. NobleConnect.Stun.Controller:Send(Message, IPEndPoint, IPEndPoint, IPEndPoint, Action`1, Action`1, Int32, Int32) (at C:\Users\thegr\Noble Whale\Noble Connect\Noble Connect DLL\Noble Connect\Stun\Controller.cs:699)
    23. NobleConnect.Turn.TurnExtension:SendAllocateRequest(Action`1, Action`1, Action`1, Byte[], Int32, Int32, Int32, Int32) (at C:\Users\thegr\Noble Whale\Noble Connect\Noble Connect DLL\Noble Connect\Turn\TurnExtension.cs:216)
    24. NobleConnect.Ice.Controller:<GatherReflexiveAndRelayCandidates>b__56_0() (at C:\Users\thegr\Noble Whale\Noble Connect\Noble Connect DLL\Noble Connect\Ice\Controller.cs:645)
    25. System.Threading.ThreadHelper:ThreadStart_Context(Object)
    26. System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
    27. System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
    28. System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
    29. System.Threading.ThreadHelper:ThreadStart()
    30.  
     
  33. Fuestrine

    Fuestrine

    Joined:
    Feb 13, 2013
    Posts:
    495
    @HealSoup
    Games are pay limited by CCU regardless of the connection type with Noble Connect. Punchthrough was probably a majority of the work for this project and we didn't want to be incentivized to give people a worse (relay) connection just so we could make more money.

    Let me know if you still want me to look into if you can only use punchthrough and not relays.
     
    Last edited: Nov 10, 2020
  34. Zebadiah

    Zebadiah

    Joined:
    Apr 6, 2014
    Posts:
    34
    @WarpedPixel The "Failed to send over socket" messages are a normal part of the process. Noble Connect will attempt to use every network interface and address available, and many will often fail, but that's fine as long as at least one succeeds. I would need to see the full logs from both host and client to see what's going wrong, if anything. You can set the log level to "Developer" on the NetworkManager component to get more output.
     
unityunity