Search Unity

[NO CCU LIMIT] Forge Networking now OPEN SOURCE

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

  1. bigSadFace

    bigSadFace

    Joined:
    Aug 18, 2014
    Posts:
    116

    Got this all working using the Bolt networking library now with the help and support of those in their Jabbr chat. Shame I couldn't do the same with Forge at this stage. All the best.
     
    Last edited: Jan 4, 2016
    auroxi likes this.
  2. auroxi

    auroxi

    Joined:
    Dec 31, 2012
    Posts:
    85
    I really can't get this to work. Can anyone help please? All I want to do is call the RPC in the FarmableItem class when something calls FarmableItem.TakeDamage(10f);

    Code (CSharp):
    1. public class FarmableItem : SimpleNetworkedMonoBehavior {
    2.  
    3.     [BRPC]
    4.     private void DestroyResource() {
    5.             Destroy (this.gameObject);
    6.     }
    7.  
    8. public void TakeDamage (float dmgToHit) {
    9.  
    10. //ive been hit so destroy it!
    11.  
    12. FarmableItem instance = this;
    13.              instance.RPC("DestroyResource",NetworkReceivers.Server);
    14. }
    15.  
    16. }
    It looks like maybe someone has a similar problem here (after a quick google search): http://pastebin.com/Zf0Abf0C

    How can we do this? I was hoping an instance would fix it but it doesn't.
     
    Last edited: Jan 5, 2016
  3. Kane C Hart

    Kane C Hart

    Joined:
    Jun 29, 2013
    Posts:
    26
    What has the max amount players been successful with this networking lib? Think it could do a 150 or 300 people at a time? Not all 1 foot from each other but spread around an entire map?

    It looks really cool just trying figure out the power of it.
     
  4. auroxi

    auroxi

    Joined:
    Dec 31, 2012
    Posts:
    85
    I came from Bolt to this because Bolt was being funny with certain things but the Jabbr chat really helped my game move forward when I was stuck. I started to learn this, posted over a week ago with an issue, sent 2 emails, still no answer.

    I know they said they were away for christmas but Cranick has been logged on today and quite clearly isn't helping me or answering anyone else for that matter. I purchased before Christmas and I've still not been invited to this Slack chat either.

    Good luck with Bolt, I may have to move back to it because I can't move forward with Forge until some form of support happens so may never get to use it. We pay money for this asset and so far I've tried 4 times to get help and still nothing.
     
    AwesomeX and bigSadFace like this.
  5. QQuixotic

    QQuixotic

    Joined:
    Sep 16, 2013
    Posts:
    3
    Have you tried Network.Destroy instead?


    I'm nearly done transferring the core logic to Forge, but I have one thing left: What is the proper way to request information from the server? The original system had a single static class that all needed information was pulled from- yet with Forge it seems the nearest approximation is the Cache system? But if I have a player join the game, and they need to get a series of information from the server, do I just pack it all up and send it in a transport class?

    My current concern is building a 'pseduo-room' system, in which players can dictate a room to load and it will be loaded into the scene in an available location, all things outside of the room are put in a 'do not render' state (layer-swapped), and the player is teleported to the correct location. This way, the server is never concerned with more areas than there are the number of players. However, getting a full list of what rooms have been spawned and where I'm wondering on how to go about the best system for- I could encode all the information into a string for the cache system, but I'd prefer for there to be something akin to the static-class I've been using to keep all this information handy. I just want to hold all my information in a single class that everyone can individually poll.

    Overall, though, progress on things outside of these issues is going great. I'm really enjoying Forge.
     
  6. Syldarion

    Syldarion

    Joined:
    Feb 3, 2015
    Posts:
    4
    Since this seems to be the thread to come to for answers, I have a quick question. I am getting an error with a function in your files called PrepareFinal. It is giving a NullReferenceException on the line

    Code (csharp):
    1. senderId = socket.Me != null ? socket.Me.NetworkId : 0;
    inside NetworkingStream.cs

    This happens any time I try to sync the state of my UI across the network. I am making a multiplayer lobby and trying to sync the player panels for each person. Here is the script I have attached to the panels.

    Code (csharp):
    1. using UnityEngine;
    2. using UnityEngine.UI;
    3. using BeardedManStudios.Network;
    4.  
    5. public class CustomLobbyPlayer : NetworkedMonoBehavior
    6. {
    7.     //public GameObject LobbyPlayerPanel;
    8.     public InputField PlayerNameText;
    9.     public Image PlayerNationalityFlag;
    10.     public Dropdown PlayerNationalitySelection;
    11.     public Toggle PlayerReadyStateButton;
    12.  
    13.     public Sprite[] Flags;
    14.     public InputField ChatMessageInput;
    15.    
    16.     public string PlayerName = "";
    17.     public int NationalityIndex = 0;
    18.     public bool IsReady = false;
    19.  
    20.     ColorBlock NotReadyColorBlock;
    21.     ColorBlock ReadyColorBlock;
    22.  
    23.     void Awake()
    24.     {
    25.         AddNetworkVariable(() => PlayerName, x => UpdateName((string)x));
    26.         AddNetworkVariable(() => NationalityIndex, x => UpdateNationality((int)x));
    27.         AddNetworkVariable(() => IsReady, x => UpdateReadyState((bool)x));
    28.     }
    29.  
    30.     public void UpdateName(string name)
    31.     {
    32.         RPC("OnNameChange", NetworkReceivers.AllBuffered, name);
    33.     }
    34.  
    35.     public void UpdateNationality(int nation_index)
    36.     {
    37.         RPC("OnNationalityChange", NetworkReceivers.AllBuffered, nation_index);
    38.     }
    39.  
    40.     public void UpdateReadyState(bool is_ready)
    41.     {
    42.         RPC("OnReadyStateChange", NetworkReceivers.AllBuffered, is_ready);
    43.     }
    44.  
    45.     [BRPC]
    46.     void OnNameChange(string name)
    47.     {
    48.         Debug.Log(name);
    49.         PlayerName = name;
    50.         PlayerNameText.text = PlayerName;
    51.     }
    52.  
    53.     [BRPC]
    54.     void OnNationalityChange(int nation_index)
    55.     {
    56.         Debug.Log(nation_index);
    57.         NationalityIndex = nation_index;
    58.         PlayerNationalitySelection.value = NationalityIndex;
    59.         Debug.Log(PlayerNationalitySelection.value);
    60.         PlayerNationalityFlag.sprite = Flags[nation_index];
    61.     }
    62.  
    63.     [BRPC]
    64.     void OnReadyStateChange(bool is_ready)
    65.     {
    66.         Debug.Log(is_ready);
    67.         IsReady = is_ready;
    68.  
    69.         if(is_ready)
    70.         {
    71.             PlayerReadyStateButton.GetComponentInChildren<Text>().text = "READY";
    72.             PlayerReadyStateButton.GetComponent<Image>().color = Color.green;
    73.         }
    74.         else
    75.         {
    76.             PlayerReadyStateButton.GetComponentInChildren<Text>().text = "NOT READY";
    77.             PlayerReadyStateButton.GetComponent<Image>().color = Color.red;
    78.         }
    79.     }
    80. }
    When the UI elements are changed on the panel, they also call the individual Update functions. The panels are also instantiated using the proper Networking instantiate method. They come into existence, but whenever I try to change them, it errors. I am pretty new with Forge, so I am sure I'm just doing something wrong, so a kick in the right direction would be greatly appreciated. Thanks!
     
  7. danielvmacedo

    danielvmacedo

    Joined:
    Nov 2, 2009
    Posts:
    26
    Hi, does this api work for a local network game only? Like using only the wifi network on android/ios without internet?
     
  8. Burtch

    Burtch

    Joined:
    Jan 17, 2014
    Posts:
    7
    Hello everyone. I believe there is an issue with Proximity based updates.
    If you have a server, PlayerA, and PlayerB...
    When Server is inbetween PlayerA and PlayerB....
    You move PlayerA away from Server.... (Causing server to become invisible)
    It erroneously also disables the renderer of the Server for PlayerB (who is stationary and still right next to the server).
    Why?

    Also in my own implementation of a line of sight proximity system where you can't see players that are not in your line of sight and you also don't get updates for them in a authoritative server, Auth RPC's have similar behavior. When I try to send an auth RPC to the client that can no longer see a player, it is sending to ALL players to disable the renderer of that player.

    AuthoritativeRPC("ExitedProximity", OwningNetWorker, other.OwningPlayer, false)

    OwningNetworker.IsServer is true here because it's authoritative server. Shouldn't this be sending to only the other.OwningPlayer? Not ALL players? It's even making himself invisible and for his teammates. Makes me so confused.
     
  9. devinrayolsen

    devinrayolsen

    Joined:
    Mar 8, 2010
    Posts:
    98
    Quick question.
    I'm using the trial version of Forge and it seems like all the online tutorials say to change your Updates and Starts / Awakes to protected override:


    Code (CSharp):
    1. using BeardedManStudios.Network;
    2. public class SomeScript : NetworkedMonoBehavior {
    3.     protected override void Update () {
    4.     ...
    5.     }
    6. }
    But I keep getting the following error:
    So is this not working cause the API has changed and video tutorials are outdated, or is this related to my using the trial version?

    Thanks in advanced!
     
    Last edited: Jan 14, 2016
  10. Dark5upremo

    Dark5upremo

    Joined:
    Apr 2, 2015
    Posts:
    6

    I think that you need to extend NetworkedMonoBehavior instead of MonoBehaviour to do that...

    Like this:

    From:
    Code (CSharp):
    1. public class vp_WeaponHandler : MonoBehaviour
    To:
    Code (CSharp):
    1. public class vp_WeaponHandler : NetworkedMonoBehavior


    Is there any example of FPSController that use Authority and is Smooth, even running on same machine i see other players moving a bit laggy... i had to reduce the Networking Throttle to 0.1 to make it look better, but i don't know if thats an good idea, but if i enable the Authority i see the player not moving at all, i believe that its because i need to send all move actions to server, but i'm not sure how to make that smooth...

    Also, the game that i want to do is an survival with buildings, so, i need an way to only show the buildings to players near it, but theres an way to only send buffered network if the player is near where it happened or should i just disable the buildings that is far after loading it?

    I'm using the free version to choose between Forge or Bolt, the only problem that i see is that its really more hard to find working examples with Forge than with Bolt, i'll probably need UFPS to my project, and theres no implementation of that to forge, i'm not sure if it will be hard to convert to work with forge...
     
    Last edited: Jan 14, 2016
  11. devinrayolsen

    devinrayolsen

    Joined:
    Mar 8, 2010
    Posts:
    98
    I actually have extended the MonoBehaviour and included the lib already.
    Sorry should of pointed that out.
     
    Cranick likes this.
  12. cmonroy

    cmonroy

    Joined:
    Sep 10, 2013
    Posts:
    8
    Can Forge work with multiple scenes?

    My project uses additive scene loading and unloading when the player approaches the edge of the current one in order to expand the playable area.

    Thank you.
     
  13. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    Glad you resolved it!
     
  14. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    We did actually submit a sale for Christmas to Unity but it seems they didn't add it to their list of sales. Hopefully people will have more opportunities in the future.
     
  15. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    Hello there,
    We haven't had this question asked before. It would indeed be interesting to update based on the ip address location. I don't think it is impossible but would require you to check the ip addresses of the users who join the host.

    We do have proximity based updates if that is what you also were referring to.

    2) Anything that you want created locally you would simply spawn it like any other game object without calling a network instantiate. If you need something that other clients should see/update/do as well, then you would do a Network Instantiate.
     
  16. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    Haven't heard of a racing game support 200k players but I guess depending on the server hardware and capabilities it can be possible. I would highly recommend having it so there is a dedicated host these clients would connect to for their match information to be handled instead of all on one machine but that is to your choosing.
    We offer all the above, and would highly recommend having a dedicated host machine handle the game logic to prevent players from cheating. Sessions would also need to be handled by you the developer on how their information is made and stored.
    I would say that @farrisarts would have a better answer to the server hardware required, would be a lot less if you handle each game session individually.
     
  17. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    Did you mark your Networking Manager (Don't Destroy) on it's public parameters on it? This would prevent it from being destroyed. Although if the Networking Manager is already in the scene instead of spawning it, it will destroy the one that already exists. I recommend spawning the networking manager outside of it so it only happens once.
     
  18. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    That seems very interesting. You set the 'Purce RPC' scene as the name inside the ForgeQuickStartMenu, and ran the same tests?

    I did the same with the latest and it works just fine on my end. Pressing Space makes the cube move up and A and B would send byte arrays over correctly.
     
  19. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    I'll see if I can make some quick examples throughout the week as I am hoping to get a general 'How To' list of things people want examples of. If you want you can send me a list of examples you would love to see so I can make some documentation for it.

    Send it over to support@beardedmangames.com, thanks!
     
  20. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    Yes, we have the basic concepts of authoritative movement on our end but if you want to add another level of it to your games you would then just handle the data as we do in our NetworkedMonoBehavior class.
     
  21. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    1) Is the Master Server the host of those rooms or is it just a matchmaking service that lets the users host their own rooms? If the former then I recommend just having a ip address that all clients connect to and having the main server handle the logic per clients and how their data is being interpreted.

    2) Can you expand on this in details so that I can better answer this question? Thanks.

    3) All in all, it is possible.
     
  22. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    I don't exactly know what this questions relates to, can you expand on what you mean by this? If you are just talking about forge itself, you only need to keep the Forge Networking 'MainScripts' folder and that should be it for what you need. If you are using the ForgeQuickStartMenu, then you might need the 'Scripts' folder in Forge Networking as well.
     
  23. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    Sorry to hear, glad you found something that works best for you.
     
  24. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    How is your networking setup? Are you using the ForgeQuickStartMenu scene and then going into your own scene? It seems that you are having an issue with PrepareFinal which shouldn't happen if you are in a networked connection.

    I used the class you provided and put it in a script that is called by pressing spacebar and it worked fine.
     
  25. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    Depends on the server hardware, some developers have some games that are working perfectly fine with over 300+ networked objects. I.e. CHKN
     
  26. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    Sorry to hear about that, we did indeed just get caught back up with email responses, we tend to get around 20-25 emails a day with some example projects that people send us to go over. We try our best to respond to each email and be thorough as we can.
    Hopefully when you are ready to come back we can help you with what you need at the moment. Also feel free to reach out to others on Slack as they are extremely active and can provide support for minor things that you experienced.
     
  27. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    Glad to know you are enjoying it! We try our best to make a robust networking solution.

    I think building your 'pseduo-room' system can just rely on the host having proper authority on the decisions of what rooms to load through. You can make a 'RoomManager' that simply acts as a object that all players can grab variables from, in this way only the server can update those values and the room manager would be able to act upon their changes if need be.

    Let me know if you have any other questions and feel free to reach out to us in Slack.
     
  28. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    I would recommend using [NetSync] instead of the AddNetworkVariable as it is an old way of syncing variables across the network. Also, are you using the ForgeQuickStartMenu to load into your scene so that it has properly set up it's socket for the users to continue?

    Hope this helps and feel free to reach out to us on Slack.
     
  29. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    Yes, I tested on iOS and Android with the host being my PC.
     
  30. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    Can you send a project example to Support@beardedmangames.com so I can take a further look at this? We have not had these issues with proximity based updates on our end and figure it would be best if you can just send us a simple package to look over.

    Thanks!
     
  31. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    You no longer need to override our Update() methods, that documentation shouldn't say that and if you can please point me to the link of that location we would like to correct it.

    You can simply use your Updates() as normal and not have to worry about the underlying networking layer as we use Reflection to properly set our networking solution in action.

    All the best!
     
  32. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    You would need the server(s) to handle all the information per each scene as the server doesn't have any concept of what happens in each scene. In theory it would be possible but it depends on a game by game basis.
     
  33. frankalonso

    frankalonso

    Joined:
    Aug 3, 2015
    Posts:
    13
    Hi, I have Forge and have been really enjoying using it.

    I am trying to figure this out - how can I use Forge to transfer a large initial data file from one player to everyone else (or preferably from player to server to others)? Is there a way to setup a callback to happen when the data transfer is complete?

    I'm having trouble with this one. It seems like trying to use NetSync or a buffered RPC clogs up the Network or something. I became unable to join with an additional (third) client after trying those methods. I tried using the Networking.WriteCustom, but I didn't have too much luck either.

    Would I want to put the data in a transport object? If so, could you suggest how to trigger the Sending of the Transport object to new players that join later on, without sending to everyone else again?

    If it helps, this specific instance problem is transferring UMA (Unity Multipurpose Avatar) character data across the network at the beginning of the game so the character can be generated.

    The file would be something like the below:

    {"characterName":"test4","characterVoice":"TEST","characterData":"OILDvAIbAFHzAAAAPwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAP+Jf7JsAAAA/BwCsPPPyAV1z/VACwcng+gNCA3egBJZpa80FhD2XhwYO1Xh9Ap+lPLQD/////wAAAAD/////AAAAAP////8AAAAAji7yYANrqUf/AAAAAP////8AAAAA/////wAAAAAD87dn+wNmTU3/AAAAAP////8AAAAA/////wAAAAD9QfuvA4CAAP8AAAAA/////wAAAAD/////AAAAALVDhkUDgIAA/wAAAAD/////AAAAAP////8AAAAAAVj9RW8D/////wAAAAD/////AAAAAP////8AAAAAAu1eshsDZk1N/wAAAAD/////AAAAAP////8AAAAAcTl67QOAAID/AAAAAP////8AAAAA/////wAAAAABpeen1gP/////AAAAAP////8AAAAA/////wAAAAABsz+OaQP/////AAAAAP////8AAAAA/////wAAAAABZboZZAP/////AAAAAP////8AAAAA/////wAAAAA="}

    Any feedback or advice would be greatly appreciated.
     
  34. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Think it is in your video's
     
  35. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
  36. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845

    This is why I stayed with Bolt I did not trust a new company, to many bail after a year or less. I passed on Forge for this very reason.. I understand devs get busy as we all do, but they don't understand, that we have deadlines and some of us are NOT doing this for a hobby..

    Bolt is still going strong, and soon Steam, and Xbox 1 integration
     
    auroxi likes this.
  37. ZoneOfTanks

    ZoneOfTanks

    Joined:
    Aug 10, 2014
    Posts:
    128
    Hi all! We are now starting to work on a new project and need a good network solution. So question - is Forge better than uNet and why? uNet built into Unity core, Forge is like reinventing the wheel... does Forge use uNet or it is like standalone solution? Why is it better than uNet? Unity has a lot more power to support and develop uNet. So why use Forge?
     
    Last edited: Jan 19, 2016
  38. Carrotpie

    Carrotpie

    Joined:
    Sep 25, 2014
    Posts:
    30
    Looking for the best networking solution currently available for Unity. Unity recently released its nea uNet, which contains HLAPI and some advanced stuff. Anyone who uses forge, what are advantages and disadvantages of each? Which do you preffer for what? Does forge have someting like a lobby, matchmaking, etc? Can it manage accounts and such? Imo I'd need some kind of a separate server setup for account detail management, won't I?
    Noob here with networks, but don't wanna waste time on learning something that is already outdated.
    Forge has really nice ratings, though new uNet has been released since, so any opinion I welcome.
    Thanks.
     
  39. dreb4o

    dreb4o

    Joined:
    Mar 29, 2015
    Posts:
    51
    I am of the people who used ufps wait to combine the two packages
    wait to see if they can help forge for my project
    you have to start thinking about UFPS2

    Opsive and VisionPunk Join Forces
    UFPS 2 Development Will Begin This Year
     
  40. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    This is all handled from the NetworkedMonoBehavior by default, it is not handled by the custom serialization
     
  41. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    This is up to personal taste. It has been a while since I looked into UNET but last I saw it was buggy and Forge. The main difference is that you get full source code with Forge so if you need to make the networking layer do some crazy stuff or customize packets, then you are completely able to do that. Forge came out before UNET so I wouldn't say that it is re-inventing the wheel, it was just a cross platform solution to solve issues that the legacy unity networking system didn't.
     
  42. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    We have a couple of developers who have worked with UFPS, I have not checked their progress or if they completed the integration. There is interest in it as well as hooks in the newest UFPS version for networking.
     
  43. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    You can completely create your networked game in Forge, just because we have excessive support questions we must catch up on doesn't mean that games can not be created using Forge. We have a Slack community that you would automatically be invited to and plenty of people who have done their own steam integrations. The thing with Forge is that it is on top of .NET sockets which means that any platform that supports sockets automatically works. Also it means if those platforms update (like iOS with required IL2CPP) Forge will just work and not be broken for 7 months such was the way with Bolt.
     
  44. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Awesome :D

    You can transfer large amounts of data through WriteCustom or via a RPC. There are events for when a client connects which will allow for a server to send an RPC to that connecting player or you can send the data as soon as you establish a connection on the client. (http://forgepowered.com/ForgeNetworkingAPI/html/00f02383-2315-f7bd-14d5-455a4399f2e7.htm)

    How are you using the buffered RPC? Are you sure that it is only sending on connect?

    We had another user in the community doing the same thing and I believe that they did it with a WriteCustom on connect.
     
  45. summerian

    summerian

    Joined:
    Jul 6, 2014
    Posts:
    140
    Hi!

    When I do this:
    Networking.ChangeClientScene(GameConnection.socket,"Map01");

    The clients load Map01 but immediately after this error is thrown:
    IndexOutOfRangeException: Array index is out of range.

    in the following file:
    BeardedManStudios.Network.NetworkingStream.Read() at Assets/Standard Assets/Bearded Man Studios Inc/Forge Networking/MainScripts/Core/NetworkingStream.cs:457

    Am I missing something?
    Thanks in advance!
     
  46. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    514
    In version 18 the SetMyMessageGroup when set from the client side does not show up on the server side.

    Networking.SetMyMessageGroup(Networking.PrimarySocket, [ID > 0 <-------]);

    Is this a bug?

    In version 17.11 it was working fine

    I have done more investigation and it seems to work if you set my message group on the server side. However this was not its intended operation I thought and it should work on client side to?

    Confirm please?
     
    Last edited: Jan 26, 2016
  47. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    514
    I think the ChangeClientScene and the problem i'm having with SetMyMessageGroup are the same issue. In Networking class v18 the SetMyMessageGroup() and ChangeClientScene() both call socket.WriteRaw(....)/networker.WriteRaw. However the server NetWorker class does not pick up the type 6 and type 2 messages sent.

    This ultimately has to be the reason why its bugging out. Not sure how to fix it though !!
     
  48. summerian

    summerian

    Joined:
    Jul 6, 2014
    Posts:
    140
    Can confirm the error goes away if using 7.11

    Edit: 17.11
     
    Last edited: Jan 26, 2016
  49. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    514
    Is there anything in forge that tracks when a player has crashed. I have noticed that the server still thinks the player is connected. This has been happening to my friend who tested my game and has an unstable network connection. If I force quit on the client side the player connects ok but if I pull the Ethernet cable the server never times out the player. Any help would be appreciated.
     
  50. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    514
    If running a client and server on the same machine (PC) and trying to connect to a server which has not started up it crashes unity. This same error has been around in 17.11 and still in version 18. I'm assuming its a socket/port issue but unsure why it crashes unity 5.3.x.