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. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    I believe this is a common error (with an answer) on the Discord server. Might want to go there & do a quick search for the solution. I know I have seen that a few times. Forgot how I fixed it tho. I might have just deleted the LobbySystem prefab bc I dont use it. Idr.
     
  2. Rockwall33

    Rockwall33

    Joined:
    Mar 4, 2016
    Posts:
    186
    @BuckyLuis if your not on the discord, I absolutely recommend going there. The answer is a as @CarterG81 a common error.

    Hope it helps :)

    Cheers!
    NukeRaspberry
     
  3. NFMynster

    NFMynster

    Joined:
    Jul 1, 2013
    Posts:
    69
    You can easily do that with the NCW fields, join the discord and we'll have a chat about it.
    Basically the child object would need to get the refrence to the network object script, as all networking communication goes through that. Then you can just set the TheNetworkScript.networkObject.VariableName in the child script.
     
  4. AlexGK

    AlexGK

    Joined:
    Jul 31, 2013
    Posts:
    38
    Hello there! This looks like a very interesting project for multiplayer games/apps.
    I'm about to start implementing MP into my beat 'em up game.

    What would you recommend more: using GitHub or Asset Store?
    I guess a more focused question would be if the Asset Store code gets updated frequently.

    Cheers!
     
  5. ModularTech3D

    ModularTech3D

    Joined:
    May 11, 2015
    Posts:
    113
    GitHub is more up to date but you can also get a more up to date package on there than the asset store has.
     
    trudeaudm likes this.
  6. trudeaudm

    trudeaudm

    Joined:
    Apr 17, 2013
    Posts:
    116
    Don't import the package from the unity asset store, that version is garbage. Use the one off the github page. I had the same issue and using the github version fixed it all for me.
     
    CarterG81 likes this.
  7. deadlycrow

    deadlycrow

    Joined:
    Feb 10, 2014
    Posts:
    166
    Hello, i have a few questions before starting using this package. I have almost my character completely done in a non-multiplayer way. So now i decided to convert my project into a multiplayer one but i can't find any tutorial or way to actually and easily (if possible) convert my scripts to work in a network environment, all what i found is what the docs says, about messing with the "network contract wizzard", but that thing creates new classes to start working with... And i don't want that, i just want to simply implement the correct networking logic in my old scripts, is that possible with the new forge remastered?? thanks...
     
  8. ModularTech3D

    ModularTech3D

    Joined:
    May 11, 2015
    Posts:
    113
    The network contract wizard creates some classes for you yes, but you then create your own script which extends the generated bahaviour script. So say you create a network contract called player... it generates a network object and network behaviour script. You then create your own player script and then inherit from the generated behaviour. it handles sending a lot of network stuff for you and things that don't need to be kept in synch constantly you can just update with RPCs as and when needed.
     
  9. VXPuddiM

    VXPuddiM

    Joined:
    Jan 23, 2017
    Posts:
    10
    Hey, I'm having some problems with Forge.
    I Downloaded the Github version and imported it, but when i try to play the Cube example scene it gives an error:
    It also happens with the Proximity example
    The "Null" log was added by me, since I think the problem probably has something to do with the NetworkManger.Instance

    What should i do? (I'm using Unity 2017.2.0f3, 64bit)
     
  10. holyfot

    holyfot

    Joined:
    Dec 16, 2016
    Posts:
    42
    Open the example scene, add it the the build scenes list. Open Scenes\MultiplayerMenu and add it to the build scenes. Then run that MulitplayerMenu Scene.

    I'm just now working on upgrading to the new forge for my project. So far it's a lot to change and seems very inflexible versus the old forge. I would have to create NCW's for hundreds of objects (most of them being simple building blocks that would use the same class). But it seems that each prefab has a NCW class for that object. The RPCs look a lot harder to code. So far a massive headache.
     
    Last edited: Nov 19, 2017
  11. lorddanger

    lorddanger

    Joined:
    Aug 8, 2015
    Posts:
    103
    Hello,
    Can anyone update that if Forge has load balancer or not?
     
  12. SPP

    SPP

    Joined:
    Oct 24, 2014
    Posts:
    1
  13. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    This looks very interesting, and the possibilities seem exciting. I was just about to abandon my efforts to network, having tried PUN and Unet with little success. I am certain that my inexperience was a major factor. Would this be a good solution for the following?

    I am making use of UFPS for the core game play.
    I am using ICE Creature Control for AI.
    I will be creating a game for 4 to 8 players.
    The game will play from a lobby to a main level, and each player will be able to move to progressive levels through colliders without forcing other players to come along with them.
    As others hit the same colliders, I would want them to be visible, interactive with the other players in that level.

    Hope that makes sense. Any advice and examples would be appreciated.
    Mark
     
    robymv likes this.
  14. RealAspireGames

    RealAspireGames

    Joined:
    Dec 24, 2013
    Posts:
    265
    Hello, I'm thinking about using Forge for my next peoject. Can anybody tell me if the support is still alive? It seems like one of the best networking solutions.
    -thank you
     
  15. PiterQ70

    PiterQ70

    Joined:
    Mar 3, 2015
    Posts:
    82
    Where can I find Master server files ?
    Regards Peter.
     
  16. niklasdahlback

    niklasdahlback

    Joined:
    Sep 13, 2014
    Posts:
    1
    Hi!
    Thanks for a great asset.

    I have a problem with deploying to my Apple TV 4K device. Have anyone tried to build for tvOS device in xcode?

    I get the following error when building the xcode project generated by Unity 2017.3.

    ----
    Apple Mach-O Linker Error

    Undefined symbols for architecture arm64:
    "_ForgeClose", referenced from:
    _TCPClientWebsockets_ForgeClose_m1745672553 in Bulk_BeardedManStudios_1.o
    (maybe you meant: _TCPClientWebsockets_ForgeClose_m1745672553)
    ----

    Architecture in Build Settings in xcode project is arm64.

    The following works fine:
    - Build the project for iOS (Simulator in xcode)
    - Build for tvOS Simulator in xcode
    - An empty project (without FNR) can be built and deployed to the Apple TV 4K device
     
  17. rogueknight

    rogueknight

    Joined:
    Feb 16, 2014
    Posts:
    44
    Support is still very much alive. I have been a member of the discord channel for a couple months now and its super active. If you have a question it gets answered pretty quick or they at least point you in the right direction on where to find the answer (docs, wiki, etc).

    Same as yourself I have been looking for a good networking solution for quite some time. So far I have found Forge to be easy to use even though I have very little experience. The beginning docs are really helpful in getting started http://docs.forgepowered.com/. Hope this helps.
     
  18. rogueknight

    rogueknight

    Joined:
    Feb 16, 2014
    Posts:
    44
    The Github page has all the source code.

    I would ask this question on the discord server. It is way more active than the forums and the community is really helpful in answering questions.
     
  19. Krunal_vasundhara

    Krunal_vasundhara

    Joined:
    Apr 27, 2017
    Posts:
    35
    Is it supports the host migration functionality.
     
  20. Ceciphar

    Ceciphar

    Joined:
    Jan 21, 2017
    Posts:
    51
    Whooo! Free!
     
  21. Eck0

    Eck0

    Joined:
    Jun 6, 2017
    Posts:
    48
    Hi, I'm interested in this package, but I need to know some questions.
    Does it work with the network of the new system? or is it based on the old RPC network?
    Can you create multiple moba style rooms?
     
  22. ZhavShaw

    ZhavShaw

    Joined:
    Aug 12, 2013
    Posts:
    168
    Not to be a bum but it's free, I'd say check it out for yourself.
     
  23. Imperatoss

    Imperatoss

    Joined:
    Mar 24, 2018
    Posts:
    51
    Hey I´m pretty new to Unity and Forge Remastered.
    I have problems with Instantiations if the Scene does not change, i try to achieve that other networkObjects appear in the same scene if the client successfully connects. Maybe someone of you can help me out a bit =)
     
  24. chencoh

    chencoh

    Joined:
    Jan 11, 2017
    Posts:
    3
    I have the exact same problem.
    Were you able to fix it?
     
  25. Imperatoss

    Imperatoss

    Joined:
    Mar 24, 2018
    Posts:
    51
    After three days of desperate attempts I actually found the desired result: D. The Problem was the SceneReady () function in NetworkManager.cs on line 536. Apparently, this feature is important to building the network objects.

    I've added a short public function in the NetworkManager that calls SceneReady.


    public void sameScene ()
    {
    Scene scene = SceneManager.GetActiveScene ();
    SceneReady (scene, LoadSceneMode.Single);
    }


    This is called after connecting a user.

    For that I have extended the Connected () function from the MultiplayerMenu Script something.

    if (networker is IServer)
    {
    if (! DontChangeSceneOnConnect)
    SceneManager.LoadScene (SceneManager.GetActiveScene (). BuildIndex + 1);
    else
    NetworkObject.Flush (networker); // Called because we're already in the correct scene
    }

    else
    {
    if (mgr.isActiveAndEnabled)
    {
    mgr.sameScene ();

    mgr.InstantiatePlayer (position: new Vector3 (0, 2, 0));
    }
    }



    Then you just have to note that the mgr.InstantiatePlayer (position: new Vector3 (0, 2, 0)) gives the current position of the player and destroys his current object, as a new player object is initialized.

    Next, I will try if all works without mgr.InstantiatePlayer ().

    If you still have questions, ask =)
    I hope I could help you
     
    bhermer likes this.
  26. jogidipen

    jogidipen

    Joined:
    May 25, 2013
    Posts:
    4
    Hello ,

    I am creating 2 player game. I want to use Hole punch so that any player can play the game from any device.

    Suppose I am both user have information about local IP and global IP of each other. Is it possible to connect both without Master server pr Hole Punch server.

    If it is possible with this framework. Please let me know How to do that.

    thanks in advance.
     
  27. Deathstriker28

    Deathstriker28

    Joined:
    May 21, 2015
    Posts:
    2
    Just simply the best solution there is.Especially for a beginner.
     
  28. aerodynic

    aerodynic

    Joined:
    Jun 8, 2015
    Posts:
    2
    Hi guys, I'm having issues using the NAT hole punch server.

    I used the provided Forge source on Github to build the NAT server as headless Linux app in Unity and had to move the startup functionality from Main routine to Start().

    Logging on my AWS EC2 Ubuntu instance shows the NAT server is accepting connections as expected. Double-checked all ports are open on AWS security group and local firewalls.

    The issue is: Hosting IP is correctly registered on the NAT and the client join request is registered as well. But the client never joins/connects. The serverAccepted event is not called and client.isConnected is false. I also checked this in a bare Forge example scene.

    Please check this Wireshark log from the local client PC that tries to join the Forge hosted lobby. The local client (IP 192...) seems to try to directly communicate with the hosting PC (IP 87...) instead of using the NAT server (54...).

    NAT.jpg
     
  29. rogueknight

    rogueknight

    Joined:
    Feb 16, 2014
    Posts:
    44
    Not sure if you ever found an answer, but I would recommend dropping by Forge's Discord channel. I haven't used any of the NAT services yet myself so I can't be much help, but the community in the Discord might be able to help. Wish you the best on your project!
     
  30. cometeor

    cometeor

    Joined:
    May 20, 2011
    Posts:
    64
    Is AOI available in FNR?
    And is it possible to config sync field compression rate? i.e. position and rotation compression support?
     
  31. Rockwall33

    Rockwall33

    Joined:
    Mar 4, 2016
    Posts:
    186
    Hey!

    I am asking the question here because I can’t seem to get on discord.

    How do I make a network object that is both a server and a client?

    Thank you!
    Xalo
     
  32. chgeorgiadis

    chgeorgiadis

    Joined:
    Jan 30, 2018
    Posts:
    51
    Does support voice?
     
  33. Nyarlathothep

    Nyarlathothep

    Joined:
    Jun 13, 2013
    Posts:
    398
    Forge itself doesn't support voice, but Dissonance Voice Chat supports using Forge as a network backend :)
     
    CarterG81 likes this.
  34. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Thought I'd ask about forge myself, this time for a licensing reason; so with it open-source, is it still a paid asset, or is it free?

    Don't mind either way, just curious. :)
     
  35. Rockwall33

    Rockwall33

    Joined:
    Mar 4, 2016
    Posts:
    186
    Forge is free, and open source!! :)
     
    CarterG81 likes this.
  36. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Oh yay! That might actually solve all the issues I've been having getting any networking to work as intended. Hopefully I can also figure out something for consoles later on.
     
    CarterG81 likes this.
  37. sxwwc111

    sxwwc111

    Joined:
    Mar 1, 2018
    Posts:
    2
    I would like to ask you how to set the synchronization of model animation to achieve,it would be nice if we had a related demo.
     
  38. sxwwc111

    sxwwc111

    Joined:
    Mar 1, 2018
    Posts:
    2
    Why doesn't anyone reply? I downloaded a new version of Forge Networking Remastered from the AssetStore.I used this plugin for the first time, so a lot of things don't make sense, I need help,Control character movement involves animation, but do not know how to achieve animation synchronization, the client often over time will crash, do not know what cause.
     
  39. Rockwall33

    Rockwall33

    Joined:
    Mar 4, 2016
    Posts:
    186
    Try going on there discord, for what I understand that’s the best place for support :)

    Sorry for the incovience,

    Xalo
     
  40. Justice0Juic3

    Justice0Juic3

    Joined:
    Apr 29, 2013
    Posts:
    188
    I'm just installing the latest Unity3D version, let's see what I can craft using Forge ;)
    Edit: Probably the first thing I'm gonna do is setting up a moving cube and a server-browser.
     
    CarterG81 likes this.
  41. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    Let us know how it goes!
     
  42. Justice0Juic3

    Justice0Juic3

    Joined:
    Apr 29, 2013
    Posts:
    188
    @CarterG81 tagging you because you asked for it :p
    Things are going well and got a jumpstart with those video tutorials. Every element is explained very well.
    I do have one question for the future :-o. @farrisarts I think I missed the point somewhere but talking about this server browser: What's the equivalent to worldwide server hosting? (talking about Photon Cloud's concept for instance)
    Or does it really come down to $100 hosting for one piece of machinery? xD

    Thanks in advance.
    currently Forging right now

    Edit: Sorry if I'm unclear but Photon has this concept where there's basically a bunch of machines somewhere in Europe and I let players join those computers when they actually join a server in my game. Does Forge has this some kind of unique ID for every game? If yes what does it look like and if no slap me in the face.exe
     
  43. alex_m2000_cl

    alex_m2000_cl

    Joined:
    Dec 4, 2016
    Posts:
    10
    Forge Networking MultiplayerMenu sample dont work on Unity 2018.2.8f1

    Hi. i am testing Forge networking on win 10 with unity 2018.2.8f1 and when i open the multiplayermenu sample i get many compiler errors. when i watch the unity's console and i double click the first error to open visual studio, it open the NetworkObjectFactory class source code and i can see that unity can't find the BeardedManStudios name space. i tell that because the using located on the first line of that class.
    So do you know how to resolve this problem ?. for me it seems like unity can´t find a cs file.
    Thanks in advace.
     
  44. summerian

    summerian

    Joined:
    Jul 6, 2014
    Posts:
    140
  45. B2F

    B2F

    Joined:
    Jul 10, 2013
    Posts:
    23
    So in my game when a player joins the game I instantiate the player via NetworkManager.Instance.InstantiatePlayer(0, spawnPos). The players are set to interpolate their positions.

    The server spawns correctly, but all the clients spawn at (0,0,0) for one frame and the interpolate to the desired spawn position over time. I need to get rid of that one frame of (0,0,0) so the spawn doesn't look weird.

    This also happens when spawning in bullets which make them look weird over the network. Anybody have any ideas what I could be doing wrong?
     
  46. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    Could you provide between spatial os and forge networking and the upcoming unity networking solutions?
     
    Last edited: Feb 28, 2019
  47. summerian

    summerian

    Joined:
    Jul 6, 2014
    Posts:
    140
    var instantiatedPlayer = NetworkManager.Instance.InstantiateNetworkPlayer(position: new Vector3(homePos.x, homePos.y, 0));

    Does that work for you?
     
  48. LuizBeenoculus

    LuizBeenoculus

    Joined:
    May 17, 2018
    Posts:
    11
    Guys, i want to turn off my server, i just call the UDPServer myServer,Disconnect(false) or call
    NetworkManager.Instance.Disconnect() ? Or both?
     
  49. patch24

    patch24

    Joined:
    Mar 29, 2009
    Posts:
    120
    I'm trying out your first cube move tutorial and when running as a client I'm getting a missing reference error for the if (!networkObject.IsServer) in the update loop. My move cube script is deriving from the generated class. It runs fine as the host. Any idea what am I missing?
    Thanks!
     
  50. patch24

    patch24

    Joined:
    Mar 29, 2009
    Posts:
    120
    Nevermind that. I cleaned out the build folder and rebuilt. Then it worked. Thanks, carry on!
     
    CarterG81 likes this.