Question regarding large 2D Arrays
Options
Hello everybody,
I'm curious how to deal with synchronizing large 2D integer arrays across clients. From what I've read, I think the best way is to somehow serialize them into a byte array and send them through an RPC, but I'm wondering how much data can be sent through one RPC.
Here is some information:
- they would be anywhere from 100x100 to 200x200 in size
- each player would have their own 2d array
- the array would not be updated very often, maybe once every 10-15 minutes
Does anyone have any experience with something similar? Any ideas are appreciated. Thank you.
I'm curious how to deal with synchronizing large 2D integer arrays across clients. From what I've read, I think the best way is to somehow serialize them into a byte array and send them through an RPC, but I'm wondering how much data can be sent through one RPC.
Here is some information:
- they would be anywhere from 100x100 to 200x200 in size
- each player would have their own 2d array
- the array would not be updated very often, maybe once every 10-15 minutes
Does anyone have any experience with something similar? Any ideas are appreciated. Thank you.
0
Comments
-
You are better off using byte arrays. I tried sending a 2D object array with an RPC and it always resulted in being disconnected from the Photon network. It's not a size issue because I am able to send much larger 1D object arrays without any problems. I think it's just a serialization issue and PUN just doesn't handle 2D arrays out of the box.
Edit: seems to only be a problem for object arrays. 2D int arrays are not suffering from the issue.0