Page 1 of 2

Time Compression?

Posted: Fri Feb 13, 2015 5:53 pm
by ffutures
Every so often I find myself waiting for something to happen - e.g., for a ship to leave a station when I'm hoping to hitch a lift through someone else's wormhole. This can occasionally get pretty boring. What I'd like for these odd occasions is the ability to speed up the clock so that e.g. 2, 4, or 8 minutes pass in game time for every one minute of real time. Obviously this couldn't be used in combat, so maybe it could cut out automatically if there was any change in alert status or any flight control was used.

If you wanted to be really evil there could be a small delay on cutout, say a second or two of perceived time (actually 8-16 seconds) to drop from x8 to x4, another second or two to x2, another second or two to get back to real time.

In game terms this would presumably be something that affected the pilot's perception of time, not time itself, so there might be unintended consequences - for example, asteroids and fragments of them don't trigger a change in alert status, so bits of rock would appear to come in at high speeds, and the pilot might have a nasty surprise if he wasn't paying enough attention to his scanner.

Re: Time Compression?

Posted: Fri Feb 13, 2015 6:20 pm
by Norby
ffutures wrote:
I'm hoping to hitch a lift through someone else's wormhole. This can occasionally get pretty boring.
There are two types of time manipulation in Oolite: time forwarding and time acceleration (TAF). Forwarding can change the clock of the player only so the way to get blue bubbles sooner is the TAF. This is disabled in deployment releases but there is an other 1.80 version where enabled, just scroll down in the download page to the Developer releases. Usage: pause, shift+F then left-right arrow keys. But there are drawbacks, for example decreased accuracy in AI and collision detection, so I recommend to switch back to 1x when something happen.

Your ideas are OXPable by setting the timeAccelerationFactor variable in the proper event handlers but still need to run a developer release of Oolite.

Re: Time Compression?

Posted: Sat Feb 14, 2015 9:17 pm
by ffutures
Norby wrote:
ffutures wrote:
I'm hoping to hitch a lift through someone else's wormhole. This can occasionally get pretty boring.
There are two types of time manipulation in Oolite: time forwarding and time acceleration (TAF). Forwarding can change the clock of the player only so the way to get blue bubbles sooner is the TAF. This is disabled in deployment releases but there is an other 1.80 version where enabled, just scroll down in the download page to the Developer releases. Usage: pause, shift+F then left-right arrow keys. But there are drawbacks, for example decreased accuracy in AI and collision detection, so I recommend to switch back to 1x when something happen.

Your ideas are OXPable by setting the timeAccelerationFactor variable in the proper event handlers but still need to run a developer release of Oolite.
Never very keen on running the developer versions, but thanks for the suggestion.

Re: Time Compression?

Posted: Sat Feb 14, 2015 9:59 pm
by Norby
The developer version (1.80-test) is the same game as the released 1.80, just contain a few more tools described in the download page, which costs a few FPS on an old machine (nothing if your FPS hit the 60 limit due to v-sync), so you can use it safely.

This is not the trunk version (1.81) which contain the newest modifications.

Re: Time Compression?

Posted: Sat Feb 14, 2015 11:06 pm
by ffutures
Norby wrote:
The developer version (1.80-test) is the same game as the released 1.80, just contain a few more tools described in the download page, which costs a few FPS on an old machine (nothing if your FPS hit the 60 limit due to v-sync), so you can use it safely.

This is not the trunk version (1.81) which contain the newest modifications.
Sorry, I get you now. I'm not really a coder so this wouldn't be hugely useful to me, unless setting it is REALLY simple.

Re: Time Compression?

Posted: Sat Feb 14, 2015 11:17 pm
by Cody
Setting the TAF is really simple!

Re: Time Compression?

Posted: Sun Feb 15, 2015 12:23 am
by Diziet Sma
Cody wrote:
Setting the TAF is really simple!
Indeed.. originally it was so simple, in fact, that people were always activating it accidentally, and then wondering why things seemed to be happening so fast.. in the end, a 'safety catch' had to be added to stop unintentional use. :lol:

(basically, now it only works when the framerate display is also active)

Re: Time Compression?

Posted: Sun Feb 15, 2015 12:44 am
by Norby
Press shift+F during flight to see "TAF: x1.00" under the FPS display. Press "p", then horizontal arrow keys to change and "p" again.

Re: Time Compression?

Posted: Sun Feb 15, 2015 12:47 am
by Cody
Lower the TAF to 0.25 - it's like flying through treacle!

Re: Time Compression?

Posted: Sun Feb 15, 2015 12:48 am
by ffutures
OK, that's pretty simple - I'll give it a try. Will I have to reload all the OXPs etc.?

Re: Time Compression?

Posted: Sun Feb 15, 2015 1:36 am
by Diziet Sma
Cody wrote:
Lower the TAF to 0.25 - it's like flying through treacle!
Aye.. makes it easy to get awesome in-combat screenshots, too..

Re: Time Compression?

Posted: Sun Mar 29, 2015 11:28 am
by FukkenSaved
Frankly this game isn't playable without Time Acceleration, and hyperspeed isn't exactly available to the AI. Best case is like with a bunch of sims where it will take you back to 1x when there is a threat. Then you can up TAF to say, 64x without introducing any surprises to the player. Oh, and it would make sense to have normal travel a lot faster overall.
If using the developer version though there are stalls if you have v-sync even allowed so I'd advise disabling it

Re: Time Compression?

Posted: Mon Mar 30, 2015 11:22 am
by Cody
FukkenSaved wrote:
Frankly this game isn't playable without Time Acceleration...
<scratches head> Hmm...

Re: Time Compression?

Posted: Mon Mar 30, 2015 11:58 am
by Diziet Sma
Cody wrote:
FukkenSaved wrote:
Frankly this game isn't playable without Time Acceleration...
<scratches head> Hmm...
Hmmm, indeed.. the Age of Instant Gratification has a lot to answer for. :lol:

Re: Time Compression?

Posted: Mon Mar 30, 2015 2:23 pm
by Norby
FukkenSaved wrote:
take you back to 1x when there is a threat
Welcome! Here is an oxp solution:

Code: Select all

"use strict";
this.name="TAFControl";
this.alertConditionChanged = function(newCondition, oldCondition) {
	if( newCondition == 3 || player.alertHostiles ) { //red alert
 	 	timeAccelerationFactor = 1;
	} else if( newCondition == 1 ) { //green alert
		timeAccelerationFactor = 2; //set to your preference, up to 16
	}
}
FukkenSaved wrote:
up TAF to say, 64x
The current limit is 16x in the core, I think due to the side effects like less accurate NPC calculations what cim listed once.

Another problem is the increasing CPU load, which will degrade your FPS drastically when you hit the limit of your machine. I made a code in [wiki]TimeSlip[/wiki] which maintain at least 15 FPS (customizable in the script) while try to reach the maximum possible TAF. My [email protected]+Intel HD4000 graphics can keep up 3x TAF only when I demand at least 15 FPS (I have many oxps installed).

Using this code it is possible to make a Time Accelerated Torus oxp which can set the maximal TAF during Torus travels what your machine is able to perform. If you or somebody is interested then I can add it into my todo.