Page 2 of 2

Re: Mothership and daughter

Posted: Thu Apr 21, 2011 1:04 am
by Lone_Wolf
Well, if torus drive was to be removed entirely, we'd very likely have to find another way for players to not get bored.

1 way this could be done is by pausing the game automatically when a mass lock happens .

no more waiting until you reach (example) the sun, just set the correct course and go do something else

in short : imo removing torus drive will either lead to long boring flight parts, are break immersion.

Re: Mothership and daughter

Posted: Thu Apr 21, 2011 3:05 am
by Switeck
Smivs wrote:
True, but can you judge speed at that distance?
I could probably tell the difference between injectors and torus, since injectors are 7x max normal speed and torus is 32x max normal speed.

Re: Mothership and daughter

Posted: Thu Apr 21, 2011 6:26 am
by Commander McLane
Commander McLane wrote:
Wyvern wrote:
indeed, i already outlined a (i think) simple way to give torus drives to NPCs: a max speed in the neighborhood of torus speed and a script to limit them to normal speeds in "mass lock" situations. and a thrust figure (or another scripting feature)that makes the decelleration noticable.
Just guessing, but I think that wouldn't work. The player's torus speed is 32 x maxSpeed. So you would have to multiply the NPC maxSpeed by 32 and have them usually operate in the range of setSpeedFactorTo: 0.03125, or to be precise setSpeedFactorTo: 0.025, because normal cruising speed is 80% of maxSpeed. My guess is that with these small numbers you would run into precision problems quite soon. And that is apart from the fact that the standard trader AI doesn't even operate that much with explicit factors anymore, but with the convenience method setSpeedToCruiseSpeed, which is defined as 80% of maxSpeed (or 99% of the speed of the slowest escort).

Also not mentioning the overhead for all NPCs constantly monitoring their scanner range for mass-locking entities, and slowing down if they find one.
And another issue: what about injectors? Currently NPCs burn their fuel if they're at a speed between 1 and 7 x maxSpeed. Obviously that wouldn't work with a 32-fold maxSpeed. The would have to use fuel during acceleration or maintaining a speed between speed factor 0.03125 and 0.21875 (= 0.03125 x 7) only, and no set speed between a factor of 0.21875 and 1 would be possible, because that's how it works for the player as well; there are no fractions of torus speed.

In short: this isn't doable by OXP, it would need changes to the code. The current AI system is designed to use the full area between 0 and maxSpeed, and up to 7 x maxSpeed while burning fuel. It couldn't handle something else.

Re: Mothership and daughter

Posted: Sun Apr 24, 2011 9:30 am
by Capt. Murphy
Capt. Murphy wrote:
I'm working on something similar right now - escort contracts with NPC traders. The NPC trader has a 'resonating torus drive' (actually some cheating JS code) that can jump the mother, player, and any NPC escorts for that mother 1/2 a scanner range at a time if there is nothing else around that would normally mass lock a player.
Test OXP for this is released - https://bb.oolite.space/viewtopic.php?f=4&t=9713

Re: Mothership and daughter

Posted: Sun Apr 24, 2011 10:47 am
by Switeck
Commander McLane wrote:
And another issue: what about injectors? Currently NPCs burn their fuel if they're at a speed between 1 and 7 x maxSpeed.
Does NPCs burn fuel at a very slow rate at 1.1-2x of maxSpeed?

Re: Mothership and daughter

Posted: Sun Apr 24, 2011 1:02 pm
by Commander McLane
Switeck wrote:
Commander McLane wrote:
And another issue: what about injectors? Currently NPCs burn their fuel if they're at a speed between 1 and 7 x maxSpeed.
Does NPCs burn fuel at a very slow rate at 1.1-2x of maxSpeed?
I think the burn rate is fixed. One of the code monkeys would know for sure.

In previous version of Oolite there was a bug that made NPCs use fuel whenever they were above their maxSpeed (during acceleration as well as while braking). This was corrected some versions ago. Now fuel is only used for acceleration and maintaining speed, just like for the player.