Mothership and daughter

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: Mothership and daughter

Post 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.
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Mothership and daughter

Post 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.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Mothership and daughter

Post 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.
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: Mothership and daughter

Post 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
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Mothership and daughter

Post 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?
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Mothership and daughter

Post 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.
Post Reply