The Dink Network

Reply to Re: AI & Missiles

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
September 28th 2011, 11:47 PM
fairy.gif
Someone
Peasant He/Him Australia
 
I'm not sure if I understand what you mean Shevek. It sounds like you are just talking about shooting in an arbitrary direction. Also, homing is much, much easier than prediction. Predict is about *finding* the intended target position. Assuming Dink is the target, then obviously you have to start with Dink's current position, then add to it depending on Dink's speed, Dink's direction, the missile speed, and the distance between Dink and the shooter. I think I remember I had problems solving the equation in DinkC with a single int value, because all the squaring would produce values too large for an int. I guess it is possible to try to store a single number across multiple integers, but I didn't try that. But the main problem (I think) was that the timing of both Dink and the missiles were very inconsistent in Dink (especially in MouseDink where so much is controlled by DinkC with wait() statements). So if the missile a bit slower than expected, the prediction formula would fail and the missile would miss Dink. If anyone could produce a perfect prediction formula for MouseDink (i.e., the missile always hits Dink unless he changes his direction after the missile is fired) I would be very impressed, but I don't think it is possible.