Monday, 12 August 2013

List to smallest string (c#)

List to smallest string (c#)

I'm using Unity to make a little network game, and I need to send a list
(of structs) over to the other players. Since Unity can't send lists, nor
binary data, I though to convert it to a string. It doesn't have to be
human-readable. Since I need to send this list over pretty much every
frame, I was wondering, how can I convert it to an as small as possible
string?
So, I have a List<myStruct> and would like a string, one that's very
small. Fast conversion, both from and to the string, is also important.
Note that I'm using c# to script everything.
Thoughts?

No comments:

Post a Comment