Bullets are simulated with a "point" (integrated with orbital mechanics etc) and links which connect points together. Bullets are distributed along the links.
Creating new bullet chain setup
Point components
Link components
Setting up ownership so links and points are properly cleaned up
Reversed order of bullets in memory to make adding new bullets easier
Split bullet link state calculation to another system, so it can be used in other places
Editor GUI displaying bullet bitfields
Tweaking bullets movement
Attached one tracking point to the gun barrel, moving it back and forth so it's always in exactly the right spot (the end of the barrel) when the next bullet is spawned. Cutting it loose with integration when there are 255 bullets in the buffer (or the gun has turned)
Removed some complexity in the culling system, no longer needed with new system for managing tracking points
Applying some system changes immediately, to reduce delay between point being created and integrated. Reduces but does not eliminate weird sliding motion as bullets come out of gun
Pre-integrating bullet motion for 1 second (just assuming linear motion) before handing off to the proper nbody integrator. This gives the system some time to integrate (on worker threads) before running off the end of the rail.
Improving auto aim
Adding more tracking points dynamically
Rotation speed
Angle between last tracking point and gun forward vector
Cumulative error (angle error * number of bullets fired)
Spinning ship test
Loosening up error bounds a bit, to generate less points
Tested with slowly moving ship (~20m/s relative to target)
Randomly choosing targets from a list and aiming at them
Refactoring to a max of 128 bullets per link. It's quite rare to fill the entire buffer, so this is an easy memory saving.
Created inspector for GPU bullet drawing system to help with debugging
Setting up octree to index all bullet points
Using octree to find nearby bullets for rendering
Dynamically adjusting query range based on number of bullets within range, to ensure the max buffer size is not exceeded
Linear growth/shrink. Too slow to adapt, sometimes renders nothing due to not finding a suitable distance.
Binary search. Converges faster, but still ends up doing several expensive octree queries per frame.
Added limiting to octree to queries, so they will abort if they hit a limit. This means I can get a result I know will fit in the buffer (and slowly reduce range when it happens).
Added a system to copy link position from next entity to "this" entity. This system has incoherent data access, but all following systems can have coherent access
Improving HasComponent check in Myriad.ECS to simplify some uses in bullet systems
Adjusted bullet mesh so it grows a tail behind point, instead of equally either side. This makes collisions look better
Shortening length of bullet trails for first 100ms, improves look around gun
Reduced octree depth for bullet points and lines. Large depth is good for very large queries, which isn't really relevant for bullets (colliders are all quite small).
Investigating culling not removing points quickly enough
Overcounting on the bit field
Fixed this
Investigating some bullets not being removed after impact
Index in ray generation does not match index in bitset!
Fixed this
Optimised ECS line insertion slightly, calculating things during recursion instead of ahead of time (skipping work if recursion exits early)