Currently there are two anti-missile weapons in Gratuitous Space Battles. Point Defence Lasers and ECM beams. The point defence laser basically tracks incoming missiles and just zap them. They always hit (at the moment) and take one out. Of course, they can be overloaded,e specially by multiple-warhead missiles, but they are pretty cool. The other one (ECM beam) does exactly the same, but rather than destroy the missile it scrambles its guidance system and there is a cool wibbly wobbly effect as it veers everywhere. In the final game, the choice between them will probably be some sort of crew/power/cost/weight trade-off.
The thing they share though, is that they can ONLY target missiles that are aimed at their ship. You can’t have an ECM frigate at the spearhead of your fleet zapping all the incoming missiles to screen your capital ships from attack.
Clearly this sucks.
The solution isn’t trivial though. There are a LOT of ships in GSB and a LOT going on. if I’m to enable anti-missile weaponry to select from any missile on the map, that will involve a lot of processing. My mind is agog with quadtrees and other methods of limiting the amount of times each weapon has to do this:
for(each missile)
{
are_you_the_closest_one?
}
etc. It would normally be a trivial thing, but it’s something that isn’t in the game yet because it hasn’t really been necessary. The question is, do I write some big generic system that every piece of taregt selection will reference to find the nearest object? if so, that involves a fair bit of re-work, and it’s likely to be a several-cups-of-tea and a free morning sort of problem.