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

Sending datas (f.e. maps) to clients?

Discussion in 'Multiplayer' started by Chaosgod_Esper, Sep 22, 2014.

  1. Chaosgod_Esper

    Chaosgod_Esper

    Joined:
    Oct 25, 2012
    Posts:
    295
    Hi there :)

    Today i'm happy, cause i got a server/client system to work.
    And it's working well!

    But i've a question about transfering complex and biig data.


    The Situation:
    I wrote an ingame Mapeditor. This Editor allows the Players to build their own 3D Tile based Map. Works great, and i can save the Maps local via serialization.
    Now, the Player strts a new Game (Host Game - Server), enters a GameName, a Password if needed..etc
    Now he should choose a Map, where the MP Match takes place. In the Map Selector, he additionally can choose his own created Maps too!


    The Question:
    The Map Data is really big. Many Block IDs, Stats and Links..
    Is there a way to send the Mapdata to the client Players?
    I know there's rpc, but a solution with the ability to show a progress value would be great..


    thanks in advance :)
     
  2. Ashkan_gc

    Ashkan_gc

    Joined:
    Aug 12, 2009
    Posts:
    1,117
    first of all you can use a compressed data format gzstream or something in .NET to write the data in a compressed manner. Google for writing zip files C#, secondly you can divide the data into chunks of X size and send them in RPCs to the other sides in order to show progress. Otherwise you should use streaming protocols which is not bread and butter in unity.