Search Unity

[NO CCU LIMIT] Forge Networking now OPEN SOURCE

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

  1. Dragon-Magic-Studio

    Dragon-Magic-Studio

    Joined:
    Jun 30, 2015
    Posts:
    12
    I did use Ulink a little and yes it's a nice product and has unique features on its own.

    I went trough several networking products the past year and no i ended up using Forge.
    I can only give you a personal opinion list below for why i finally ended up on Forge, although some of my point you may disagree ofcourse.;)

    • Ulink is a nice tool but pricing model i did not like to go on with it.
    • UNet is still all beta although they have good ideas about what it would be next year, however there is no clear information about how much it is going to cost you at the time it is out of beta.
    • Thinking about photon business model CCU and insane prices (more likely Unet do the same) just let me feel bad already, although photon is easy to use but also limited, mobile support even cost more.
    • Bolt (bought by photon) i own and by pricing and model it was the perfect way to go, unfortunately it is IMO dead project and all depends on one developer only which likes to abandon stuff.
    • I now bought Forge and i must say it's just different compared to others.
    What i can tell about forge networking is as followed.

    • Developers listen to their customers and they are online everyday to help you out.
    • They have a nice wiki for owners which has good tutorials on it and owners can even contribute to it, so it is growing all the time.
    • The closed community on slack is just awesome it has pros as well as newcomers to networking on it.
    • In your profile you have free projects which run on forge, one of them is the angrybots demo to let you understand more.
    • Although FN is very new i cant say it is all 100% bug free but they release updates at least 1 a week, sometimes its a bug fix and sometimes its just improvement or even addon.
    • The activity in Forge is much higher as i experienced compared to other.
    • The price is very low for what you get and there are no hidden stories on it.
    • All is open source so you could fix a bug yourself or even extend it's core.
    • There are optional parts available also open source and very low prices, one is the masterserver stand alone, the other is the webserver to manage your headless gameserver via webpanel and soon they will have the standalone dedicated server (baremetal) in beta. I bought all the additional ones and they work fine.
    It just depends on how you look at things, FN is imo a flexible Network solution, they don't force you to use only one way, you can do it simple by using autosync's or use RPC's or even write your own custom ones.
    Authoritative or not just your choice.

    Forge gives you freedom instead of limitations,for a low price, that's what i feel about it.

    Hope it helps you.:)
     
    JohnTomorrow and Cranick like this.
  2. Alexanderansoft

    Alexanderansoft

    Joined:
    Jan 5, 2015
    Posts:
    26
    Hi! I bought the Unity Independent Master Server. Where can I read the documentation describing the functionality?
     
  3. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Hi there @Alexanderansoft !:D
    On the wiki in the "Master Server" section you will find documentation on how the master server works. The basic visual difference you may notice is that your version is a command line tool, you can just double click it to fire it up. You also have commands like "show log" to show you the activity on it in real time.

    Are you a part of our Slack chat channel? There are many users who have the Unity Independent Master Server that can also help on there if you have any other questions as well :D
     
  4. Alexanderansoft

    Alexanderansoft

    Joined:
    Jan 5, 2015
    Posts:
    26
    I sent a letter to support@beardedmangames.com for membership in the Slack chat channel.
     
  5. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    :) We got it and have added you, please let us know if you have any trouble getting into the slack chat channel :)
     
  6. Vancete

    Vancete

    Joined:
    May 3, 2010
    Posts:
    198
    Hello

    Is there any tutorial to get it working with Rooms like Photon?

    Thanks
     
  7. shwick

    shwick

    Joined:
    Jul 10, 2015
    Posts:
    31
    I am going to be saving my game state locally with soomla (an indie profile/game level api) for single player and remotely with forge for multiplayer.

    Looking through soomla, they use Unity's Convert class to do things like Convert.ToBoolean and Convert.ToInt on the variables they want to serialize. They then add the serialized fields to a Json object and add that to a key/value sqlite database.

    Looking through forge's example documentation, Forge.Examples.ForgeExample_Move I can see there are serializable functions in there. I'm wondering if I can use forge's serializable functions instead of unity's Convert and json? This would allow me to use the same functionality to save locally as well as remotely.
    I would only need to implement Forge's way of serializing my class basically.
     
    Last edited: Aug 31, 2015
  8. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Why hello there!! :D

    We do not have any tutorials or explicit examples for this type of thing, however if you would like to join the community for a couple of days and ask them (in our Slack chat) we are completely open to that :). We support multiple sockets per instance so it is completely possible to have a "room" structure much like Photon, except we don't recommend a limit of 8 players. Our server tests have supported 64 players so far (and that wasn't even our cap, just a test) :).

    We will be making an automated way to do rooms as a feature very soon though :)
     
  9. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    We have a "Serialized()" function that will convert all of the network variables to a BMSByte (our advanced byte[] system) and you can get the bytes from there when it comes to serializing. We do not serialize entire classes as that would be a bit wasteful since these serialize methods are for network transportation. If you needed to just serialize the bytes of the networked behaviors network variables then it would be a good method. However, it does seem like you are needing a bit more since you will be saving entire states of objects.
     
  10. Vancete

    Vancete

    Joined:
    May 3, 2010
    Posts:
    198
    Thanks for answering.

    I want to create rooms for 2 players every one, so in total can be up to 500 rooms. Are MasterServer and user-hosts a better option to do that?

    Another question, what's the way to get collisions working over the network?

    Thanks
     
  11. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    This depends on your structure. Do you wish to host all of the servers yourself or would you rather your users to be able to host the game servers? You obviously relinquish some level of security by allowing your users to host servers but many games do not worry about this (such as Minecraft).

    Unlike Photon we support all of the Unity components and addons. So physics act as normal with Forge as they would in Unity. To get the best and most perfect collision and simulation then you will want the server to be fully authoritative. :)
     
  12. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Hey everyone! I just wanted to thank you all for making Forge a global tool (Blue = countries that use Forge) :D

    I love how networking can bring everyone together! :D Come join the community and the Slack channel with all the other networking developers from around the world!

    upload_2015-8-31_23-27-4.png
     
    Cranick likes this.
  13. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Version 14.6 Released

    Hello everyone! We have a new core stabilization update that comes with a couple of new features as well :D. Thank you all for all of your awesome help! Lets continue to build a strong amazing product that helps us all continue to build our network games easily! :D Enjoy!
    • Fixed issue with byte[] having extra bytes at the end when sent across the network
    • Added [NetSyncToServer] where variables marked with this only go to the server and not other clients
    • DataInitialized is now set to true after NetworkInitialized method call
    • Objects will once again teleport to initial positions rather than interpolate to them
    • Fixed race condition bug with multiple clients joining simultaniously with a large rpc list
    • Fixed issue with spawning objects with child behaviors and the id getting out of sync preventing spawn
    • Object mapper (and everything else) now supports sbyte
    • Fixed bug where non-numeric objects were not getting set by the NetworkInitialized method
    • Fixed error with iOS throwing exception on disconnect
    • Removed .intercept() for iOS
    • iOS no longer slows down as time goes on when disconnecting and reconnecting (tested with Zombie example)
    • Fixed major bug with initial spawning locations of clients not being replicated when they join sometimes
    • Fixed major bug with initial clients not updating to starting sync values not replicating sometimes
    • New IBRPCIntercept interface that will allow you to intercept RPC logic from the client for security
     
    Dragon-Magic-Studio likes this.
  14. Vancete

    Vancete

    Joined:
    May 3, 2010
    Posts:
    198
    I have the following code, but I'm unable to do it authoritive.

    I was trying with the sample code included in the package, but there's no way to get Rigidbody movements working.

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using UnityEngine.UI;
    4. using BeardedManStudios.Network;
    5.  
    6. [RequireComponent (typeof (Rigidbody))]
    7. [RequireComponent (typeof (CapsuleCollider))]
    8.  
    9. public class RC : NetworkedMonoBehavior {
    10.  
    11.     public float turbo = 100f;
    12.     public Text turbotext;
    13.     public Image turboind;
    14.     public Rigidbody rigidbody;
    15.     public float speed = 10.0f;
    16.     public float gravity = 10.0f;
    17.     public float maxVelocityChange = 10.0f;
    18.     public float rotateSpeed = 1.0f;
    19.     public bool canJump = true;
    20.     public float jumpHeight = 2.0f;
    21.     private bool grounded = false;
    22.     private Vector3 rotation;
    23.     public AudioSource audio;
    24.     public AudioClip idle;
    25.     public AudioClip moving;
    26.     public GameObject cam;
    27.    
    28.    
    29.     void Awake () {
    30.         turbotext = GameObject.Find("Canvas/TurboText").GetComponent<Text>();
    31.         turboind = GameObject.Find("Canvas/Turbo").GetComponent<Image>();
    32.         rigidbody = GetComponent<Rigidbody> ();
    33.         rigidbody.useGravity = false;
    34.     }
    35.  
    36.     void Start(){
    37.         if (IsOwner) {
    38.             gameObject.transform.Find ("Cam").gameObject.SetActive (true);
    39.         }
    40.     }
    41.  
    42.     void FixedUpdate () {
    43.  
    44.         if (!IsOwner)
    45.             return;
    46.  
    47.         if (rigidbody.velocity.magnitude < 0) {
    48.             audio.clip = idle;
    49.             if(!audio.isPlaying)
    50.             {
    51.                 audio.Play();
    52.             }
    53.         } else {
    54.             audio.clip = moving;
    55.             audio.pitch = rigidbody.velocity.magnitude/12 + Random.Range(-0.1f, 0.1f);
    56.             if(!audio.isPlaying)
    57.             {
    58.                 audio.Play();
    59.             }
    60.         }
    61.  
    62.         if (turbo < 100) {
    63.             turbo += 0.05f;
    64.             turbotext.text = Mathf.Round (turbo).ToString ();
    65.             turboind.rectTransform.sizeDelta = new Vector2(Mathf.Round (turbo)*1.74f, 26);
    66.         }
    67.  
    68.         if (grounded) {
    69.             // Calculate how fast we should be moving
    70.             Vector3 targetVelocity = new Vector3(0, 0, -(Input.GetAxis("Vertical")));
    71.             targetVelocity = transform.TransformDirection(targetVelocity);
    72.             if(Input.GetAxis("Vertical") > 0){
    73.                 if(Input.GetKey(KeyCode.LeftShift) && (turbo > 0.5f)){
    74.                     targetVelocity *= (speed*1.75f);
    75.                     turbo -= 1f;
    76.                 }else{
    77.                     targetVelocity *= speed;
    78.                 }
    79.             }else{
    80.                 targetVelocity *= (speed/2);
    81.             }
    82.            
    83.             // Apply a force that attempts to reach our target velocity
    84.             Vector3 velocity = rigidbody.velocity;
    85.             Vector3 velocityChange = (targetVelocity - velocity);
    86.             velocityChange.x = Mathf.Clamp(velocityChange.x, -maxVelocityChange, maxVelocityChange);
    87.             velocityChange.z = Mathf.Clamp(velocityChange.z, -maxVelocityChange, maxVelocityChange);
    88.             velocityChange.y = 0;
    89.             rigidbody.AddForce(velocityChange, ForceMode.VelocityChange);
    90.            
    91.             // Jump
    92.             if (canJump && Input.GetButton("Jump")) {
    93.                 rigidbody.velocity = new Vector3(velocity.x, CalculateJumpVerticalSpeed(), velocity.z);
    94.             }
    95.         }
    96.  
    97.         //Take input for rotation
    98.         if (Input.GetAxis ("Vertical") > 0) {
    99.             rotation = new Vector3 (0f, Input.GetAxis ("Horizontal"), 0f);
    100.         } else if (Input.GetAxis ("Vertical") < 0) {
    101.             rotation = new Vector3 (0f, -(Input.GetAxis ("Horizontal")), 0f);
    102.         } else {
    103.             rotation = new Vector3 (0f, 0f, 0f);
    104.         }
    105.         rotation *= rotateSpeed;
    106.         //Rotate
    107.         rigidbody.MoveRotation (transform.rotation * Quaternion.Euler (rotation));
    108.        
    109.         // We apply gravity manually for more tuning control
    110.         rigidbody.AddForce(new Vector3 (0, -gravity * rigidbody.mass, 0));
    111.        
    112.         grounded = false;
    113.     }
    114.    
    115.     void OnCollisionStay () {
    116.         grounded = true;  
    117.     }
    118.    
    119.     float CalculateJumpVerticalSpeed () {
    120.         // From the jump height and gravity we deduce the upwards speed
    121.         // for the character to reach at the apex.
    122.         return Mathf.Sqrt(2 * jumpHeight * gravity);
    123.     }
    124. }
     
  15. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    You inherited from the NetworkedMonoBehavior but didn't override the start, awake, or fixedupdate. Might want to start there.
     
  16. shwick

    shwick

    Joined:
    Jul 10, 2015
    Posts:
    31
    Ah thank you. I will look into more how forge saves things on the server after I buy it and maybe I can use that.
     
  17. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    @CaptainMurphy Is correct here. Have you joined the Slack chat? If you downloaded from the Asset Store you can register on the site and get the latest version (faster than the Asset Store) and you will get an invite to the Slack community chat :)

    http://developers.forgepowered.com/...nityAssetStore/How-to-Register-Invoice-Number
     
  18. gravyleaves

    gravyleaves

    Joined:
    Mar 19, 2014
    Posts:
    28
    Forgive me if this has been asked before, but what is the compatibility of Forge with networking services like iOS Game Center, Google Play and Steam's similar service. The last time I looked into it other networking solutions had some significant impediments to using those free services.
     
  19. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    No worries and I don't think it has been asked. There is no problem implementing other plugins using our networking solution that others have had problems with as of yet. Because everything is provided with full source code you don't have to worry about compilation issues as a plugin and everything just works out of the box. We already have some users integrating Game Center and Steam in their games with no problems with using our networking solution as well.

    You are free to chat with other developers on the Slack channel if you have any questions on this and I am sure the community will assist you if you run into any problems.

    If you have any other questions that you would like in depth or if you want to be invited to out slack channel temporarily while you make a decision just send us an email at support@beardedmangames.com

    Thanks again for asking this question and hope to hear back from you. :)
     
    Last edited: Sep 2, 2015
  20. Dragon-Magic-Studio

    Dragon-Magic-Studio

    Joined:
    Jun 30, 2015
    Posts:
    12
    It works fine, you should go on Slack to ask for help, as there is where we all hang out to help each other.
    I converted the 1st person rigidbody controller.
     
  21. Vancete

    Vancete

    Joined:
    May 3, 2010
    Posts:
    198
    How you did it?

    I'm getting this error:

    Assets/Scripts/NetRigidController.cs(139,41): error CS0115: `UnityStandardAssets.Characters.FirstPerson.NetRigidController.FixedUpdate()' is marked as an override but no suitable method found to override
     
  22. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Thank you.

    A couple other questions:

    1) RPC calls (at least with Photon) cannot return anything, so you can't do anything after you activate the game object, such as parent it or whatever because you can't return a Transform or anything. Is there a way around this?
    2) Is there built in method to "find game object by view id" to find the same object on each client and do the same thing to it (activate / deactivate)?

    Bolt had neither of these problems since they had a way to override the BoltPrefabPool to use a pooling plugin (very awesome!). But maybe you have another way around these problems?
     
  23. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    :) No need to override the FixedUpdate method you can just call it as you normally would in Unity
     
  24. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    No problem! And awesome! :D More questions!

    You can pass the id of the networked object in question through the RPC call if you need to. Otherwise the RPC is called on the object in question and you can just do "transform.anything".

    Yes :D SimpleNetworkedMonoBehavior.Locate(ulong networkId); will find the object and you can do what you need to it after that :)
     
  25. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Awesome, thanks!
     
  26. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    Hello everybody! We are now going to be giving discounts to Forge Networking for a short time period (10% off). Using our url http://bit.ly/1PQMffb and #ForgeNetworking in a tweet you will be helping other fellow developers. There is going to be additional benefits for those that actually tweet it as well, so for those that did purchase it already you will have something to look forward to in the near future for helping us out (i.e. Future discounts on our addon store and more).
    =)

    We have a list of our current users before this promotion, so it only applies to everyone who didn't receive a discount and are registered on our website! (If you need help registering your invoice feel free to follow this tutorial) Please email us your tweet to support@beardedmangames.com just to mark your account on our side as available to receive discounts for our addon store and more in the future.

    Thank you all for being part of the Forge community! :)
     
    CaptainMurphy and Brent_Farris like this.
  27. ZhavShaw

    ZhavShaw

    Joined:
    Aug 12, 2013
    Posts:
    173
    Haha my island was too small to even be on the map XP
     
  28. Bennett-Lynch

    Bennett-Lynch

    Joined:
    Oct 11, 2014
    Posts:
    35
    Just purchased Forge today and have to say I've been incredibly excited at how easy it is to get fully functional networking behavior up and running so fast.

    I do have a design-related question for your team though. After beginning to implement Forge, I began to realize that I've been littering my project with singleton classes (e.g., 1 for player movement, 1 for using abilities, 1 for player stats, etc.). From a client perspective there should only be 1 instance of each of these classes, but from a server there should be either n amount or 0, depending on the class behavior.

    So network-instantiating player objects with these singleton classes is obviously causing some errors. What is the recommended approach for dealing with this? Should I just store a client variable for a reference to the game object created for each player, and access components from that? Or is it possible to stick with the singleton approach?

    (If this is covered in one of the tutorials feel free to just link me that instead, I've been slowly making my way through them and plan on watching all of them eventually.)
     
    Last edited: Sep 8, 2015
  29. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Hello @Bennett Lynch ! :D

    Sorry, we were away for the weekend for the holiday.

    Awesome! We were hoping that everyone would be able to jump in and just get started as fast as possible :)

    So singletons are awesome but do pose an issue with networking (and multi-threaded networking even worse than that). So what you can do, not knowing everything about your code base, is that you can create a separate class to manage singleton behaviors. If you still want "singleton" like behaviors with objects like the player you can create a static variable and assign it only if you are the owner of the object.

    An example of this is that internally we have a "isPlayer" flag. When you turn this on for an object it gets special treatment on the network and acts as a singleton through the NetworkedMonoBehavior.MyPlayer static object. You then have access to only your player class even if there are 50 player classes running around. :)

    I think I saw you come into Slack chat with the same glowing review, I haven't looked through what was said over the weekend yet but hopefully you got some other useful answers from there :D
     
    Bennett-Lynch likes this.
  30. MaZy

    MaZy

    Joined:
    Jun 29, 2012
    Posts:
    105
    If Forge supports auto matchmaking system where the player can click find game or something then they find a game where they can join it or they are in queue and they start then together then it is worth for me.

    But the important thing and no go without for me: I want to be able have this auto matchmaking on my server.
    I need really an auto matchmaking system on my server not external example like photon service or unet service. Just on my own dedicated server which I want to run 24/7

    Thats why I really moved everything away and writing my own Networking but the time is running away....
     
  31. EnjoyTime

    EnjoyTime

    Joined:
    Oct 30, 2013
    Posts:
    5
    I have been studying Forge Networking engines.
    There is a problem in CoopDungeonForge.
    Please see the orange circle section.
    The object has no server to the client.
    Why do you have this problem?

     
  32. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    This is the Forge Zombies example not the CoopDungeonForge (unless you are talking about the example in that folder). This issue has been fixed on previous versions. I would recommend downloading the latest version of Forge Networking from our website as the Asset store takes some time in order to approve our updates. Currently as of now we are on Version 15.

    Also note that the CoopDungeonForge was made on an older version of Forge Networking that may also not be up to date and the latest.

    http://developers.forgepowered.com/Profile

    Hope this answers your question. :)
     
  33. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    You can code any way you would like your server browser to handle any of the data which could handle matchmaking like as you suggested if you want. You are absolutely allowed to have your own hosting service hosted by you in any type of server you would like. We have quite a few users already who do so in our Slack channel who can also provide support on how they accomplished it or take a look at the wiki examples on our website. Hope this answers your question and thanks for sharing the interest in our Networking Solution!
     
  34. GlobalHive

    GlobalHive

    Joined:
    Jan 13, 2014
    Posts:
    18
    I have a small problem...

    I dont get it how to sync a variable to all players so every player has the same...
    I try to create a spawn system where player 1 gets spawned at spawnpoint 1 and the other at the second which would look like that


    publicTransform spawn1;
    publci Transform spawn2;

    if(playerID ==0)
    {
    Instantiate....... spawn1.position, quaternion bla blalba
    playerid++
    }else
    {
    same stuff as obove but with the spawn2.position
    }

    But that doesnt work...
    maybe someone can help me here q.q
     
  35. eavonius

    eavonius

    Joined:
    Sep 13, 2015
    Posts:
    3
  36. eavonius

    eavonius

    Joined:
    Sep 13, 2015
    Posts:
    3
    One more question (sorry I'm close to buying but can't try it out first). Is there a way to have the proximity based updates have varying proximity for different types of messages? For example it's common to be able to see players further away but not see messages for their combat damage in a chat window until you are closer. You'd want them not to appear while outside of your display proximity, but hear messages when they enter that messages' proximity.
     
  37. Razouille

    Razouille

    Joined:
    Jan 25, 2013
    Posts:
    44
    Hey guys, i got one question too ! :D

    Can we sync child rigidbodies with your amazing system ? I tried with UNET it's impossible (only position and rotation)
    Actually my prefab hierarchy is like that :

    -Parent Object : no component, just here to regroup the 2 childrens
    --Body : contains a rigidbody with box collider, and the main script
    --Feet : contains a rigidbody with box collider and a spring joint connected to the Body

    That's the only obstacle i got for the sync... please tell me it's possible ! (and don't lie :p)
     
  38. Serath

    Serath

    Joined:
    May 14, 2013
    Posts:
    2
    Is it possible that forge networking synchonizes all children gameobjects parented to the gameobject that contains the network controls entity? I'm asking because we are receiving huge fps drops when the player is moving, with having around 200 cubes as childrens of the sync object. If that is the case, is it possible to somehow disable the transform synchonization for children objects and only apply it to the actual object the network controls entity is attached to?
     
  39. unity2dvn

    unity2dvn

    Joined:
    Sep 16, 2015
    Posts:
    1
  40. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Hi there! If you use reliable methods of transportation then the message will get to the client unless it completely disconnects :)

    Also thanks! :D We work hard to make sure it is simple and powerful
     
  41. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    The network only manages objects that have network scripts on it. It will not manage any child transforms or their objects. We will test with 200 child objects on a networked object, but at the end of the day it is only manipulating the parent's transform (assuming that the child objects do not have network code on them).
     
  42. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    If the child objects are network objects then they can independently sync their positions to all of the clients :)

    It's possible. Just slap a NetworkedMonoBehavior (or a derivative) onto the child objects and let it fly. We can make a video proving this if you wish :)
     
  43. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    No problem @eavonius , I am very sorry for the late response,

    You can actually do this with multiple socket connections now, though it is not built out of the box to manage this, it is possible and I believe some users are attempting to implement such methods. We will be working on our own version of it soon hopefully :)

    This is possible, we have proximity based updates built in, however we do not have layers of proximity built in. It really wouldn't be too difficult to add in on your own (until we add a proprietary method for this). The server already has all the positions of the players so that you can update the messaging system to send to a different unit distance. We also do support "channels" known as message groups where only people registered in that message group will receive the message from the server. :)

    Please let us know if you have any further questions. :D
     
  44. Brent_Farris

    Brent_Farris

    Joined:
    Jul 13, 2012
    Posts:
    881
    Hi there! :D You probably will want to work with RPC methods to specify spawning locations. You can pass the position of the spawn point as an argument if you wish :). Or if the spawn point is a networked object you can send its id and find it on the client machine. http://wiki.forgepowered.com/index.php/Tutorial:Remote_Procedure_Calls

    Are you a part of the Slack chat room? If not, feel free to send me a private message with the email/username you used on the site so that I can invite you :)
     
  45. Serath

    Serath

    Joined:
    May 14, 2013
    Posts:
    2
    To clarify the issue more we have done a few more tests. We are moving an object using physics on the server and then syncing this movement to all clients to have their entities to move accordlingly (which might contain up to 200 more objects each with box collider, but no physics). Also, there is no physics on the client only on the server part. We have discovered that this has been working flawlessly in the 12.6 update. but ever since we've updated to the 14.7 there has been a lot of bandwidth traffic (up to 2MB/s), plus the server has been running at 5fps no matter what. The issue is getting worse when the players are moving, but is still pretty significant even if they are not (around 5-10 fps without movement).

    We haven't tried the newest build of Forge Networking yet, due to that we have to rewrite a lot of the code to make it work. since it has been significantly changed how the Update and Start methods work.
     
    Last edited: Sep 17, 2015
  46. SORELLE

    SORELLE

    Joined:
    Jun 26, 2015
    Posts:
    3
    Good Morning every body. i am new in forge networking and i have some difficulties.
    please i want to know how i can do to allow a player to manipulate objects that he has not instantiate.
     
  47. LastDude

    LastDude

    Joined:
    Aug 5, 2015
    Posts:
    15
    I'm very interested in this framework, but I have some questions:

    Does Forge support what this dude suggested? If so, how big is the performance impact?
    How does Forge handle state synchronization? Does it check for changes every time before serialization or does it uses a bitmask (like UNet, Bolt, ....)?
     
    Last edited: Sep 19, 2015
  48. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    You are syncing over 200 objects for their position? Are all these using the NetworkedMonoBehavior / SimpleNetworkedMonobehavior? Or are you syncing them with NM/SNM for their position and syncing their position through code?

    Are you able to make a example project using the scenes/code provided and try and replicate the issue on the latest Forge version and sending it over to us at support@beardedmangames.com so we can address this issue quickly. Thanks!
     
  49. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    Good Morning/Afternoon Sorelle!
    Glad to have you on board and will definitely hope to point you in the right direction.
    If you are on our slack chat which is where the majority of other developers come to talk at (including us) we are able to provide realtime support through the normal business days.

    If you want to allow a player to manipulate an object that isn't his there are many ways to achieve this. One is sending a command over to that object owned by the player to do a particular action. I.e. have the server send an RPC/authoritative RPC to that particular object, which would then let you control the other object. Another approach is to put an identifier on that object, and then if the objects identifier matches a particular player you can then allow the movement for that player.

    Feel free to look over the wiki as well as contacting us on Slack if you have further questions.
    http://wiki.forgepowered.com/index.php/Tutorials
     
  50. Cranick

    Cranick

    Joined:
    Nov 20, 2011
    Posts:
    310
    Absolutely!
    http://developers.forgepowered.com/Tutorials/MasterClassBeginner/Serializing-Fields-And-Properties

    None, it works the same as a regular RPC, so there shouldn't be any noticeable performance impact. It only syncs the value if it has changed for the owner of that object. All of the states are synced when a value has changed from its original unless you put your own code in there to do otherwise. It checks for changes every time before it does any serialization and yes it does bitwise operations to compress the data as small as possible right out of the bat unless you are using WriteRaw.

    If you have any other questions feel free to contact us at support@beardedmangames.com

    Hope you have a great weekend!