Time Compression?

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

User avatar
ffutures
---- E L I T E ----
---- E L I T E ----
Posts: 2172
Joined: Wed Dec 04, 2013 12:34 pm
Location: London, UK
Contact:

Time Compression?

Post 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.
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Time Compression?

Post 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.
User avatar
ffutures
---- E L I T E ----
---- E L I T E ----
Posts: 2172
Joined: Wed Dec 04, 2013 12:34 pm
Location: London, UK
Contact:

Re: Time Compression?

Post 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.
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Time Compression?

Post 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.
User avatar
ffutures
---- E L I T E ----
---- E L I T E ----
Posts: 2172
Joined: Wed Dec 04, 2013 12:34 pm
Location: London, UK
Contact:

Re: Time Compression?

Post 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.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Time Compression?

Post by Cody »

Setting the TAF is really simple!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Time Compression?

Post 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)
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Time Compression?

Post 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.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Time Compression?

Post by Cody »

Lower the TAF to 0.25 - it's like flying through treacle!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
ffutures
---- E L I T E ----
---- E L I T E ----
Posts: 2172
Joined: Wed Dec 04, 2013 12:34 pm
Location: London, UK
Contact:

Re: Time Compression?

Post by ffutures »

OK, that's pretty simple - I'll give it a try. Will I have to reload all the OXPs etc.?
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Time Compression?

Post 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..
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
FukkenSaved
Mostly Harmless
Mostly Harmless
Posts: 2
Joined: Sun Mar 29, 2015 11:22 am

Re: Time Compression?

Post 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
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Time Compression?

Post by Cody »

FukkenSaved wrote:
Frankly this game isn't playable without Time Acceleration...
<scratches head> Hmm...
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Time Compression?

Post 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:
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Time Compression?

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