Reading over multiplayer related code, applying minor cleanup and comments
Split up some bullet systems into more atomic systems, this will be easier to rearrange for multiplayer things later
Setting seed once when bullet points are created and storing it instead of deterministically generating it every frame, this means it can be transmitted
Damage saturation: lots of damage to one area reduces damage taken (no point shooting something that's already damaged/destroyed)
HE shells hitting armour they can't penetrate shatter, no damage
AP shells arm on impact and explode shortly after, doing internal damage. Failing to penetrate, or over penetrating massively reduces damage.
Ricochet chance based on armour angle
Overmatch means that very large shells hitting very thin armour can't ricochet
Shell normalization: if there are multiple layers of armour the shell path gets bent slightly towards perpendicular every time it penetrates. This makes subsequent layers easier to penetrate.
Added BulletDamage and BulletDamageContainer, passing these through from gun entity to bullet entities. Collision system can use these for applying damage.
Sketching out gun sync script
Improved rotational transform sync script (mostly just as a reminder how this stuff works!)
Multiplayer backpressure is triggering when bullets are spawned due to the very short rails, investigating.
Added extra check if sampler is trying to sample past the end of a rail. In this case immediately apply backpressure.
Added a grace period, short (but non-error) rails are acceptable so long as they were created within the last 2 seconds. This gives the integrator some time to generate data.
Prevented backpressure from sometimes speeding up time speed! Jumping from paused to 1x.
Add a system for limiting the maximum time speed, can potentially use this to ban very high time speeds during active combat
Disabling time request buttons which are over the max
Checking and clamping to max allowed speed on server time sync system
Prototyping a new type of Myriad.ECS query that bulk copies data into arrays. Ideally this would never be used, but it's going to be needed to copy data into a form that can be used in a Unity job.
Forcing job scheduling to happen right away, we're going to wait on these jobs so we don't want any extra scheduling delay
Considered swapping octree for S&P in rendering
Could be made to work, but the rendering query would have to be split out to give the job time to run. Could schedule in Update and wait in LateUpdate?
Experimenting with attaching bullet impact VFX to ships
They can just be attached directly to the small body and simulated in world space
VFX must be cleared when the floating origin changes!
Considering design for narrow phase collision system
Unity colliders or custom colliders?
Unity.Physics colliders look like they can be used standalone (i.e. without Unity.ECS)
Built a test scene for this, slightly awkward but they can be used standalone
Hierarchy in GameObjects or entities?
Wherever it is built from ultimately we want to store a List<(Entity, Collider)> in the root entity. That way Broadphase against root, then check all children.
Fixed a whole load of Burst compiler related warnings and errors that suddenly appeared, probably due to a change in the Burst version when installing Unity.Physics
Genuine problems that didn't have warnings before, so this is a good thing!
Refactored ray generator to a separate struct that copies all relevant data, this means it can be passed into a job
Creating job to do narrow phase collision detection between each individual bullet ray and the CompoundCollider. This is a parallel for each job over all broadphase collision pairs.
Proximity Trigger (e.g. RPF flak) - bullet collision needs to be "fat", VFX and damage needs to be spawned back from the actual collision point
Contact Explosive - spawn an explosion at the point of contact, but only if the shell does not shatter (or otherwise destroyed)
Armour penetrating - damage model needs to re-run collision tracing all colliders along path, until either energy is low (shell stops) or timed fuse (explode and do internal damage)