branchrust_reboot/main/projectile_jobscancel
155 Commits over 30 Days - 0.22cph!
Update: BaseRaidBench - spawn bases around the firing circle
- added the largest base from my demo
Walls are borked, same issue as editor, gonna fix next.
Tests: ran the scene
Update: export parent IDs for entities in buildings
Tests: exported largest base from demo - confirmed expected entity had ID
Update: Move Building to it's own file
Makes it accessible for benchmarking
Tests: compiles in editor
clear benchmark timers after recording results, stops accumulating time between runs
Update: DemoBuildingsViewer - export base as a json file
Going to see if it's enough to rebuild the base for the benchmark
Tests: exported largest base from my demo
Bugfix: conditionally start bootstrap timer since it can be null
Tests: none, trivial change
Buildfix: remove dead burst code and move job to namespace
Avoids name mangling shenanigans
Tests: build client locally
jobified transform readback for effect updating, still slow to update scaled renderers though
pooling HitInfo for Projectile DoHit and don't string concat for every ricochet fx fire
Update: enable batched projectiles and water checks by default in the BaseRaidBenchmark scene
Tests: ran the scene
Update: add benchmark timer to SoundManager
- replace magic values for timers with named consts
It's chonky, so tracking it as well.
Tests: ran the scene
Update: add benchmark timers to Projectile.Update and BatchUpdate
Tests: ran the scene in editor, saw output
Update: Rewrite BenchmarkTimer to allow for accumulating time
- Renamed API to make it clearer
Tests: measured against a stopwatch in bootstrap loading
moved most of HitTest generation to a transform job
Update: BaseRaidBenchmark - lay down basic benchmark timer collection logic
Will contribute to benchmark results, but right now don't have any relevant timers + need to rework how they are implemented.
Tests: ran the scene in editor
Bugfix: DemoBuildingsViewer - fix missing walls
- Manually pre-process prefabs to get around editor skipping preprocessing
- Add an editor-only override for Facepunch.Instantiate to not treat gameobjects as prefabs
- Gather building entities from all keyframes
Tests: loaded biggest base from my cleint demo - matches how demo renders it
further batched projectile improvemenets
- jobified position/rotation writeback, 10x faster
- adjusted HitTest to only populate some fields once for a projectile's lifetime (based on flag reset when it is pooled), some improvements
Tests: all projectile tests passing
New: DemoBuildingsViewer(Tools/Demo Buildings Viewer) - utility to extract buildings from a demo and create a scene of them
- Fixed VisualFoodSetting.PreProcess to nominate for deletion, instead of destroying directly
Currently only looks at keyframe 0 to detect building entities, which doesn't seem like enough
Tests: used a client demo from a release server to spawn a bunch of building scenes
reworked PlayerCache into a generic StableObjectCache to re-use it for batched Projectiles, making use of it for reading batches of projectile transform data which speeds it up by roughly 8x-10x compared to going through managed properties (cached or otherwise)
Tests: re-ran all projectile and PlayerCache tests, adjusted to new interface
Hack: BaseRaidBench - avoid flooding audio manager
During benchmark, we create too many audio sources and don't clean them up with default budgets - so we up them abit.
Tests: ran the benchmark - no longer grinds at 3fps
added batched water tracing and various supporting features
- GamePhysics.UseBatchedWaterRays convar to disable for perf comparison, will remove eventually
- NativeArray/NativeList expansion can optionally use power of two expansion
- Added native-friendly query structures for TerrainHeightMap and ShoreVectors, can add more querying functionality as needed but keeping it lean for now
- Modified test cases to be more lenient on float comparisons as Burst compilation introduces variance of around 1e-8 in position results on waves which is more than acceptable
Bugfix: BaseRaidBench - audio no longer missing
This aligns it with running from game menu, so standalone editor runs now also struggle under AudioManager lag.
Tests: ran scene + ran `benchmark BaseRaidBenchmark` from game menu
Update: editor benchmarking runs now consistently set benchmarking flag
Tests: ran RaidBenchScene in isolation and all bench scenes in series - no exceptions
Update: add BaseRaidBench to the benchmark scene list
Tests: ran the benchmark command - it did execute my scene, but also started lagging as heck
Update: BaseRaidBench - set batched mode as default for scene
Update: BaseRaidBench - restore global state at the end of the benchmark
Tests: ran the scen
Update: BaseRaidBench - emulate timed explosive fuse
Not really important for now, but later once rockets fly upwards and have a chance to miss, this should make it match reality closer
Tests: ran the scene
Update: BaseRaidBenchmark - expose batching mode via component
Tests: none, trivial change
Update: BaseRaidBench - disable camera shake and hurt effects
Tests: ran the scene
Update: Add BaseRaidBench to build scene list and mark it for maps bundle
- Also removed the nuked Foliage scene - forgot to clean it up
Tests: none
Update: BaseRaidBench - unblock pooling
Takes the edge off halfway through the benchmark, but initial 5 seconds are still rough.
Tests: ran the scene
Update: BaseRaidBench - reposition camera to above the circle
Tests: ran scene
Bugfix: BaseRaidBench - fix NREs by loading game manifest on start
Tests: ran scene
Update: BaseRaidBench - players now animate and produce muzzle flashes
Tests: ran the scene
Bugfix: BaseRaidBench - track weapon cooldown properly
- also account for animation delay for weapons that have it
The benchmark is now much more tame.
Tests: ran the scene
Update: BaseRaidBench - stagger initial weapon cooldowns
More realistic, and avoids spiking specific frames
Tests: ran scene
Update: BaseRaid - emulate rockets and grenade movement
Tests: ran scene, player is blasted to high heaven
Update: BaseRaidBench - use projectile specific velocity
Tests: ran scene
Update: BaseRaidBench - weapons now use their respective projectiles instead of rifle bullets
- EffectLibrary can return GameObjects now
Tests: ran the scene. Server-side projectiles need further massaging (as there's no server)
Update: BaseRaidBench - implement firing cooldown
At least now frame time stabilizes around 150ms.
Tests: ran the scene.
Update: BaseRaidBEnch - wip shooting
Since there's no firing cooldown, 100 players shooting every frame lags a ton
Tests: ran scene
fixed potential break in TraceWaterRays/TraceWaterSpheres logic that would cause casts to miss water traces if an earlier one had hit the max number of colliders
sharing more data between batched projectile effect processing - only accessing transform pos/rot once per projectile and only checking retrieving local player entity data once per batch
Bugfix: BaseRaidBench - this is no longer nude beach
Tests: built C+S and C-only, ran the scene
Update: BaseRaidBench - simulate client flow
- use a fake client backend and a dummy connection
Fixes players not facing the target, but breaks player clothing for what-ever reason.
Tests: ran scene