Witchspace Time Expansion

An area for discussing new ideas and additions to Oolite.

Moderators: another_commander, winston

Post Reply
User avatar
Wyrm
Poor
Poor
Posts: 5
Joined: Tue Jan 24, 2006 12:41 pm
Location: ToeKeyOO

Witchspace Time Expansion

Post by Wyrm »

Not to argue with the laws of Witchspace, however, currently the time required to travel in witchspace is governed by the formula (line 3601 in PlayerEntity.m)
(in the enterWitchspace function)

Code: Select all

ship_clock_adjust = distance * distance * 3600.0;               // LY * LY hrs

which shows that a single 1LY jump will take 3600 sec or 1 hour, whereas a 7LY hustle will take 49 times longer, or 49 hours.
Advanced tinkering to increase the range of Hyperspace to say 50 LY, has the wonderful effect of making that 50LY journey in 2500 hours, or a little under 104 days. 100LY takes, <gasp> 10,000 hours. But then, it sure beats walking.

Just wondering if I'm missing something, or should it be exponentially shorter, rather than longer in which case it's squareroot(distance in LY) * 3600?
The wonderful description on http://www.elite.hughesd.co.uk/ seems to point to a root time, than squared time effect.

Or Witchspace time could be based on a constant equation, taking the same time to travel any distance on the universal constant of 7.16 (or 7.09 for PAL) hours?

If altered, it has to be changed in another location that I know of: Universe.m which estimates the travel time for Passengers and cargo... otherwise, making these is a snap.
:D

-Wyrm
neilplus
Competent
Competent
Posts: 59
Joined: Tue Nov 22, 2005 7:01 pm
Location: Germany

Post by neilplus »

Makes you wonder why they don't do lots of little jumps (from beacon to beacon, say) until they reach the target system, instead of making one huge, exponentially slower leap.

Maybe the Thargoids can only spot you on the transition to/from witchspace, so lots of little jumps are a no-no :)
User avatar
aegidian
Master and Commander
Master and Commander
Posts: 1160
Joined: Thu May 20, 2004 10:46 pm
Location: London UK
Contact:

Post by aegidian »

There is a reason for the LY*LY*3600 formula.

It came with the introduction of timed missions into Oolite, which also forced the introduction of the clock.

I wanted to journeys to take days to make the economy of spaceflight work 'right' and I was going to settle on a directly proportional relationship between distance and time.

That would have made the shortest distance route always the best choice for the trading journeys. Although more 'realistic' this was also more deterministic. Instead I chose the d-squared method because it places more choices in the player's hands -

"Do I go there directly? Or should I choose a route with more jumps because it's quicker? What about side-trips? What are the systems on the way? Is it worth avoiding the anarchies?"

Because of these additions to the gameplay I like the d-squared relation so much I'd be very reluctant to change it.
"The planet Rear is scourged by well-intentioned OXZs."

Oolite models and gear? click here!
neilplus
Competent
Competent
Posts: 59
Joined: Tue Nov 22, 2005 7:01 pm
Location: Germany

Post by neilplus »

Ahh. That makes sense. I had actually encountered some of these questions whilst performing freight contracts, but they'd never quite coalesced into a coherent whole.

Trying out v1.62 for Linux tonight :)
User avatar
Selezen
---- E L I T E ----
---- E L I T E ----
Posts: 2513
Joined: Tue Mar 29, 2005 9:14 am
Location: Tionisla
Contact:

Post by Selezen »

Hmm. I may have to do a little rewrite on that article on my site then.
User avatar
johnsmith
Deadly
Deadly
Posts: 141
Joined: Fri Sep 22, 2006 10:32 am
Location: Teance
Contact:

Post by johnsmith »

So how does the scriptTimer_number varibale work? Does it go for real time, or game time? I'm trying to create a timed OXP mission.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2862
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

According to the wiki, we're discouaged from using the timer. Another way though to measure time is with a jump counter. If the player makes too many jumps in your OXP then he gets "timed-out". I did it by checking for a non-existant ship on exiting hyperspace. When the script doesn't find any it incraeses the jump count variable by one.

Code: Select all

{ 
					conditions = ( 
 						"galaxy_number equal 6", 
						"status_string equal STATUS_EXITING_WITCHSPACE" 
					); 
					do = ( "checkForShips: nosuchship", 
						{ conditions = ( "shipsFound_number equal 0" ); 
						do = ( "increment: mission_assassins_jumpcount" ); 
						}, 
					); 
				},
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
Post Reply