I implemented an object pooling system for my framework. I currently create 100 projectiles at level start and deactivate them. When an AI or player or whatever wants to shoot a projectile, the function will check to see if a projectile is not activated, and if not, activate it, move its position to the spawn position, and do a single line trace every other frame. Groups of 50 projectiles will do a trace within 1 frame, and while a projectile is not doing a trace, it will do a lerp from its last position to the halfway of its current and forward position. I saw Doom 2016 dev talk about fast moving projectiles not needing to trace every single frame, so I figured I give it a shot. So far projectiles look smooth enough.

If the trace hits nothing, the projectile will move to the new position. If it hits something, the projectile can make an impact effect, and deactivate itself. The name of the game now is making sure things arent created and deleted constantly, and reducing the amount of while loops on individual objects outside of AIs.

[video:google]https://youtu.be/yyGjv4wvKu8[/video]