#Network Variables Synchronization
1 messages · Page 1 of 1 (latest)
Im asking in terms of the server processing the synchronization. It doesn't matter if the clients get the networklist (on their side) sequentially by freezing the main thread
but the main focus of my question is whether the server thread is freezed because of the sync
Yes. The syncing is asynchronous on either side.
Oh, that's a life saviour. Thank you so much!
It kinda bothered me since im basically syncing a lot of networklists for every player so it would be kinda bad if the late joining clients would lag the server thread
I don't think the serialization of the data would be though, which is one of several reasons to avoid very large NetworkLists.
Oh
that's game changing not gonna lie
I guess i will need to build some kind of a queue server. Maybe it could work the way that the joining players first connect to the queue server, synchronize the NetworkList there (main server would send the List ONCE at the startup to the queue server) and then when the synchronization is complete, the players would join the main server with the list synchronized
i would need to completely scrap the networklist for the main server tho
because it would be useless since they'd get the list from the queue
The only way to find out if it's an issue for sure is to test. Theorycrafting will only get you so far.
Usually you wouldn't want to sync entire large collections to late joining clients, or any clients in general.
Would want to split up the collection to only sync what's relevant to the player.
I know, but i cannot avoid it. My game is a voxel based game with chunks, and with 400 chunks in total (after some calculations i've made) for each server of roughly 250 players it would be inefficient to always check whether the players are in the region which needs to "download" the chunk data from the server
i kinda optimized it by making a system
which only synchronizes the changes to the chunks but it is not a perfect solution
however after the "first synchronization" the server would send the players a clientrpc to change small portions of the chunks
like for example server tells everybody -> change block at x y z to [blockid]
which is the best i could provide (i think so 😭)
Unfortunately I don't think you'd get anywhere close to 250 players on a single server using NGO and NetworkLists.
Wait, why not exactly?
The NetworkLists are gonna get scrapped from the main server
so the synchronization is gonna be minimal
It's made for small scale co-op games. In order to really push your player limit anywhere close to being that high you'd be looking at some sort of custom implementation on top of NGO to allow for it.
There's also the question of cost. You may very well be able to make it performant, but it may absolutely burn through bandwidth in order to do so.
Yea, you wll quickly start hitting network bottelnecks before getting to a few hundred users
NetworkVariable<List<>> might be better with delta compression after the initial sync. But really only profiling will tell the whole story
In terms of the network bandwidth i need to invest on a high end server and networking solution
but the thing that is saving me (i guess) is that the players are gonna be spread throughout the map with the player "render distance" so that it wouldnt need to synchronize every player with every player
about the network lists i think i'll go for the separate synchronization server