Caracal, you may not realise it but the above post was the 100,000th on the BB. Congrats on helping us pass this milestone.
Wowzah! I've been accused of logorrhea before, but ... ten myriads? One lakh? I'm a madman, I tellya, a maaaadmaaaaan!!
Oh, you didn't mean single-handedly. Well never mind, then.
(I saw your thread on Outworld and knew we were coming up on 100k, but didn't realize my post would roll the counter. I'm honored to have been the one, though, and am happy this is an active forum and not some slough of despond like a lot of apps have.)
Clear Station, Enter seems to be setting a new destination move point. I question the 100 distance though -- even the witchspace buoy might get hit if the Viper/s are injecting as they near it. And the station definitely would be.
And it's always a trader hitting the buoy after launching from a constore too, though I haven't taken the time to look at its code to see why.
This is strange, because exiting traders have explicit code to make a 90 degree turn shortly after launch. And in my system that does happens with the constores (and main stations were the same AI is used)
And it's always a trader hitting the buoy after launching from a constore too, though I haven't taken the time to look at its code to see why.
This is strange, because exiting traders have explicit code to make a 90 degree turn shortly after launch. And in my system that does happens with the constores (and main stations were the same AI is used)
I see that with normal traders exiting the main station. Not with the code I posted, though. I don't hang around constores that much, so I'm not sure if any traders do it there too.
Are you saying that the procedure I posted does not result in a buoy crash? If not, how can we explain that? Something Linux-specific, perhaps?
Yes, I think all the "interceptor" AIs (intercept, policeIntercept, and traderIntercept) expect to have a target set, since they all start out by doing a performAttack. The example code I posted was intended to reproduce the buoy crash, not to present an example of good AI code.
Yes but giving it a code that is predestinated to lead to a buoy crash is hardly telling anything about normal launches.
When you let them launch with an interceptAI without target, it will hit the following line:
And performIdle just makes a ship maintaining speed an stop with all course corrections. And that way you just have programmed a launching ship to ram the buoy.
You have to take into account that due to the original setup of some of the forums (most notably the Outworld forum) many old posts have been auto-deleted by the BB-software and are lost in the maelstrom of time.
And performIdle just makes a ship maintaining speed an stop with all course corrections. And that way you just have programmed a launching ship to ram the buoy.
That makes sense. As I said earlier, you can make a ship do just about anything with the right (or in this case, wrong) AI code.
I guess the real question I've been chasing is, "Do NPC ships have anything in the way of short-range collision avoidance?" And the answer seems to be "no", or at least "not always". And if I'm not going to write the code for it myself, I have no right to ask you guys to do it. As you rightly point out, it's not normally an issue anyway. That pretty much settles the question for me.
I guess the real question I've been chasing is, "Do NPC ships have anything in the way of short-range collision avoidance?" And the answer seems to be "no", or at least "not always".
Actually they do! When the other entity comes within a certain percentage of the collision radius, all ships enter a collision avoidance behaviour. (old behaviour is put on ice, collision avoidance is executed and when ready the old behaviour is presumed.
However, this avoidance does not work in time when flying at high speed as in attacks.
I guess the real question I've been chasing is, "Do NPC ships have anything in the way of short-range collision avoidance?" And the answer seems to be "no", or at least "not always".
Actually they do! When the other entity comes within a certain percentage of the collision radius, all ships enter a collision avoidance behaviour. (old behaviour is put on ice, collision avoidance is executed and when ready the old behaviour is presumed.
However, this avoidance does not work in time when flying at high speed as in attacks.
So why doesn't it work when flying at relatively low speed into a buoy? I sat and watched a Python bounce off the buoy six or eight times before a cop finally came by and shot him up. I got the impression he'd have done it all day if not interrupted. Looked like a hippo trying to mate with a weather balloon.
And none of the other smaller traders who splashed against the buoy in my tests were going at top speed either. At least not so fast they couldn't have turned away. What am I missing?
I'd like to add a couple updated ai routines to my mod, if this doesn't get added directly to Oolite core. On top of this, is there any other quick-ai-fixes you can recommend?
.....However, this avoidance does not work in time when flying at high speed as in attacks.
So why doesn't it work when flying at relatively low speed into a buoy? I sat and watched a Python bounce off the buoy six or eight times before a cop finally came by and shot him up. I got the impression he'd have done it all day if not interrupted. Looked like a hippo trying to mate with a weather balloon.
And none of the other smaller traders who splashed against the buoy in my tests were going at top speed either. At least not so fast they couldn't have turned away. What am I missing?
Avoidance only take place in behaviours that are allowed to change course. performIdle is excluded from that. And it makes sense, because when you send something away on a collision course you probably want the collision. Remember, performIdle is not supposed to change directions.
Avoiding the collision with the buoy probably would have worked when sending a ship at low speed in a performFly... towards the buoy.
But on the mac we have easier tools to follow such behaviour as the mac version of the debug console can set up a floating window that live monitors a ships behaviour. On other systems you can only make snapshots by constantly pressing shift-H and than looking in the log.
Avoidance only take place in behaviours that are allowed to change course. performIdle is excluded from that. And it makes sense, because when you send something away on a collision course you probably want the collision. Remember, performIdle is not supposed to change directions.
Okay, that does make sense, and I thank you for enlightening me. It also opens up some intriguing OXP possibilities ... hmmm.
Eric Walch wrote:
But on the mac we have easier tools to follow such behaviour as the mac version of the debug console can set up a floating window that live monitors a ships behaviour. On other systems you can only make snapshots by constantly pressing shift-H and than looking in the log.
Well ain't you Mac guys just sooooo special! You're just ... just ... pbbbbbbt! (Clearly I don't have any rational arguments to make. )
Ahh... I love it when non-Mac users are reduced to vulgar noises to express their contempt of the Mac OS!!
But seriously, it would be really nice if a solution could be found to this long-standing quirky behaviour. (the ships collision with inanimate objects, not PC vs.Mac flame wars!!) Maybe a check should be made of the immediate path ahead before accelerating to attack speed?