I'm currently trying to come up with a way to "resolve" a player's position with high accuracy.
The position would be the point where a missile will be sent to. The missile would have a speed/delay/width and range. The player has a speed as well and will most likely attempt to walk out of the missile, that's what I'm trying to "predict". I could filter all the spots where sending the missile to would be impossible (because the player can not move to there, or would be blocked to moving there by another object), but I'm still left with the problem of the player trying to walk out of the missile.
A simple
const float missile_speed = 2000;
const float missile_width = 100;
const float missile_delay = 0.250f;
const float target_speed = 350;
float time_to_land = (player->position.distance_to(sender->position) / missile_speed) + missile_delay;
D3DXVECTOR3 position = player->position + player->direction * time_to_land);
would not do the trick, because the player can change his direction the moment the missile goes off, effectively making it miss. That's where the I could use the player's path and split it, then analyze it to find the spot best I can cast to, but the juking problem still persists if the player suddenly changes direction. The missile will sure hit sometimes, but it will be far from hitting consistently.
I have no idea how to handle this. I've searched for quite some time and most of the "solutions" are the ones I had in my example.
How should I handle this properly? I'm considering neural network but I have no idea where to start with it nor couldn't I find any resources that bring my problem detail using AI. Keep in mind I'm doing this in C++.