1. We've introduced thread tags, search within a thread and similar thread search. Read more here.
    Dismiss Notice
  2. Learn how you'll soon be able to publish your games to China in four simple steps with Xiaomi. Sign up now for early access.
    Dismiss Notice
  3. Get further faster with the Unity Plus Accelerator Pack, free for new Unity Plus subscribers for a limited time. Click here for more details.
    Dismiss Notice
  4. We've released our first Timeline Experimental Preview, our new tool for creating cutscenes and more! To check it out click here.
    Dismiss Notice
  5. Unity 5.5 is now released.
    Dismiss Notice
  6. Check out all the fixes for 5.5 in patch releases 1 & 2.
    Dismiss Notice
  7. Unity 5.6 beta is now available for download.
    Dismiss Notice

[NO CCU LIMIT] Forge Networking: Superpowered & Fully Cross Platform

Discussion in 'Assets and Asset Store' started by farrisarts, Dec 22, 2014.

  1. farrisarts

    farrisarts

    Joined:
    Jul 13, 2012
    Posts:
    868
    You are correct and I have made the change! :D Thanks for catching that, a lot going on update wise so that card slipped haha.
     
  2. AbyssWanderer

    AbyssWanderer

    Joined:
    Mar 15, 2016
    Posts:
    31
    Hi.

    Thank you for the documentation you've made - life goes much easier with it.

    However, we still were unable to rise lobby-server (that broadcasts list of hosts to clients so that they connect peer-to-peer). We can't fulfill this stage in documentation.

    After calling client.Connect(masterServerHost, (ushort)masterServerPort); the event bindSuccessful is called, but serverAccepted is not called.
    Client sees this: http://prnt.sc/ehv2so
    Meanwhile client.client.Connected returns true. How is that possible? Could you direct us, please?
    Client is of type "TCPMasterClient"

    Note that if we make everything (master-server, host and client) on same computer - then client sees host: http://prnt.sc/ehv20m

    P.S. Yes, we are using plugins "Unity Independent Master Server REMASTERED" and "NAT Hole Punch Server REMASTERED"
     
  3. farrisarts

    farrisarts

    Joined:
    Jul 13, 2012
    Posts:
    868
    No problem :)

    Can you check the client.Connected boolean rather than client.client.Connected? It is possible that you bound the socket but you have not connected to the server and the request is just active (not timed out yet).

    So this makes me think that it is your firewall settings on the machine that your Master Server is on. Make sure that the machine firewall allows the application and the network firewall has it's port forwarded (for the master server and the nat server). The ports do have to be forwarded for these servers.
     
  4. Labmda

    Labmda

    Joined:
    Oct 21, 2016
    Posts:
    2
    hi, it's possible to send audio.clip over network? i try to make a chat vocal but i have meet some probleme or if someone have other solution?
     
  5. guidkal69

    guidkal69

    Joined:
    Mar 15, 2017
    Posts:
    1
    Hi,
    i wanted to try the free version but it seems that it is not the remastered version since i cant find the network contract wizard. So my question is: Is the remastered version available as free version? Cheers!
     
  6. farrisarts

    farrisarts

    Joined:
    Jul 13, 2012
    Posts:
    868
    Yes, we show this in our VOIP sample that comes with FNR build
     
  7. farrisarts

    farrisarts

    Joined:
    Jul 13, 2012
    Posts:
    868
    The Free version is very old and out-dated. As you pointed out it is not Remastered and does not reflect what forge is any longer. We currently do not have a Remastered version that is free for Forge. We will be doing full video tutorials on Remastered starting next week so that you can get a glimpse of how it works. We may be making another free build for Remastered in the future, but it is not on our current roadmap.
     
  8. mecharius

    mecharius

    Joined:
    Jan 11, 2014
    Posts:
    14
    Hi, just giving FNR a go... the docs say the network contract wizard can set fields to string, however there isn't an option in the drop down in the editor window. Am I missing something?

    Also, at the minute every time I hit the compile button, after compilation if the NCW window is showing then it turns "blank", i.e. only the title label shows and the window must be closed and reopened to show the list of generated classes again. There are no errors in the console.

    I'm using v21.5 directly from the asset store

    EDIT:
    - I also downloaded v22 from the developer profile with the same result
    - Also, I can't join your discord server, I click the link and accept the permissions but the server doesn't appear in discord.
    - Finally :) ... is there a way to kick a player from the server? Can't see anything in the docs and the "Disconnect" method doesn't seem to support this as others on this forum suggest.
     
    Last edited: Mar 19, 2017
  9. farrisarts

    farrisarts

    Joined:
    Jul 13, 2012
    Posts:
    868
    Thanks for the support! :)

    We have removed strings from the fields drop down for Fields since they are very expensive to keep track of and also they don't make much sense since fields are not reliable for the best network speed.

    This is a weird unity UI refresh bug we need to fix, we have a card in Trello for someone to fix this. It currently is just a visual bug, everything generated should continue working as normal.

    Do you already have a discord account? I recently fixed a bug where people who purchased on the asset store was not seeing the correct discord download link on their profile. Do you mind giving it another shot?

    You can kick a player with the Disconnect method. There is an overload on the server that takes a NetworkingPlayer as an argument. By calling this on the server you will be able to "kick" the player. Please note that you need to cast the NetWorker to UDPServer or TCPServer based on the protocol you are using to see the overload:

    Code (CSharp):
    1. ((UDPServer)Networker).Disconnect(targetPlayer //...
     
  10. CosmasStudio

    CosmasStudio

    Joined:
    Jun 6, 2013
    Posts:
    21
    If a player host a game from his mobile phone how do we keep the game running for other players if he leaves the game? How do we do host migration on mobile hosted game?
     
  11. mecharius

    mecharius

    Joined:
    Jan 11, 2014
    Posts:
    14
    Thanks for the replies.

    I already have a discord account, I've tried a couple of times - I give permissions and get the success message on the BMS portal, but there is no Forge server in the server browser on the left. Is there a direct invite link?

    Oh yeah, thanks - I was missing the cast! Cheers.
     
  12. mecharius

    mecharius

    Joined:
    Jan 11, 2014
    Posts:
    14
    Re syncing strings via the NCW - I'm using a byte[] for now with some string encoding, but on Trello I see that you are looking to remove this from NCW as well. Is there any particular reason why? Is the idea to push people towards RPCs for anything beyond the very simple value types?

    I'm also encountering an issue where it looks like a single call to "Instantiate" on the server is causing multiple instantiations on the client. This happens intermittently, with the same build of the game - sometimes there is no exception, other times there is an exception. When the error occurs there is an exception before anything else is logged by my server code:

    Code (CSharp):
    1.  
    2. ArgumentException: An element with the same key already exists in the dictionary.
    3.   at System.Collections.Generic.Dictionary`2[System.UInt32,BeardedManStudios.Forge.Networking.NetworkObject].Add (UInt32 key, BeardedManStudios.Forge.Networking.NetworkObject value) [0x00171] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:432
    4.   at BeardedManStudios.Forge.Networking.NetWorker.CompleteInitialization (BeardedManStudios.Forge.Networking.NetworkObject networkObject) [0x0001c] in D:\Code\MyGame\Assets\Bearded Man Studios Inc\Source\Forge\Networking\NetWorker.cs:421
    5.   at BeardedManStudios.Forge.Networking.NetworkObject.RegistrationComplete () [0x0001f] in D:\Code\MyGame\Assets\Bearded Man Studios Inc\Source\Forge\Networking\Objects\NetworkObject.cs:827
    6.   at BeardedManStudios.Forge.Networking.Generated.PlayerEntityBehavior.Initialize (BeardedManStudios.Forge.Networking.NetworkObject obj) [0x0004b] in D:\Code\MyGame\Assets\Bearded Man Studios Inc\Generated\UserGenerated\PlayerEntityBehavior.cs:24
    7.   at BeardedManStudios.Forge.Networking.Unity.NetworkManager+<Start>c__AnonStorey0.<>m__8 () [0x00094] in D:\Code\MyGame\Assets\Bearded Man Studios Inc\Generated\NetworkManager.cs:232
    8.   at BeardedManStudios.Forge.Networking.Unity.MainThreadManager.HandleActions () [0x00076] in D:\Code\MyGame\Assets\Bearded Man Studios Inc\Scripts\MainThreadManager.cs:134
    9.   at BeardedManStudios.Forge.Networking.Unity.MainThreadManager.FixedUpdate () [0x00002] in D:\Code\MyGame\Assets\Bearded Man Studios Inc\Scripts\MainThreadManager.cs:140
    10.  
    11. (Filename: /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs Line: 432)
    12.  
    I'm using the standard multiplayer menu. My server hosts, and creates some PlayerEntity game objects for itself using the NetworkManager generated methods.

    Code (CSharp):
    1. var playerEntity = NetworkManager.Instance.InstantiatePlayerEntity();
    When a second client connects (both running on the same PC, connected via localhost) the server creates the PlayerEntity objects for that new client using the same method.

    This randomly causes two objects to be spawned on the client.

    I can verify with Debug logging and breakpoints that the instantiate code on the server is only executed once, however on the client there are two GameObjects in the hierarchy.

    Any hints?
     
    Last edited: Mar 21, 2017 at 1:23 PM
  13. AbyssWanderer

    AbyssWanderer

    Joined:
    Mar 15, 2016
    Posts:
    31
    Hi. Everything works now - client seems to see host through master-server and to connect peer-to-peer.
    Putting 5 stars review to your asset :)

    The problem was in my anti-virus - for some reason it blocked traffic. Have you any advice on how to place our application to its trust-list?
    My anti-virus is Avast, but I guess others can have similar problem.
    Or is it Steam who places application to anti-virus's trust list (considering we publish the game on Steam)?
     
  14. farrisarts

    farrisarts

    Joined:
    Jul 13, 2012
    Posts:
    868
    Hi there, host migration is very insecure, have you joined our Discord? We can probably hash out the details for this there :)
     
  15. farrisarts

    farrisarts

    Joined:
    Jul 13, 2012
    Posts:
    868
    We are removing it from the Fields because it is very expensive to check and also Fields are not reliable. If you are keeping unreliable data in a byte[] then you might have a flaw in the design.

    This is resolved in the latest version on git. We give out GitHub access through Discord. If you are still having trouble connecting with Discord, please let us know via email support@beardedmangames.com. Please use the email that you registered with the site so that we can validate the account and we'll get you setup asap :).
     
  16. farrisarts

    farrisarts

    Joined:
    Jul 13, 2012
    Posts:
    868
    This is a general software problem. If you have a certificate for your application, this will often allow it though a firewall since it is a trusted source. You may need to look up how to certify your application so that it doesn't trigger your anti-virus.
     
  17. mecharius

    mecharius

    Joined:
    Jan 11, 2014
    Posts:
    14
    I still cannot get access to the discord server. I will send an email.