- Home /
how to send and receive data
I am very new to unity, and programming in general. I am working on a game, and I would like some help/advice. I am using a kinect, and I have a set of data points for the joints. I can store them in a file, but I would like to send them to another computer / server to store for later use. I would also like to be able to get the data back through the game and use the data in the game over and over.
I have tried to send the data as a string using udp socket, but I was losing way too much data. I decided to try to compress the data, but I can't do it using System.IO.Compression. I am stuck, and I was hoping someone could give me some advice. Thank you very much.
Thank you for the suggestion, I will try that really quick. I was thinking it would slow everything down quite a bit, but it is worth a shot. Any other suggestions?
Answer by Entwicklerpages · Jul 03, 2014 at 06:17 PM
I don't know much about kinect, so I don't know how much data you have. Because you say udp have a too great loss-rate, I think you have MUCH data. My idea would be to save them to a file and upload it at some point. (For example if it gets to big or if the user is in the main menu, a loading screen, what ever). You also could split the file and upload them one after one. If the user leave the menu, etc. you abort the uploading process and continue if the user come back.
For what specific use you want to upload the data? Multiplayer? This could change the way you send the data completly.
I am just sending the data points of joint locations to a server to store for later use.
Your answer
![](https://koobas.hobune.stream/wayback/20220613153120im_/https://answers.unity.com/themes/thub/images/avi.jpg)