as the difference between units server-side and client-side are increasing (eg: is the unit visible, or the factory build queue) and it's getting harder to keep track of changes to units over time, sending changes to the user should be refactored.
possible solution: Have the server have a 'gameState' property that has some of the properties of the client-side GameState, that gets synced periodically with the client.
This would also mean that the majority of websocket events could be simplified to either 'gameState' (for full state) or to 'gameStateDelta' (for modifications of the game state)
as the difference between units server-side and client-side are increasing (eg: is the unit visible, or the factory build queue) and it's getting harder to keep track of changes to units over time, sending changes to the user should be refactored.
possible solution: Have the server have a 'gameState' property that has some of the properties of the client-side GameState, that gets synced periodically with the client.