Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice
  2. We've opened up a space to discuss, share feedback, and showcase everything related to the Unity Shader Graph! Come show us what you've made.
    Dismiss Notice

Connected Games: general feedback and questions

Discussion in 'Connected Games' started by BHouse, Sep 13, 2018.

  1. larus

    larus

    Unity Technologies

    Joined:
    Oct 12, 2007
    Posts:
    265
    Yes, encryption is not included yet but this is planned for the new network transport (it will definitely be included but there is no ETA yet for it).
     
    iRosSoftware likes this.
  2. iRosSoftware

    iRosSoftware

    Joined:
    Oct 1, 2016
    Posts:
    2
    Thank you for answers.

    I expect encryption and hash value check for tampering detection.

    Please continue to do your best!
     
  3. Karrzun

    Karrzun

    Joined:
    Oct 26, 2017
    Posts:
    44
    I got a quick question about sending data via commands. I need a transform to be updated so I'm wondering whether it's better to send the Transform as a whole or just its seperate fields. Does it make a difference at all?

    Code Snippet:

    [Command]
    void CmdSyncTransform (Transform transform)
    {
    ....
    }


    versus

    [Command]
    void CmdSyncTransform (Vector3 pos, Quaternion rot, Vector3 scale)
    {
    ...
    }



    //Edit:
    I wanted to do some tests and it seems, one can't pass Transform as a parameter because it's a component. Sorry for the dumb question
     
  4. jackt_unity

    jackt_unity

    Unity Technologies

    Joined:
    Oct 30, 2018
    Posts:
    34
    Hi Karzun,

    Are you still having issues, or have you worked them out?
     
  5. Karrzun

    Karrzun

    Joined:
    Oct 26, 2017
    Posts:
    44
    It's not a real issue, but rather curiosity regarding performance and efficiency. My script is working fine and porobably I won't have any performance issues either because it's going to be just a simple little LAN game for my friends and me.
    Still, I'd be more than happy to know whether and how this difference would impact performance. Would it be better to give three paramters or would it be better to write a custom struct to hold those values send the struct instead?
    Sending the struct as a whole would require some additionals bytes, I assume, and thus claim a bit more bandwidth. Of course that's not a big deal for a handful of objects but it keeps adding up so surely it would make a difference for hundreds and thousands of objects. That's why I'd tend to send those values seperatly. But maybe I miss something else/more important here?


    Edit: wording
     
  6. Magnusai

    Magnusai

    Unity Technologies

    Joined:
    Nov 22, 2018
    Posts:
    1
    Personally I prefer structs for sending data, just more neat but I imagine on such a small scale either way would be fine.
    Also depends how many values you need to send. If you end up having to send more and more values you code might look messy sending them individually instead of just defining a single struct and using it over and over.
     
  7. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,029
    There is no bandwidth difference. UNET weaver would serialize all values of the struct into NetworkWriter. Same as when you pass the parameters one by one.
     
  8. nxrighthere

    nxrighthere

    Joined:
    Mar 2, 2014
    Posts:
    444
    If you care about efficiency, here's a tool for you. With BitBuffer you can serialize/deserialize your data efficiently and without GC, thanks to ZigZag and variable-length encoding based on integers family. Here's how you can create abstractions with your custom structures without codegen and reflection using managed arrays or Span<T>.
     
  9. projectorgames_unity

    projectorgames_unity

    Joined:
    Oct 15, 2018
    Posts:
    13
    So does this mean I shouldn't be messing about with the github download, but should be on the latest 2019?

    Bit worried how you don't know if it's in or not...
     
  10. jackt_unity

    jackt_unity

    Unity Technologies

    Joined:
    Oct 30, 2018
    Posts:
    34
    Hi there,

    At the moment it is only available through GitHub (found here) as it is not yet confirmed stable so has not been added to the main Unity install. This library has not been updated since October, though there is an update which should be coming soon.
     
    Kirsche likes this.
  11. zhuchun

    zhuchun

    Joined:
    Aug 11, 2012
    Posts:
    337
    Hi, I'm wondering would it keeps support MonoBehavior in the future since more and more stuff is implementing in ECS?
     
  12. BHouse

    BHouse

    Unity Technologies

    Joined:
    Jan 10, 2018
    Posts:
    62
    Everything we are implementing alongside ECS today is intended to be compatible with both ECS and MonoBehavior systems.
     
    zhuchun likes this.
  13. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    273
    So what does it mean that the new Unity Multiplayer is with Google Cloud. Are the servers going to be able to request new servers to spin up on demand?
     
  14. jackt_unity

    jackt_unity

    Unity Technologies

    Joined:
    Oct 30, 2018
    Posts:
    34
    Hi Jesse,

    Can you confirm what you are asking the question about, maybe quote the post, so that I have a bit more context for your question?

    To answer your question as best I can from what you have said thus far, yes, they are hosted on Google Cloud, and you can spin up and down instances as the need increases, though if they are left inactive for too long they are closed down again. Of course, this is not infinite, and you would have access to a limited number of instances.

    I hope this answers your question, if not, please let me know.
     
  15. BHouse

    BHouse

    Unity Technologies

    Joined:
    Jan 10, 2018
    Posts:
    62
    I can clarify a bit further. The extent of the GCP partnership varies per service. For example Multiplay server hosting continues to offer "Hybrid" bare-metal hosting with burst into the cloud. This service prefers GCP servers when using Cloud, but is also capable of leveraging AWS servers as needed.

    Other services (like matchmaking, player identity) will be hosted in Google Cloud , with maybe a few exceptions in regions like China.

    Please let us know if there's something more specific you would like to learn about.
     
  16. zhuchun

    zhuchun

    Joined:
    Aug 11, 2012
    Posts:
    337
    Hi, I contacted Multiplay a year ago and at that moment they don't have any server in China, but they planned to co-op with a local cloud service provider. When you're saying "a few exceptions in China", is that means Multiplay is going to have a different partner in China other than Google Cloud, or the services just don't work?
     
  17. BHouse

    BHouse

    Unity Technologies

    Joined:
    Jan 10, 2018
    Posts:
    62
    Good question! It means that we need to work with other providers in China. It's something we're all considering carefully for adapting existing services (like Multiplay) as well as how we design new services, i.e. to ensure we have a plan to be able to support Chinese markets.
     
    zhuchun likes this.
  18. yaraco

    yaraco

    Joined:
    Aug 21, 2013
    Posts:
    4
  19. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,525
    Hi, I'm dumb at understanding this kind of concept. Could you explain how this could be applied to future AAA games? Could this be a solution for people to mod these new games? Thanks. :)