1,688 Commits over 427 Days - 0.16cph!
Merge: from main
Tests: none, no conflicts
Bugfix: PlayerCache now tracks players that are removed from the server
Original impl left a space where it could miss some of the players, leading to rogue nulls.
Tests: played back staging demo - had same numbers
Merge: from parallel_validatemove
Tests: none (resolved into dest version)
Update: adapted code to PlayerCache change
- FinalizeTickParallel now uses `player.StableIndex` as indirection, instead of iterator index
- Updated validation checks
- Transform caching job now checks for invalid transform accessses
Tests: ran all relevant unit tests, played back staging demo - got comparable numbers
Merge: from parallel_validatemove
- fixing one of validation checks silently passing
Tests: none, trivial change
Bugfix: one of validation checks was doing nothing
Tests: none, trivial change
Merge: from parallel_validatemove
Tests: none, no conflicts
Clean: Lenght -> Length
Tests: compiles in editor
Merge: from parallel_validatemove
- Removing extra logging
Tests: built server locally
Clean: removing BasePlayer OnDisable/-Destroy logs for UsePlayerUpdateJobs
Got confirmation that it's not Unity nuking the objects, so something else must be afoot.
Tests: built server locally
Merge: from main
Tests: none, no conflicts
Update: fix TickInterpolatorCache tests and update it's API
- No longer tracks player count
- Made API focus on Expand -> Replace(index) flow - makes it easy to work with PlayerCache
Tests: ran unit tests
Update: PlayerCache now guarantees spatial stability
- Updated it's direct tests (will update rest next)
Updated interface, although compatible with existing code, will lead to breakages, so I'm slowly updating the relevant code
Tests: ran unit tests
Merge: from parallel_validatemove
- minor server demo playback bugfix
- extra debug logging for baseplayer destruction when UsePlayerUpdateJobs is enabled
Tests: build tests
Clean: fixing broken formatting that snuck in on main
Tests: none, trivial changes
Merge: from main
Tests: none, no conflicts
Debug: adding sanity debug error logs to baseplayer OnDisable and OnDestroy
Hoping to catch where it's coming from
Tests: local build tests
Bugfix: ServerDemoPlayer - handle player reconnecting multiple times
Not 100% sure it's the correct way, but I think it works for now.
Tests: played back new staging demo 3 times
Tests: replace Assert.AreEqual with Assert.IsTrue
- Brings TickIntrpolatorCache test from 30s+ down to 6s
Turns out AreEqual is slow and inflates the test times by quite a bit.
Tests: ran unit test
Optim: TickInterpolatorCache reduce number of segments being copied when growing
Unit test is still slow, need to dig a bit more
Tests: ran unit tests
Merge: from parallel_validatemove
- more debug to track down null baseplayer
Tests: local editor SERVER+CLIENT session
Clean: fixing whitespace issues after auto-merge
Tests: none, trivial changes
Merge: from main
Tests: none, no conflicts
Debug: sprinkling additional validation checks in ServerUpdateParallel
Trying to narrow down at which point this null sneaks in
Tests: none, trivial change
New: TickInterpolatorCache - a sparse, bulk TickInterpolator array
- Comes with it's own stress tests (they pass, but need to investigate perf)
- Depends on PlayerCache, but I need to modify it to provide more stability
Building block towards jobifying tick history processing.
Tests: ran unit tests
Optim: replace couple managed loops with a burst job
Tests: none, trivial changes
Merge: from parallel_validatemove
- buidlfix
Tests: build client and server in editor
Buildfix: move ValidateTransformCache to SERVER region
- also fixed missing Profiler.EndSample()
Tests: built client and server in editor
Merge: from parallel_validatemove
- Adds error checking to UsePlayerUpdateJobs 1 mode and graceful disable to avoid crashes to help with investigation
Tests: ran parallel mode in editor on craggy with a couple debugger-forced emergencies
Merge: from main
Tests: none, trivial merge
Clean: promote server var to a const
- no codegen since I didn't do one when I added this
It's temp code, but it makes things safer while I investigate, so no reason to disable it at runtime
Tests: none, trivial change
Bugfix: purge player cache when player update jobs has emergency shutdown
Allows to restart player update jobs cleanly in the same session
Tests: in editor with debugger forced an emergency scenario, confirmed the cache was empty and rebuilt
Update: move player transform cache updates to be first step of parallel player processing
- Bugfix - using Steam networking backend can have temporary outtages, which can cause gaps in processing and player cache desyncing
- also enables us to compose parallel flows better in the future
Tests: local editor session on craggy
Update: add temp emergency disable of player job processing
- Only active on staging servers while I investigate the crashes
Tests: forced an error via debugger - confirmed fallback is working
Tests: move the PlayerCache stress test to it's relvant tests file and clean up
- commented out the expected-to-fail case
Tests: ran the tests
Update: adding throw away tests to investigate how I cuased a native crash yesterday
So far everything points to BasePlayer being removed after we cache all transforms for the burst jobs and before the first RecacheTransform invoke, but I haven't tracked where it's coming from.
Tests: ran the hacky unit test
Merge: from players_cmd_clean
- Removes obsolete columns
Tests: ran the command in a local editor session
Buildfix: restore server ifdefs
Tests: compiled in editor
Clean: remove obsolete columns from players cmd
- Also rewrote it using the new API
Tests: ran in a local session in editor, tested both text and json versions
Merge: from profiling_improvements
Tests: took a snapshot in editor
Update: updated profiler binaries
- Built from 7b1b923e
Contains additional filters for BaseNetwork::ShouldNetworkTo, BaseEntity::ShouldNetworkTo and entire Facepunch.Network.Subscriber class
Tests: took a snapshot in editor
Merge: from minigun_audio_fix
- Fixes minigun audio beign stuck on Client after releasing the fire button
- Fixes minigun effects not replicating to other players
Tests: local 2 player session with each player firing minigun in various patterns.
▍██▄▆▋: ▊█▇ ▋▆█▊▋▇▋ ▄▍▋▌▉ ▋▇▉▋▅ ▍▆▋ ▌▇▆ █▍▌▉▆▉▍▄▆▍▄ ▌▍▅▋
- ▍▆▌▇▋█▍ ▋▆▄▍▆▅ ▋▇▋█▇▄ ▍▋ ▌▌██ ▄▋ ▊▊▋▉▊▉ █▄▍▌▉▉, ▋█▆▊▉ ▇▇▋▆▌▆-▊█▍▅ ▄▅█▇▍▋▊ ▇▄▉ █▇▋▊▊▇▌▍ ▋▆█ █▆ ▇▅▅ ▆█▌█▅▅
▋▇█▍▉: █▊▋▄▅ ▅ ▅▄▄▉▅▊ █▇▊▋▊▋▉ ▌▄▆▌ ▉▆▉▊ █▇▊▇▆▋ ▌█▇▍▅▇ ▇▅▆▅▉▅▌ ▇▄ █▇▄▊▌▄█ ▆▋▆▌▊▉▋▋.
Merge: from item_allocs
- Simplifies stacking logic to be cheaper and get rid of potential allocation
Tests: various stacking scenarios from belt to inventory with wood stacks(incomplete stacks, full stack + incomplete, full stack only)
Merge: from main
Tests: none, no conflcits
Optim: don't sort items when trying to stack them
This saves us the potential allocation in Sort + less iterations over the array + can avoid doing slightly more expensive logic if we randomly jump around in item container.
Tests: various stacking scenarios from belt to inventory with wood stacks(incomplete stacks, full stack + incomplete, full stack only)
Merge: from item_allocs
- Fixes BufferList not able to sort when it's not full
- removes some from Item.MoveToContainer
Tests: moved and stacked items in the inventory while checking profiler
Optim: remove allocations from Item.MoveToContainer
Unity profiling showed an allocation inside it's sort impl, but I haven't seen it on server snapshots - will clean up if it is there
Tests: got a bunch of wood in separate stacks and stacked it via right click from belt to inv. Checked profiler to confirm expected allocations are gone.