The game I’m creating has tiles, units, abilities, etc and all of these are their own syncable GameObjects because they all have their own complex data structures and I need them to be able to easily reference each other for various different cases.
The one I’m most currently concerned with is the tiles. It is a tile-based game, so a map could potentially have 1,000s of tiles that all need to store synced data. It is a turn-based game, so technically, these tiles only need to be synced once per turn, lets say, 50 times per game.
I don’t know actually what the max tiles will be yet, I want to test it out and get a feel for it, but currently spawning 100 causes a few seconds of lag, so testing max scale is not something I’m going to venture just yet.
I currently spawn them all at once when the game starts. I could spawn them over time in the game lobby to help with that, but that’s sort of less of my concern.
My real concern is that if I am running MRS with 1,000s of tiles in each room, this seems like something that I should optimize because even now it would be helpful to create the maps I’m really going for, not to mention reduce server demand in the future.
Theoretically in Coherence, it seems like I could convert all the tiles into byte arrays and have a single byte array for each map of tiles and reduce 1,000s of tile GameObjects into a single tile map GameObject… and I might end up doing this.
Before I do though, I wanted to ask what your thoughts are on handling this kind of issue, and if there are any better ways than what I’ve mentioned here.