branchrust_reboot/main/baseplayer_serverupdateparallel/connectedplayer_rewritecancel
16 Commits over 0 Days - ∞cph!
Bugfix: ServerUpdatePlayerTick - restore Player.serverTickInterval functionality
Got lost during the rewrite
Tests: 2p on Craggy with UsePlayerUpdateJobs 2
Update: ServerOcclusion - add a global cache of all player pair results that lives for a frame
- Cache is valid after it's been updated, controlled via OcclusionCanUseFrameCache
Optimizes SendEntityUpdates and anything in the end of frame invokes by skipping LOS checks. This doesn't affect tick confirmation due to code ordering - will have to reorganize that
Tests: 2p on Craggy with UsePlayerUpdateJobs 2
Clean: use ReadOnlySpan in SendEntitySnapshots/-WithChildren
Tests: compiles in editor
Update: SendEntityUpdates - don't try to skip occlusion explicitly
Bit of a 180 turn. Current code is problematic to optimize at high level - but it will be easier if we introduce a global occlusion pair cache. At least I hope.
Tests: compiles in editor
Buildfix: TryRemove -> Remove
Tests: editor compiles
Update: bring back non-concurrent dict for BasePlayer.lastPlayerVisibility
Tests: none, trivial change
Update: OcclusionSendUpdates - rewrite lost pair handling to gather->send form
Should enable to revert back to non-concurrect dictionary for BasePlayer.lastPlayerVisibility
Tests: 2p session on craggy with UsePlayerUpdateJobs 0 and 2
Clean: OcclusionSendUpdates - factor out SendEntitySnapshotsWithChildren
Decided against merging SendEntitySnapshotsWithChildren and SendEntitySnapshots, as -WithChildren relies on grouped sending - it would complicate the code unnecessarily.
Tests: 2p session on Craggy with UsePlayerUpdateJobs 2
Clean: SendEntityUpdates - refactor out SendEntitySnapshots
Prepping for server occlusion unification
Tests: none, simple change
Update: SendEntityUpdates - add parallel sending of snapshots
It's incomplete, but now the similarities with OcclusionSendUpdates are more clear and can be unified. Also revelaed a bunch of concerns with ShouldNetworkTo and deferring to parent choice.
Tests: 2p on Craggy with UsePlayerUpdateJobs 2. Observed animal desync, but weirdly it was still there after setting UsePlayerUpdateJobs 0 and reconnecting - will investigate later.
Bugfix: OcclusionSendUpdates - fix up wrong last batch size calculation
- also removed dead variables
- removed FoundMain/Worker to SendAsSnapshotMain/Worker
Tests: none, trivial changes
Update: SendEntityUpdates - plug in occlusion fast path
- use-after-free bugfix
Tests: 2p on Craggy with UsePlayerUpdateJobs 2
Update: shaping up SendEntityUpdates, not complete
I'll need to refactor out sending logic from parallel server occlusion, and reuse some previous results, but at this point the direction is clear
Tests: compiles in editor
Update: slightly more landscaping
Tests: none, trivial changes
Update: being brave and replacing an if-continue with an assert
Tests: none, read through code to confirm it should hold
Update: start on BasePlayer.ConnectedPlayersUpdate
- Inlined BasePlayer.ConnectedPlayerUpdate and cleaned up the styling
- Annotated potential loops to optimize/offload
- Removed dead IsReceivingSnapshot check
Tests: none, trivial changes