Seeking-Shot Problems

I’ve probably missed a log here or there. Today, I finished implementing seeking-shots (though I need a powerup sprite for it), building on work in the previous couple of days to implement a field-of-view method to return the first thing struck by searching rays. I based it on this video, but what I’ve come up with is pretty expensive (O(n^2^)), so spamming attacks (especially with spread-shot) quickly brings the framerate down below 60. I optimized to stop the casting early if it reached beyond the screen (which helped), but I think this fancy approach may be just too fancy. Rather than have viewers that can be blocked (requiring ray-casting), I may try for one of Sam Spade’s solutions—a simple vision cone. I can keep the ray-casting implementation for scenarios where I have better control over the number of instances doing it (like, on orbiter turrets).

The seeking shots are currently pretty darn unerring, requiring tweaks there too. (Done. Better. Slow things always get hit, but fast-moving gravel has a chance to dodge, so maybe a fast-moving ship may as well.) I’ve implemented a version of Mr. Spade’s Pursue Force steering force that doesn’t require the target to also be using steering forces; since my projectiles have been converted, the seeker shot can target other entities with it.