Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[NO CCU LIMIT] Forge Networking now OPEN SOURCE

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

  1. MrIconic

    MrIconic

    Joined:
    Apr 5, 2013
    Posts:
    239
    Glad to see a developer is still keeping up with Forge Networking. I haven't personally spent time implementing it at this point but it's very important in future plans.

    Don't feel discouraged, I'm sure there are plenty of others that also appreciate the time and effort that is being put in.
     
  2. DoubleIsLoveDoubleIsLife

    DoubleIsLoveDoubleIsLife

    Joined:
    Nov 29, 2014
    Posts:
    32
    I've got a bit of a problem, for almost a week actually. I have an RPC to spawn a bullet when players fire, for some reason, and not all the time but randomly with no pattern, the rpc will constantly re-fire, locking the game up and breaking the networking, and I get this error in the console.

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. WeaponManager.SpawnBullet (Quaternion thirdPersonROT, Quaternion firstPersonROT, Vector3 pos, Single finalAccuracy, Single speed, Single mass, Single penetrationPower) (at Assets/Scripts/WeaponManager.cs:676)
    3. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    4. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    5. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    6. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    7. BeardedManStudios.Network.SimpleNetworkedMonoBehavior.ExecuteRPCStack () (at Assets/Bearded Man Studios Inc/Forge Networking/MainScripts/Unity/SimpleNetworkedMonoBehavior.cs:783)
    8. BeardedManStudios.Network.SimpleNetworkedMonoBehavior.UnityUpdate () (at Assets/Bearded Man Studios Inc/Forge Networking/MainScripts/Unity/SimpleNetworkedMonoBehavior.cs:881)
    9. BeardedManStudios.Network.Unity.MainThreadManager.Update () (at Assets/Bearded Man Studios Inc/Forge Networking/MainScripts/Unity/MainThreadManager.cs:139)
    I don't really know where to start, it seems to be related to the invoke methods because a similar problem occurred when calling a function from an RPC in the enemy script.

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. HumanCharacter.SpawnBullet (Quaternion rot, Vector3 pos) (at Assets/Scripts/AI/HumanCharacter.cs:409)
    3. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    4. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    5. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    6. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    7. BeardedManStudios.Network.SimpleNetworkedMonoBehavior.ExecuteRPCStack () (at Assets/Bearded Man Studios Inc/Forge Networking/MainScripts/Unity/SimpleNetworkedMonoBehavior.cs:783)
    8. BeardedManStudios.Network.SimpleNetworkedMonoBehavior.UnityUpdate () (at Assets/Bearded Man Studios Inc/Forge Networking/MainScripts/Unity/SimpleNetworkedMonoBehavior.cs:881)
    9. BeardedManStudios.Network.NetworkedMonoBehavior.UnityUpdate () (at Assets/Bearded Man Studios Inc/Forge Networking/MainScripts/Unity/NetworkedMonoBehavior.cs:1632)
    10. BeardedManStudios.Network.Unity.MainThreadManager.Update () (at Assets/Bearded Man Studios Inc/Forge Networking/MainScripts/Unity/MainThreadManager.cs:139)
    The enemy shoot code above simply calls a script to make particles spawn from the firing point, and I can't find any reason whatsoever as to why it doesn't work. When I disable to the code which calls the function the enemy AI works fine.
     
  3. DoubleIsLoveDoubleIsLife

    DoubleIsLoveDoubleIsLife

    Joined:
    Nov 29, 2014
    Posts:
    32
    Okay I literally just fixed this by removing a script I used to load the level.
     
  4. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    Hey what is the IP you are using to connect to your forge server?
     
  5. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    What networking solution were you using before? You'll likely need to rewrite at least some.
     
  6. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    Yes, forge networking even has a plugin for a standalone c# app. You would probably want to get that plugin and use the code in that for sending and receiving packets.
     
  7. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    Great to hear someone notices. We are all very busy, but we make a considerable effort to keep forge progressing. Keep your ears open for exciting news.
     
  8. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    I'd need to see the code specifically invoking this. Feel free to send it to me in a direct message.
     
  9. robymv

    robymv

    Joined:
    Oct 28, 2013
    Posts:
    74
    Sorry boys, somebody found solution for problem "android - Find on Lan"?
     
  10. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    Hey roby, as when I helped with your last query, please direct specific requests for support directly to us or post them on slack. Your issues will get solved a lot faster there. :)

    Find on Lan currently works correctly, I've sent you some questions on slack to help work out what is causing the issue.
     
  11. robymv

    robymv

    Joined:
    Oct 28, 2013
    Posts:
    74
    Ok thank you FisherM.
     
  12. Deusald

    Deusald

    Joined:
    Feb 11, 2014
    Posts:
    31
    Hi guys :) I'm thinking about buying Forge. But my question is: Is it possible to have rooms? And send RPC and sync things among players in particular room?
     
  13. robymv

    robymv

    Joined:
    Oct 28, 2013
    Posts:
    74
  14. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    You can host multiple servers and have people connect to each and manage them like rooms, or you can have them all join one server, manage which players are in which rooms and target the RPCs to the players in the groups you want them to be sent to.
     
  15. DziDAI

    DziDAI

    Joined:
    Dec 6, 2012
    Posts:
    68
    Hi,

    Do you have any demo with WebGL?
     
  16. Vedrit

    Vedrit

    Joined:
    Feb 8, 2013
    Posts:
    514
    I don't know if this has been asked, but is there a trial for Forge? I'm not sure how good of a fit for my project it will be, and don't want to spend $80 on something I won't use
     
  17. Acid-NN-9

    Acid-NN-9

    Joined:
    Apr 29, 2015
    Posts:
    10
    There is a free version with all functionalities with the exception that you can just run the server on the editor. Register here and you have the free version for testing: http://developers.forgepowered.com/
     
  18. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    327
    Would be great ! if Forge support for create room, join room or leave room ... like other network library. And support balancing technology.
     
  19. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    There is not a WebGL demo, Websockets is in a very stable alpha though. So you can use it quite similarly to how you usually use forge, with the exception that you cannot host servers in webgl.
     
  20. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    This is something that is very easy to setup if you want to do it that way. Be aware you cannot in unity have multiple rooms on the server with all of the actual geometry and collisions being simulated for each room.
     
  21. joeSmoeGuy

    joeSmoeGuy

    Joined:
    May 16, 2013
    Posts:
    3
    I'm curious, assuming I have the proper codecs in place, would it be possible to integrate voice chat capabilities in Forge Networking?
     
  22. carmine

    carmine

    Joined:
    Jan 4, 2012
    Posts:
    394
    Thanks for the reply. I did actually try searching the 44 page long forum but was unable to find what I was looking for. I don't think this system will work for me.

    EDIT: I'm not looking for geometry and other things to be simulated. Just simply getting the position/rotation/instantiation data between everyone.
     
  23. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    Yes, absolutely. Some of our first internal versions had a simple voice chat.
     
  24. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    Your best option would be to host multiple servers on different ports and have people connect to them OR to spin up a new instance on a new port when needed and supply the client the ip and port OR have them connect to the same server, record which room they are in and then loop through the list of players RPCing directly to each one.
     
  25. joeSmoeGuy

    joeSmoeGuy

    Joined:
    May 16, 2013
    Posts:
    3
    Thank you for the quick reply. With the purchase of this asset would I be able to access that voice chat code? However rough it may be.
     
  26. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    Unfortunately not, if you purchase the asset, we offer everyone the opportunity to join our internal slack chat. I'd be happy to point you in the right direction and there are several channels that offer community support if you need it.
     
  27. John-Catan

    John-Catan

    Joined:
    Jun 12, 2014
    Posts:
    13
    I've be scratching my head trying to port my unet code to forge networking for the past few hours
    whats the best approach to RPC when input containts List<Vector3>?

    Thanks
     
  28. gumboots

    gumboots

    Joined:
    May 24, 2011
    Posts:
    298
    Hi Fisher!

    I just have a couple of questions that I'm hoping you can answer:
    • Does Forge have master server-like functionality? I presume we can have listen servers, and if so is there something that can plugin to Forge so that I can get a server list of places to join?
    • Does Forge support Xbox One? I am looking at developing both a PC and Xbox One game. The games don't need to play cross-platform, but I'm hoping that Forge will work across build targets?
    • Does Forge have any kind of authoritative patterns/setup examples?
    • Is Forge built around UNET? Or is it your own implementation from scratch?
    Thanks in advance for any help you can offer!
     
  29. Simplexws

    Simplexws

    Joined:
    Apr 29, 2016
    Posts:
    1
    Hello,

    I just would like to ask you.

    Is possible to use this plugin for "local multiplayer". ?
    For example I will have 5 phones connected with wifi direct to one of them. (only locally on android without access to any internet or router).

    Thank you for your answer.
     
  30. jjobby

    jjobby

    Joined:
    Nov 28, 2009
    Posts:
    160
    @FisherM
    Sorry, if it's off topic. But I just heard about Forge Remastered project. So, I came back to check this thread and I'm very surprised to know that you are also working with Unity. Are you working on both Forge and UNet now? o_O
     
  31. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    Nope, I don't do anything with Unity Multiplayer.
     
  32. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    - You can easily have a master server hosted and all the sub servers connect on a different port to your players. - The master server addon gives you that functionality
    - It does support Xbox One
    - There is authoritative movement and rpc support checkout our tutorial site at http://developers.forgearcade.com/ for more on that.
    - It's built from scratch with sockets, you can even run a standalone C# app with forge networking so servers that don't need information from unity don't suffer an overhead.
     
  33. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    This is actually supported by IP protocols. If you connect them by wifi, they will be assigned a local ip.
    You can then easily connect to or use local ip discovery (provided by forge) to connect. There is no real difference to a networking system whether it is local or over the internet.
     
  34. ZhavShaw

    ZhavShaw

    Joined:
    Aug 12, 2013
    Posts:
    168
    Any news / updates on Forge Networking Remastered?
     
  35. robymv

    robymv

    Joined:
    Oct 28, 2013
    Posts:
    74
    Hi Fisher, you have managed to solve the problem of local access with Android? Now you can "find on lan" without manually enter each time the IP address?
     
  36. PartyBoat

    PartyBoat

    Joined:
    Oct 21, 2012
    Posts:
    97
    Yeah I'm also very curious about this. Is there some kind of estimated release date for the remaster? I'd like to buy forge but there hasn't been an update to the version in the asset store for literally months. I assume that's because work is being done on the remaster, but I'm hesitant because I already got burnt once with Bolt being abandoned.
     
    Last edited: Sep 25, 2016
  37. zhuchun

    zhuchun

    Joined:
    Aug 11, 2012
    Posts:
    433
    There're some rumors said FN actually is not a production ready asset. So my game's requirements is pretty clear, PC and Mac, Steam multiplayer(not MMO), is FN capable for these?
     
  38. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Word of warning, the none Remastered version of Forge is not ready for production, we have been burn by this. Most bugs with it show on unstable and high latency connections (It can show on good connections too off course) so it was first when we released to Steam that the problems began. A good emulator for testing network code stability is clumsy

    https://jagt.github.io/clumsy/

    Forge networking "Reliable" RPC start to get really, really, unreliable already at 100ms latency. We have found some memory leaks that we have fixed our self because of the none existing Support. The issue that finally drove us to implement our own networking instead of (as we had been doing) vainly trying to implement reliable udp in our game objects was the fact that every so often, due to no discernible reason, the forge code would throw an exception during its internal code (index out of bounds) which would completely crash the networking on the server and clients both. We found absolutely no way to recover in runtime.

    We have pretty good knowledge of Bearded man code quality by now and we will stay away from the Remastered version too.
     
    Last edited: Sep 27, 2016
  39. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    255
    Hello everyone, i want to make a multiplayer game but i want to avoid the retarded Unet. Is forge worth?
     
  40. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    It would be nice to share some of the memory leak fixes here or with the developers, so we can all benefit from an overall better package. If you have not done so already.

    At least with full source assets, we can collaberate in this way.
     
  41. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    I will see what I can dig out from our git history. But the framework is still broken with these fixes
     
    ZoneOfTanks and CarterG81 like this.
  42. zhuchun

    zhuchun

    Joined:
    Aug 11, 2012
    Posts:
    433
    Thanks for you sharing. :) So that comes a problem, what should we use to build our networking? FN seems the best of its kind, so we should try native uNet instead? Any suggestion is appreciated.
     
  43. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    We target Steam so windows only, no need for cross platform support etc. We choose to write our own framework ontop of Steams UDP SDK
     
  44. Hai-Long

    Hai-Long

    Joined:
    Jan 13, 2015
    Posts:
    2
    I am starting learn Forge Network.
    Please give me direction for my broblem below:
    I have a one server, and 4 client A,B,C,D connected to it.
    A, B in one room, C and D in another room. I need: when A instantiate a object (NetworkedMonoBehavior), only B can see that object appreance, moving, ... C and D doesn't receive any information about that object from server.
    I want host only one server instance. (because base on my knowledge, with one server, all client see all each other objects)
    Thanks for reading, have a good day everyone ^_^
     
  45. John-Catan

    John-Catan

    Joined:
    Jun 12, 2014
    Posts:
    13
    Thanks for sharing, I'm in the midst of evaluating FN for production use. If it is as you say, perhaps I should fall back to unet instead? Would be great to have more details. thanks!
     
  46. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Havent used Unet, and how well you can intergrate for example Steam UDP with it for NAT punchthrough etc using Steam matchmaking. We choose to write our own and use the public interface set by Forge, that way we can keep our game objects the same and only rewrite the internal code in Forge. We can also remove a lot of crap code that we were forced to implement since Forge itself is not reliable. Now we have Steam UDP and their RPC is really reliable, we have mapped Steam UDP channels to Unity monobehaviour instaces, so each networked monobehaviour has packet ordering etc. Works very well an is super stable/reliable.

    edit: Oh, our reflection code is also 10x faster than the code in forge

    edit: Here is a example of what happens when the SHow player RPC never hits on a client :p

    youtu.be/n77-QyInz7M?t=26
     
    Last edited: Sep 30, 2016
  47. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Hello Everyone!

    First of all, thank you so much to everyone that has supported Forge Networking over the past couple of years since it's beta!

    We are going to address the elephant in the room, which is our support. In the early years of Forge Networking we were crazy fanatical about support, something we could afford with our previous jobs. Now with our new schedules and timelines we have found that we need to re-think our support strategies.

    We have spent most of our free time working and testing Forge Networking Remastered so that it can be the best it can be. However this has lead us to have very bad support for Forge Networking as a whole. We do have a ton of documentation, but sometimes people just need direct help to their issues and we get that. So here is what is going to be happening starting today:
    • Dedicated dev to Unity Forums daily
    • Dedicated dev to email daily
    • Dedicated dev to Subreddit daily
    • All devs in Slack chat daily
    • Will begin to work on CI (continuous integration) pipeline for Forge Networking Remastered so we can roll out updates faster
    • All tasks will be on Trello (the link is available in Slack or the developer site when you log in) Please join the board and help us make tasks and reports
    Thank you so much for all of your support through this process and your valuable feedback. We'll see you all in the community!
     
    LostPanda likes this.
  48. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    173
    @farrisarts Hello,I dont find forge_networking_remastered version for Unity AssetStore and you website:(
    i have bought forge networking for assetstore. please help me ,thanks!
     
  49. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    Yes, it is. A variety of projects have been and are actively being made with FN.
     
  50. FisherM

    FisherM

    Joined:
    Dec 28, 2013
    Posts:
    366
    Have you gotten access to our Slack server yet?