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
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

[NO CCU LIMIT] Forge Networking now OPEN SOURCE

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

  1. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Awesome, feel free to send some links whenever it is public :)

    Awesome news! :) Glad you were able to get it up an running in no time. We are also proud that you were able to get Forge hooked up and running as well :).

    Awesome! Thanks for the support and no problem on the fast answers ;). Can't wait to see what you will be working on! :D
     
  2. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Well this game is going to be released on steam soonish... now this video is a showcase for some AI for my master thesis (hence the colored names). But it is on an online multiplayer session with both AI and players in it. :)

     
    Mr.Stein likes this.
  3. ZhavShaw

    ZhavShaw

    Joined:
    Aug 12, 2013
    Posts:
    133
    Will you ever add support for Final IK? That would be an absolutely great addition, and I know many users, including myself would find it a plus.
     
  4. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,009
    @ForceGaming,
    You dont need to sync every characters bones transform, this is quite costly, what you can do is to sync animations states and let the client compute locally all transformations.
    But if you really want to have it, you can always serialize custom classes with Forge and sync your own types.
    Frankly I'm not a huge fan of growing the framework with things that will be used rarely. Not everyone here owns nor needs Final IK.
     
  5. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Hello everyone, we have updated the Headless Linux tutorial and have added a tutorial for the Auto Launcher :). Please note that if you are on Firefox there seems to be a YouTube bug with the HTML5 player only showing 320p, so you may want to view in a different browser.
     
    justtime likes this.
  6. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    What @tatoforever has said is true.

    Technically if it works in Unity as is, then it will work with Forge Networking. All you will need to do is find the correct place to serialize data. So rather than simulating every single bone or movement in the system, you can serialize the animation properties, position, etc. The rest of the Final IK (or any other system) should follow suit and work as it does out of the box normally :)
     
    tatoforever likes this.
  7. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    305
    This looks awesome! Definitely hit us up when it finally releases and we will play it to check it out. :) Definitely a fan of multiplayer with grappling hooks.
     
  8. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    305
    We now have a new video up of our networking solution for its trailer, let me know what you guys think!

     
    tatoforever likes this.
  9. GlobalHive

    GlobalHive

    Joined:
    Jan 13, 2014
    Posts:
    18
    Its pretty basic and doesnt show off much features but its nice ;D
     
    Cranick likes this.
  10. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    305
    Thank you!

    It was meant to just be a teaser and show basic information to get people interested or curious about the system. We'll have various short feature teaser/trailers soon. :)
     
    Last edited: Jun 30, 2015
  11. CineTek

    CineTek

    Joined:
    Jul 12, 2013
    Posts:
    33
    There is no such thing as a free and limited evaluating version available right?

    I´ve been using Photon and uNET before but these solutions did not fit my needs sadly. Mostly because uNET is too buggy and incomplete and Photon because of CCU limitations and bad documentation of Photon Server... Also I do not like that they are in control of the servers and I *need* to go full authorative in my projects.

    I also started a thread on the forums, in case anyone is interested: http://forums.forgearcade.com/viewtopic.php?f=14&p=79#p79

    P.S.: I think the beginning of the trailer is too slow... It takes 20 seconds to import the package and then you just jump to the scene without showing how to actually set it up ;)
    Personally I would like to see the actual features as text on the screen at some time. From what I can see as an interested developer is that Forge is actually some kind of "Underdog" which solves a lot of problems and might be the best networking solution for Unity out there. So maybe you want to send this message out with your trailers?
     
  12. MornFall

    MornFall

    Joined:
    Jan 11, 2013
    Posts:
    159
    Alright, i am sold. After fighting for a few weeks with the damn matchmakers and the workarounds of unet, i had it.
    I am gonna jump a bit tonight but mostly tomorrow to convert my game to Forge. I ll come back here to give a detailed user review of what i have done and the differences with Unet. That will definitly help some whostarted, like me, with Unet, and will realize eventually that half of it just does not work like it should.
     
    CarterG81 likes this.
  13. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    We are went through the Headless Linux server tutorial and are running into a weird issue on it. It is an intermittent problem that is coming up on the client side and we have been trying to nail down what is causing it.

    So we have an EC2 Ubuntu instance and it seems to run correctly because if we run the same server locally it is getting the same issue. We are using 5.1.1p1 Pro and start the server through SSH, all seems fine. When we connect a client we have about a 80% chance of seeing this error come up:
    Code (csharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. BeardedManStudios.Network.NetworkingManager.Update () (at Assets/Bearded Man Studios Inc/Forge Networking/MainScripts/NetworkingManager.cs:166)
    Once that error comes up on the client it makes the server useless as well but the server log is absent of anything. At this point we are baffled but are continuing through docs at record pace thanks to the other tutorials and examples. It seems to be more stable running a local server through the editor than running it on the Linux machines. We get the error less often if we are running the ForgeAutostartHeadlessLinux scene in editor.

    Edited: A bit more info. We set up a client hosted server and connected externally and the client to the game crashes with the above error and the server shows that the client cube is spawned but frozen in the air above the board and this is the last thing the log shows.
    Code (csharp):
    1. Platform assembly: U:\Projects\ForgeTest\Builds\Win32\TestClient_Data\Managed\Mono.Security.dll (this message is harmless)
    2. incoming connection
    3.  
    So it appears it is not just a headless mode issue then.
     
    Last edited: Jul 1, 2015
  14. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Hello there! Currently we do not have a limited/evaluation copy of Forge. It may be possible in the future that we supply this, however it will take some development time to do so.

    You are in good company :) many of our users have come from uNET, Photon and Bolt. The number one thing we heard from them is the support was awful and the documentation was terrible. These are two key things that we are making sure to focus on for our system! :)

    I will have better time to be able to make an appropriate reply to your post this evening :)

    Thank you for your valuable feedback for the video. We were also thinking that we may make very short promo videos for each of our major features and have this one as an overall short promo. Do you think that would be better? Or would you think it would be better to have one long promo video covering many features? We may re-vamp this promo video to show a list of features at the end rather than user quotes :)

    Ah! I see that you have the same suggestion haha. Thank you very much for that! We are seen as an underdog much of the time because of how new we are. We have noticed that once people play with the system and see the feature set as well as the potential and support that we are much more than an underdog. We probably should reflect that in our promos. Thanks for the very honest and helpful feedback :)
     
  15. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Awesome, thank you so much for the support! We look forward to your review! :) Please let us know if there is anything you wish to see or that you wish to see improved. Also if there was anything you liked in uNET that you would like to see in Forge. We would be happy to add it :D
     
  16. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Fascinating, I was unable to produce this issue. Do you happen to have a stack trace for this? Also do you mind sending us a sample unity package with the reproducible issue via email or message? Lastly when you send these can you send your Ubuntu version? We are testing on 5.1.0 so we will upgrade our Unity and test some more. We will continue to try to reproduce this issue on our end while we wait. Thank you so much for the support request. :)
     
  17. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    I am expecting that a good part of it is something that we are/are not doing correctly on our side but wanted to see if you might have some input on it. I will PM you a link to the project files. I may have to test in 5.1.0 and see if we can recreate it there... now to see if I have that one installed. o_O

    Edited: More info...
    First time through works using 5.1.0f1, 5.1.1f1, 5.1.1p1 but on the second connection we get the line 166 error. It must be holding some info somewhere that is locking up the subsequent connections.
     
    Last edited: Jul 1, 2015
  18. forcepusher

    forcepusher

    Joined:
    Jun 25, 2012
    Posts:
    217
    How do you handle NAT issues ? Would people be able to host a game behind router ?
     
  19. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Interesting, we will be taking a look at the package tomorrow to identify the issue. We will be sure to check on the latest version of Unity as well.
     
  20. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Yes, just like many main stream online multiplayer games (like Minecraft and Battlefield 4) your users can open a port on their router to the server and it will be available for anyone to connect to. If the server is not behind a NAT then this is not needed. :) We have experimental punch through scripts, however NAT hole punching is primarily for peer-2-peer networking and not authoritative servers (which Forge is heavily designed after).
     
  21. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Announcement

    I am very sorry for the late responses today everyone. We were heavily working on getting the master server implementation up and running. It is nearly 3am now and I am proud to say that we have a working master server. We will do some testing on it tomorrow to validate its stability further but I think that it is safe to say that tomorrow night we will be releasing version 10 with the new master server!

    What is a master server?
    A master server is a server that you run independent of your game. Your game server instances then can register themselves with the master server. Once they do this, the master server will have a list of all available servers running the game. This is needed for a server browser and for match making. Yes, we will be doing an match making update later after this. The master server will feature the following properties:
    • name = The name of the server
    • max players = The player limit for the server
    • game type = The game mode (like "deathmatch")
    • comment = A general comment that hosts can input (think Battlefield loading screen message)
    • password = Erm, yes
    • scene name = The name of the current scene (eg: map) the server is on
    • current player count = The current count of the players on the server
    As always, we will be working on plenty of documentation on how to use the master server for what you need :).

    We thank you all for your patience on our replies and will be getting to them first thing tomorrow morning! :)
     
  22. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    400
    I've had my eye on this for a while, after being disappointed with other networking options in terms of how slowly they're moving forward and lack of communication/documentation... I'm sure you've heard this story before :) From what I've read I'm really interested in trying out Forge and the load of video tutorials and fast moving development seems awesome, great work!

    I see lots of examples about having players play as the server, and have clients connect to that player - is there an option (perhaps with Arbiter?) that allows for a player to start a new instance of the game on the server and connect to that? For example..
    1. Start game, see that there are no games available.
    2. Arbiter sees you're trying to play so it starts a new instance of the game as a server, and passes you that info so you can connect to it
    3. You play the game in a happy authoritative environment
    4. You friend comes and join the game
    5. You both leave, server shuts down because there's no players.
    I read over all the info I could find, and the Arbiter BaaS sounds very interesting too, it sounds like a perfect addition to what I'm after in terms of managing things like accounts and login. Do you have any estimated date for release, or a roadmap for Forge + Arbiter or anything? I'm still a bit hesitant after trying out other products and being left in the dark, so just wondering before purchasing anything :)

    Thanks!
     
    Last edited: Jul 2, 2015
  23. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    305
    Release Version 10

    Hello all!
    Thank you so much for all of your feedback.

    We are proud to announce that we have released Version 10 to our website for download and to the asset store for review. Please let us know if you find any bugs as this is a MAJOR release. Also, we know that there is no documentation or tutorials for this yet and will be adding tutorials and documentation for using the master server tomorrow. Here is a quick rundown of how to do it for now:

    1) Set the master server in the demo menu to "127.0.0.1"
    2) Build a unity game with the demo menu and a the resources scene as the loaded scene
    3) Run this game instance
    4) Open and play the "MasterServer" scene in Unity
    5) Press host server on the built instance
    6) Watch the logs

    If you want to test the server browser, then just open up another instance of the built unity game and go to the server browser :)

    Thank you all for your support and please let us know if you have any questions, concerns, feature requests or bug reports!

    Change list
    -New master server
    -Server browser updated to work with master server
    -Striped out arbiter from menu as it will be revamped and current functionality can be replaced with master server
    -Cleaned up BMSByte code
    -Removed warnings on editor script
    -Updated UI for NetworkedMonoBehavior
    -Updated disconnect bug on UDP
    -Updated networking disconnect to validate owning netWorker before closing webplayer policy server
    -Updated the quick start menu
    -Fixed server list class to support new master server get hosts method
    -Added master server ip string to the start menu
    -Start menu will register a server if a master server ip address is provided
    -Fixed bugs related to multiple connections in networking manager
     
  24. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Release Version 10.1

    Hello everyone! We have made a quick hotfix for the Master Server :)
    • Fix for the servers not updating the player count on the master server
    • Fixed spamming of the ping for master server
    • Fixed max player count on server browser
     
  25. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Were you able to replicate the issue we have run into on the tutorial setup? We don't seem to be running into it on our other test that is not based on the tutorial so we were wondering if there might be a step that is being skipped or the files may just need to be updated.

    Also, awesome news on the master server. We were just beginning to look at how to do one ourselves if necessary. Hopefully we can get a chance to look at it a bit later today. One of the things we constantly had issues with on UNET was the master server being unstable/unreliable, so this is welcome news!
     
  26. CineTek

    CineTek

    Joined:
    Jul 12, 2013
    Posts:
    33
    I just bought the asset from your website and I think the latest update has broken the sample scenes.

    All of the pre-set ip adresses are gone and even if I setup the masterserver using the tutorial above I can not find the game in the server browser.

    (The masterserver in the unity editor registers the pings from my first host though)
     
  27. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Hello there! First of all thank you fro supporting Forge Networking! :)

    Okay, so you purchased from the Asset Store and then verified your invoice on the site to download version 10.1? Also which version of Unity are you on? We want to test this asap. Another thing you can try to do (which solved issues when our UI was completely messing up) is delete the Library folder and let it rebuild. I would highly suggest making a backup first if this is you main project.
     
  28. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Thanks! We are glad to have a system that is worth following :)

    Yes actually :). This can be done without Arbiter as well. Now that we have de-coupled it with the new Master Server we are going to be giving the previous Arbiter system some more love.

    So you can create a server that all clients will ping when they start up the game. It then will determine if there are any servers available, if not you can run standard C# code to start a new server process. You can then wait for that server to ping the master server (or this server) that it is set up. Once set up, this server will then forward the ip and port of the server that just fired up :). If you would like, you can also put in a feature request that we implement a system like this into Forge and we can add it to our chain of new features to create :)

    No problem, we know what you mean ;). So we have a roadmap internally of how we are going to be setting up the new BaaS system, starting with re-vamping our HTTP libraries. This system is going to be mainly REST based so that everyone will be able to easily implement it. We have a lot of the work in place to get it running (thus the original Arbiter/ServerAPI code), so it really is just ironing it out, the pricing for it and what load we expect. We have already started talks about getting some servers to prepare to expand to, however we are trying to see what the developer interest is. We probably will be going through a beta process first too. So we do not have a hard date for it, but if there is high demand for it, then we will continue to push it up the chain. As of right now, we just opened that section of the code up for heavy development since it is no longer tightly coupled with the latest version.

    Please feel free to shoot us any more questions or put in any feature requests! :D
     
    justtime likes this.
  29. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Hi there, we are going through review processes again today now that the main feature of Master Server won't be eating away at the majority of our time. So you are saying that it is no longer happening to you? Very odd, the Linux tutorials we had setup were in parallel with us actually doing it and fairly recent. We will take a deeper look and try to emulate your exact environment as our original tests found no issues :(

    :) We heard that there was a lot of instability with uNET and it's master server. However I think it is just because the core of uNET is completely insecure from what I have heard. So it is probably a much more deep rooted issue in their core networking code or their llapi. Luckily our original tests proved much more stable then we originally intended. We are hoping that everyone will give it some real testing and find any fringe bugs that we were unable to find if any :)
     
  30. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    400
    @farrisarts Thanks! I'll be picking this up later today to play around :)

    Few more questions.
    I think I'm getting the terminology a bit mixed up, can you clarify;
    On the first post of this thread you've written: "This package will also include the Arbiter Server (Master Server) ..." In your reply you mentioned you've decoupled Arbiter from the Master server (which I thought were the same thing) Are they not?

    Are there two different "products" here, Arbiter Server and Arbiter BaaS?
    If the Arbiter Server and Master server are different what does each one do?

    I'm just trying to understand how this all fits together!

    Additionally, will there be any plans for opening up the Arbiter BaaS (database, logins, etc) to allow developers to host it on their own? Perhaps as a ready made solution that just needs to be hosted somewhere?
     
  31. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    We were waiting on a reply before we dug into it any more. We figured you might be able to spot it quicker than we would if it could be replicated. Our game that we are currently testing on is a client based connection and is not showing this issue, but we are planning for server authoritative headless usage later so the error will eventually have to be addressed. I just wondered if the tutorial may need to be updated or the files that are in the package need to be looked at. It just seems that something simple is out of order somewhere.
     
  32. CineTek

    CineTek

    Joined:
    Jul 12, 2013
    Posts:
    33
    No I purchased the asset directly through your website via PayPal.

    I am using the latest Unity 5.1.1f1 on Windows 64 Bit. When I am back home I will try to do your suggestions
     
  33. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    No problem :) we are looking into it now and emulating the same specs that you provided.
     
  34. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Sorry, I was a bit scatterbrained when I replied to your post, you obviously told me that. >.>;

    We also released verision 10.2 which addressed some of the issues found on the Master Server that were pointed out on our forums :). Please let us know if this works for you. We will be creating tutorials on how to use the Master Server from start to finish tonight as well.
     
  35. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Awesome! Thank you so much for the support :)

    Actually, the Arbiter is our REST interface that is our hook into our BaaS plans. We originally were testing a "Master Server" style based off of this implementation. We now just released a Master Server that is completely decoupled from this REST interface and is a stand alone implementation. The project has morphed a bit as we have gone along and we have made better lines between the various products. We will make a note to have documentation on the various pieces so that they are more clearly defined for everyone. :) Thank you for pointing this out!

    Yes, we plan on every single feature that we offer to be open source. Each feature we develop will allow developers to host their own because we don't ever want developers to feel like they are at our mercy :) We actually discussed this during our beta stages earlier in this thread (though I know this thread has become a behemoth because we reply so much haha). :) So yes, once we have the BaaS ready, we will be providing it for developers to host it themselves!
     
    CineTek and DMeville like this.
  36. CineTek

    CineTek

    Joined:
    Jul 12, 2013
    Posts:
    33
    Version 10.2 indeed fixed the problem :) Even though when I press "join" nothing happens, haha
     
  37. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Woah! That is not the desired behavior. Do you mind sending me a message with a sample package so I can analyze the root cause of that issue as well as the steps you take? :) I am unable to recreate this scenario currently.
     
  38. GarbageCat

    GarbageCat

    Joined:
    Jul 31, 2012
    Posts:
    224
    Hey I've few questions about this middleware

    Does it work with IL2CPP ?
    what lower socket level does it use ? (LLAPI, custom?)
    does it compress the data it sends?

    Thanks.
     
  39. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Hello all! I just wanted to make a quick post to say that there is a quick new update for the "Unity Independent Master Server" and that it is a holiday weekend for us here so we will be back to answering questions and the sorts after it is over. :) Have a great weekend everyone!
     
  40. alecie

    alecie

    Joined:
    Sep 2, 2013
    Posts:
    73
    Hey there, after looking through tutorials I have decided to buy the package and give it a try since i hate CCU based Photon and UNET so much ;)

    I wanted to register to Unitys masterserver so I followed the tutorial on your page but it seems that ForgeMasterServer class doesn't exist anymore, couldn't find it in code documentation aswell. (Unless I'm missing something, I've added using BeardedManStudios.Forge)

    Can you tell me what is the current way to register to master server and fetch a list of servers?

    And please update docs ;)

    Thanks!

    ---

    After playing for a bit with direct connection I've noticed [NetSync] is gone aswell and you use it in one of your tutorials.

    Also, when using AddNetworkVariable I get:

    AddNetworkVariable(() => textArea, x => textArea = (string)x);

    NullReferenceException: Object reference not set to an instance of an object
    BeardedManStudios.Network.NetworkedMonoBehavior.AddNetworkVariable (System.Func`1 getter, System.Action`1 setter, BeardedManStudios.Network.NetSync netSync) (at Assets/Bearded Man Studios Inc/Forge Networking/MainScripts/NetworkedMonoBehavior.cs:464)

    When I did:
    AddNetworkVariable(() => textArea, x => textArea = (string)x, new NetSync());

    I've got:
    NetworkException: The base class "Start" method is hidden, use "protected override void Start" instead
    BeardedManStudios.Network.NetworkedMonoBehavior.Update () (at Assets/Bearded Man Studios Inc/Forge Networking/MainScripts/NetworkedMonoBehavior.cs:626)
    NetworkMgr.Update () (at Assets/NetworkMgr.cs:120)

    My whole class:
    http://pastebin.com/p9rQp9EY
     
    Last edited: Jul 5, 2015
    CarterG81 likes this.
  41. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Great news with the master server!
     
    Cranick and justtime like this.
  42. realvfx

    realvfx

    Joined:
    Jul 5, 2015
    Posts:
    2
    "Urgent"

    Hi! I purchased "Forge Networking" yesterday and so far so good!! it's so easy to use even though I have not much knowledge about networking!! However currently I am having a little problem.

    I am using the "Forge Quick Start Menu" scene to set up server.
    So these are the steps that I followed

    1. I created a host server
    2. a client is added to the server
    3. the client close the application
    4. I tried to add a client to the server but no response at all. Seems like if a client leaves the server, than no clients can join the server from that point.

    I tested with the cube demo that comes with the package but still the same result.
    I really need help here :(
     
  43. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    400
    I'm trying to set up a simple custom connect screen. The screen has two buttons that call StartServer() and StartClient() on a Startup script assigned to an empty gameobject in the scene. The scene also has the MAIN_THREAD_MANAGER prefab.

    My code is here: http://pastebin.com/Y65eeh3Y
    Does anything look immediately out of place and wrong?

    As soon as I press play I get this error:
    ArgumentException: The thing you want to instantiate is null. UnityEngine.Object.CheckNullArgument (System.Object arg, System.String message) UnityEngine.Object.Instantiate[GameObject] (UnityEngine.GameObject original) BeardedManStudios.Network.SimpleNetworkedMonoBehavior.Initialize () (at Assets/ThirdParty/Bearded Man Studios Inc/Forge Networking/MainScripts/SimpleNetworkedMonoBehavior.cs:227) BeardedManStudios.Network.SimpleNetworkedMonoBehavior.Start () (at Assets/ThirdParty/Bearded Man Studios Inc/Forge Networking/MainScripts/SimpleNetworkedMonoBehavior.cs:246

    And as as soon as I hit the Start Server button I get this error:
    NullReferenceException: Object reference not set to an instance of an object BeardedManStudios.Network.NetworkingStream.PrepareFinal (BeardedManStudios.Network.NetWorker socket, IdentifierType identifierType, UInt64 behaviorNetworkId, BeardedManStudios.Network.BMSByte extra, NetworkReceivers receivers, Boolean bufferedRPC, System.String customidentifier, UInt64 senderId) (at Assets/ThirdParty/Bearded Man Studios Inc/Forge Networking/MainScripts/NetworkingStream.cs:199) BeardedManStudios.Network.NetworkingStream.Prepare (BeardedManStudios.Network.NetWorker socket, IdentifierType identifierType, BeardedManStudios.Network.SimpleNetworkedMonoBehavior networkedBehavior, BeardedManStudios.Network.BMSByte extra, NetworkReceivers receivers, Boolean bufferedRPC, System.String customidentifier, UInt64 senderId) (at Assets/ThirdParty/Bearded Man Studios Inc/Forge Networking/MainScripts/NetworkingStream.cs:182) BeardedManStudios.Network.SimpleNetworkedMonoBehavior.GetStreamRPC (System.String methodName, NetworkReceivers receivers, System.Object[] arguments) (at Assets/ThirdParty/Bearded Man Studios Inc/Forge Networking/MainScripts/SimpleNetworkedMonoBehavior.cs:402) BeardedManStudios.Network.SimpleNetworkedMonoBehavior.RPC (System.String methodName, BeardedManStudios.Network.NetWorker socket, NetworkReceivers receivers, System.Object[] arguments) (at Assets/ThirdParty/Bearded Man Studios Inc/Forge Networking/MainScripts/SimpleNetworkedMonoBehavior.cs:445) BeardedManStudios.Network.SimpleNetworkedMonoBehavior.RPC (System.String methodName, System.Object[] arguments) (at Assets/ThirdParty/Bearded Man Studios Inc/Forge Networking/MainScripts/SimpleNetworkedMonoBehavior.cs:488) Chat.SendMessage (System.String message) (at Assets/Chat.cs:16) Startup.StartServer () (at Assets/Scripts/Networking/Startup.cs:23) UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) UnityEngine.Events.UnityEvent.Invoke () UnityEngine.UI.Button.Press () (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:35) UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:44) UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:52) UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) (at /Users/builduser/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:269) UnityEngine.EventSystems.EventSystem:Update()

    I was also getting this error thrown every frame the project was running, but that disappeared when I went to extract the test into a standalone project (which I was going to send to you)..
    NullReferenceException: Object reference not set to an instance of an object BeardedManStudios.Network.NetworkingManager.Update () (at Assets/ThirdParty/Bearded Man Studios Inc/Forge Networking/MainScripts/NetworkingManager.cs:166)


    That being said, I'm just trying to get some clients connected to a server and I practically copy and pasted code from the forge quickstart scene... any chance of getting a simple tutorial on how to set up a server and client in code and connect to them? :)
    Also what about a list of events you can register to?
     
  44. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    305
    Awesome! Glad to have you on board and thank you very much for your support.

    So let me try and do some clarification as to what the problem might be.

    • You are using the Forge Quick Start Menu to act as your liaison for creating a host and connecting to as a client.
    • You then host the server on one client.
    • You then connect to that server as a client on another instance.
    • The client that then connected closes the application.
    • After another client attempts to join the server it gets no response at all and then no other clients can join the server from that point on.

    You then tested with just the Forge Quick Start Scene and the Cube Demo that comes with the package and the same results happen?

    So if I have everything correct, then my next suggestion would be to check to see if there is any errors happening on the host when a client disconnects. (Null references, anything that might be a code reference to something breaking on the server). If there is any errors I would recommend fixing those first and seeing if that solves the problem.

    The Forge cube demo package is working on my version of the Forge Networking. If you can please register your package on developers.forgearcade.com and make sure to download the latest version of Forge Networking if you haven't done so already, as there is a lot of patch fixes that we do on a daily basis that go throughout the week. Although from what you suggested, I don't know if that will solve your problem as it may be something in the code that might have not gotten called.

    I recommend doing those steps and see if anything improves on it and if not feel free to send me a support email at support@beardedmangames.com and I can discuss this further on how to solve the problem that you may be having.

    Thank you again for your support and please let me know so that we can resolve this as quickly as possible!
     
  45. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    305
    Thank you so much for your support! We too believe in the community and believe that CCU is not what we would ever want for us.

    We have changed the way that variables have been synced and we do indeed need to redo some of our documentation to reflect that and I am sorry that we have yet to get around to explaining those previously done tutorials and now. You can still sync variables using the AddNetworkVariable as it was previously used but with the additive NetSync() added on at the end. (We will be fixing a bug where if null is passed in it would through a null reference, thanks for pointing that out).

    So when I looked at your pastebin it seems everything is good to go except on the Awake(). I recommend putting the

    'AddNetworkVariable(() => textArea, x => textArea = (string)x);' before the base.Awake(); for the way that NetSync variables are handled it should be that way and we will be updating our code to reflect that. We currently recommend that users just use the [NetSync] attribute at the top of the variable you want to sync as it is easier to do that then to type all that information out as that is for just a way to do more advanced networking for those who want to do that.

    Try doing that suggestion above and hopefully that solves your issue, and if it doesn't please contact me and I will try and get it resolved asap. Support@beardedmangames.com is the best way to reach me if you have further questions. :)

    Thank you again for your support, and glad to have you on board!.
     
  46. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    305
    1) It does work with IL2CPP (but we currently have a bug we will be resolving shortly in the next release).
    2) We are using our custom built in socket level that handles much more advanced features that LLAPI is having trouble with.
    3) Absolutely! We compress however we much we want to send over the internet, as little as possible or as much and that is all controlled by you the user. We will in the future updates include debugging tools that will show the networking bytes at runtime but for now you can view the networking usage in the Task Manager to see how much is being sent if necessary. (We will also be updating some of the editor windows to show how much data in bytes is being sent over the networking in the future updates).

    Thank you for your questions and please feel free to ask anything else that comes to mind.
     
  47. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    305
    That seems like a lot of weird errors to be had at the start of a project. Is this just a blank scene with only the MainThreadManager and that start code?

    I would also make sure to not do an RPC during a socket connection but instead wait till after the client was connected using the event 'socket.connected += ()=> {[RPC call here]}'. Basically we want to make sure we can even send the rpc over after we are connected to the server.

    Also it seems that the errors are pointing to a SimpleNetworkedMonobehavour existing in that scene before it has even connected. I recommend only creating a NetworkedMonoBebhavior/SimpleNetworkedMonoBehavour until after you are already connected using our 'Networking.Instantiate()' method to do so, while having the prefabs already in the Networking Manager. Please let me know any further information so that I can better assist you and help you out as soon as possible. Thanks again for your questions and feel free to ask any more here or at support@beardedmanstudios.com
     
    DMeville likes this.
  48. alecie

    alecie

    Joined:
    Sep 2, 2013
    Posts:
    73
    Thank you for your reply!

    I am still getting these errors, previously I thought they were related to AddNetworkVariable, but they still occur when I comment that out.

    NullReferenceException: Object reference not set to an instance of an object
    BeardedManStudios.Network.NetworkingManager.Update () (at Assets/Bearded Man Studios Inc/Forge Networking/MainScripts/NetworkingManager.cs:166)

    NetworkException: The base class "Start" method is hidden, use "protected override void Start" instead
    BeardedManStudios.Network.NetworkedMonoBehavior.Update () (at Assets/Bearded Man Studios Inc/Forge Networking/MainScripts/NetworkedMonoBehavior.cs:626)
    NetworkMgr.Update () (at Assets/NetworkMgr.cs:120)

    Can you also tell me how situation with masterserver looks like currently? I've tried to search for 'master' on docs but it seems that there isn't anything like that there.

    For now I can experiment with direct connection when above errors are fixed, but masterserver is crucial for modern networked games.
     
  49. unityrealvfx

    unityrealvfx

    Joined:
    May 6, 2015
    Posts:
    1
    Thanks for the quick reply! :) theres still something that I am still not sure about... I am kinda new to networking...
    Does the host only have to open port (port forwarding) or both the host and clients? ;)
     
  50. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    No problem! :D

    So only the host will need port forwarding. In some routers it will be listed as "virtual server". If you have ever setup any popular game server like Battlefield or Minecraft, it will be the same process, just with the ports that you specify for your build. :)
     
unityunity