2,305 Commits over 580 Days - 0.17cph!
Bugfix: veeeeery rare out of bounds access when Unity returns invalid hit
Tests: none, don't have a unit test for that
Update: GamePhysics.TraceSpheres - add ignore entity support
Tests: ran unit tests
Update(tests): add TraceSpheres and TraceSpheresUnordered unit tests
- get rid of old TestSpheres test, didn't spawn base entities
Tests: ran new unit tests, some are failing as expected
Update: expanded GamePhysics.Perf tests with spheres (batched and serial)
- Fixed a perf bug of TestTraceRay causing it to do too much sorting
- Further refactored & generalized code
At 128 spheres, batched and serial seem to cost the same - going to continue moving ray optims across after I add unit tests
Tests: ran perf tests, numbers within expectation
Clean: more refactoring of unit tests in Test.GamePhysics
Tests: ran perf tests
Clean: take out perf test measuring code into helper Utils class
Tests: ran unit tests
Merge: from remove_old_occlusion_group_logic
- Clean: more code removal in unit tests to silence Rider
Tests: ran unit tests
Clean: remove more dead code/checks
Missed some leftover if(true) style code
Tests: ran unit tests
Merge: from main (yeah, weird one - redo of CL 143929)
When I did a server merge from extend_perf_telem, plastic warned me that another change made it to main, but commit bot reported mine merged. In reality it wasn't fully merged, just "attached". This should fix it.
Tests: compiler simulator in editor
Clean: leave a note why we're not running water traces and raycs concurrently
Tests: none, trivial change
Update: remove TestLineOfSightBatched unit test as we never implemented the batched version (I think?)
Tests: ran all GamePhysics.UnitTests - now they all green
Merge: from expand_perf_telem
- Update: object work queues now send their budget time + an aggregate record
- Update: frame_profiling now contains extra fields about invokes and a pre_lateupdate timing record
Needs a bit of backend work to fully finish this.
Tests: uploaded to backend, inspected what arrived
Update: couple analytics fixes:
- new TimeSpanExt.FromMicroseconds utility to get sub ms timespans
- changed CSV data pushing to object_work_queue_2 and frame_profiling_2
- moved BudgetTime to be last field in the CSV blob for object_work_queue_2
Tests: inspected csvs on backend
Merge: from remove_old_occlusion_group_logic
- Clean: ServerOcclusion now uses new occlusion group logic by default, old logic ripped out
Tests: ran unit tests
Clean: remove old occlusion group code
- removed -enable-new-server-occlusion-groups command line
- cleaned tests
Tests: ran occlusion group unit tests, all 144 pass
Merge: from delete_obsolete_pool_api
Tests: compiler simulator in editor
Clean: remove deprecated Pool api - they've stayed 1 year longer than supposed to
- replaced internal usages
* Pool.GetList<T> -> use Pool.Get<List<T>> instead
* Pool.FreeList<T> -> Pool.FreeUnmanaged
* Pool.FreeListAndItems<T> -> Pool.Free(ref obj, true)
* Pool.ClearList<T> -> write your own
* Pool.FreeMemoryStream -> Pool.FreeUnmanaged
Tests: compile simulator in editor
▍▊▌▅▆▅▅ ▆▍▍▋ ▇▅▌▉▋▋▆█▆▇▋▊▋▆▄▋▋▉▄▉ ▄▇▅▌▊▆ █▊▄ ▅▊▍▇▆▆▉▋▌▅▄▍▄▌▄▆▄▅▍▅▇█ ▊ ▌█▋▍▍▍▍ █▇▉█▅▋▋ ▇▉▄█ ▍▍█▄ ▉▍█▄▉ ▉▅▉ █▊ ▊▄▄▍█▆▉ ▌▌▊▊█ ▊▊▇▉▋▉▌▊██▅▌▌▋▉▌▇▇▇▌ ▄▌█▋▊█ ▄▌▌▅ ▄ ▌▇▄▇▌ ▋▄▌ ▉▊▋▆▅▌▆▄▊▋ ▋█▉▆ ▌▇▋▅ ▊▍ ▆█▍▋▇█▇▉ ▌
▍▄█▋▇▇▆▆ ▋▅▇▋▋▌▅▉ ▍ ▍ █▉▅▆▆ ▄▄▋▄▉▄ █▋ █▉▅▅▉▊ ▄▇ ▌▉▅▌ ▄▅█▌▋▊▌▌ ▄▉█ ▊▋▋█▊▉ ▇▋▆▆█▌▆▊▊▊▍▌▊▉▍▄ ▇▆▍▊▌ ▆▌▅▊▊▍▄█ █▋▅▇▋ ▉▌▍ ▉▊▇▆▆ ▅▄▍▍█▄█ ▊▇▉▉ ▄▊▄▌ ▄▉▋▍▅▅▅▌ ▋█▌▍ ▅▅▋▉▉█▊▅▌▆ ▋▆▌▊▋▄ ▅▊▇▄█ ▍▌▄▍█ ▄▄▍▅ ▆█▉ ▄▇▉▉▄▍ ▊▄▍▄ ▋▌ ▉▄▉▇▅▊▄▅▌ ▉▅ ▆▋▉▅▇▉▆ ▋▄▆▊▋▆ ▆█▅▊▋ ▄█▍▄ ▅█▇ ▉▊▌ █▅▆▋ ▉▅▆▌█ ▌▆█▋ ▇▋▉ ▌▇▇▅▊▉ ▇█▋ ▄▆▅▊▅▋▌▍ ▇▆▌▍▍▆▄▍▊▋▌█▊▋ ▊▇▉▉▄ ▆ ▉▅▍▋ ▌▍ █▍▅▅▆▄█ ▉▇▄▌▊▍ ▄▆▅▍ ▋ ▉▍▅▇▊▌▅▉▋▊▇▆▇ ▄▅▍▌ ▅▌ ▉ █▋▄ ▄▇▉█▍▊▍▍▇▆ ▅▆▍▌ ▄▆ ▇▄▊▇▌▅▅▊ ▌▉▍▆ ▄▇█ ▇▋▌ ▄▄▄▇ ▅▌▋▊ ▄ ▄▆▌▅▅ ▋▍▉█ ▋▇▆ ▍▆▍▊ █▋ ▋▍▄▋ ▌ █▄▋▄ ▅▍▌▌▊▅▄▅█▍▇ ▌█▅▌ ▍▉ ▇▊▄▋▅▋▋▅ ▍ ▋▄▆▇▇▅▇▋
Merge: from duplicate_bot_id_fix
- Buildfix for missing SERVER guard
Buildfix: add missing SERVER guard
Merge: from duplicate_bot_id_fix
- Bugfix for duplicate player id warning when loading a save
- Bugfix for editor freezing when loading a save with a player
Tests: playground with 1 transient, 1 persistent npc in editor then save -> load -> spawn player loop 3x
Merge: from main
Also renamed branch: duplciate_bot_id_fix -> duplicate_bot_id_fix
Bugfix: fix bot id being shared when loading a save
Fixed by reconstructing the free bot ID list and free bot id counter
Tests: playground with 1 transient and 1 persitent bot, couple loops of spawn player -> save -> load
Clean: fix formatting in BasePlayer-SaveLoad.cs
Tests: none, trivial change
Bugfix: recycle bot IDs when loading from a save
This was leaking a bunch of IDs, likely harmles on maps with low bot population
Tests: loaded craggy with preplaced bots (both persistent and transient). Spawned extra bots, their ID count was starting from 1
Bugfix: skip trying to draw water bodies if camera planes are not initialized
Was causing a lot of asserts when loading into Craggy with debug unity editor
Tests: booted craggy with debug editor - no more invalid plane normal asserts
Bugfix(editor): schedule QueryVisJobRunner jobs early to avoid editor freeze
Tests: was able to load craggy save with players multiple times in a row
Merge: from hackweek_pool_analyzer
- New: static code analyzer for invalid use of Pool.Free and related methods
- Bugfix: a bunch of fixes for detected pooling problems, about 40 cases
Tests: internal unit tests, compile simulator in editor, built C & S standalones (last week tho)
Update: PoolAnalyzer - switch to release version
- Release binary built from b189abf6
Tests: internal unit tests, started unity and ran compile simulator
Bugfix: fix 21 incorrect calls to Pool.Free instead of Dispose
Tests: compiled all modes in editor, built standalone C and S
Update: PoolAnalyzer - added detections for IProto.Dispose not being called and calling Pool.FreeUnsafe instead of Pool.Free
- debug binary build from b189abf6 (moved to new repo)
Reported a bunch of warnings, going through them separately
Tests: unit tests + started unity
Bugfix: fixing ~24 missing Pool.Free
Tests: editor compile test, built C and S standalones
Buildfix: undefine local GetFromGrid method when in None mode
Tests: None builds
Update: PoolAnalyzer - support ArgList syntax in ObjCreationSyntax
- debug bin built from 0fbab248
C+S Editor now boots! Now to check individual modes
Tests: unit tests + started editor
Update: PoolAnalyzer - further reduce false-positives
- better escapes for await, try blocks, using statements
- debug bin built from a2005dd2
Only 2 false-positives remaining in C+S
Tests: unit tests and started unity
Update: PoolAnalyzer - in cases of assignment, scan all block hierarchy up to local var declaration block
- debug binary built from cb708ddf
Down to 15 confirmed false-positives (5 different types)
Tests: unit tests + started unity
Update: PoolAnalyzer - check finally and using blocks
- debug binary built from b28334fc
Down to 48 potentially false-positive errors
Tests: unit tests + started unity
Update: PoolAnalyzer - more escape cases
- recursively process expression statements to detect deeply nested escape cases
- add support for field initializer escapes
- debug binary built from e61378eb
Currently detecting 54 errors (still a bunch of false-positives present)
Tests: unit tests + started unity
Update: PoolAnalyzer - escape analysis if assigned to a variable as part of method arg list
- debug binary build from 8b392070
Currently seeing 60 errors in C+S (3 valid, 2 false-positives, rest unknown).
Tests: unit tests + launched unity
Update: PoolAnalyzer - handle more valid cases
- added support for Dispose handling
- added if(obj != null) Free(ref obj) handling
- added support for using directives (both scoped and inline)
I give up on trying to handle local data flow involving pooled objects - there's just too much work here
Tests: unit tests + started unity (our Pooling unit tests no longer flag false-positives, this was kind of funny)
Update: PoolAnalyzer - escape a bit more
- don't analyze statements before Pool.Get call
- escape analysis when pooled object is returned out of method
- debug binary built from b8b556ae
Tests: unit tests + started unity. still a bunch of false-positives, but found first legit bug
New: PoolAnalyzer - validates code around Pool usage
- debug assembly built from e7281f13
Tests: detected errors, but those are false-positives (return of pooled object instance)