Difference between revisions of "Time scales in Oolite"

From Elite Wiki
m (Game clock time: changed examples)
(Added notes on Frame Rate)
Line 1: Line 1:
 
When writing scripts or [[shaders in Oolite|shaders]] for [[Oolite]], there are several different '''time scales''' to consider. This article defines them and provides nomenclature to simplify discussions where the distinctions matter.
 
When writing scripts or [[shaders in Oolite|shaders]] for [[Oolite]], there are several different '''time scales''' to consider. This article defines them and provides nomenclature to simplify discussions where the distinctions matter.
  
=== Player real time ===
+
== Player real time ==
 
This is the time frame of the human being playing the game. By definition, it advances at a rate of one '''player real time second''' per real-world second.
 
This is the time frame of the human being playing the game. By definition, it advances at a rate of one '''player real time second''' per real-world second.
  
=== Game real time ===
+
== Game real time ==
 
This is the time frame of the game simulation. Assuming a properly-functioning computer, it runs at one '''game real time second''' per player real time second, except when the game is paused, at which time it is suspended. However, it can be run at different rates using the ''time acceleration factor'' testing facility. This is the time frame that’s generally relevant to shaders and AIs.
 
This is the time frame of the game simulation. Assuming a properly-functioning computer, it runs at one '''game real time second''' per player real time second, except when the game is paused, at which time it is suspended. However, it can be run at different rates using the ''time acceleration factor'' testing facility. This is the time frame that’s generally relevant to shaders and AIs.
  
=== Game clock time ===
+
== Game clock time ==
 
This is the time displayed on the clock on the HUD. It normally runs at a rate of one '''game clock time second''' per game real time second. However, some in-game events take a significant amount of clock time without providing an opportunity for gameplay; examples include buying equipment, launching from stations and jumping into witchspace. When such an event occurs, the HUD clock shows the label “adjusting” and runs faster than game real time. This time frame is relevant to missions with a time limit.
 
This is the time displayed on the clock on the HUD. It normally runs at a rate of one '''game clock time second''' per game real time second. However, some in-game events take a significant amount of clock time without providing an opportunity for gameplay; examples include buying equipment, launching from stations and jumping into witchspace. When such an event occurs, the HUD clock shows the label “adjusting” and runs faster than game real time. This time frame is relevant to missions with a time limit.
 +
 +
== Other matters ==
 +
=== Frame Rate ===
 +
Of your monitor. This is affected by your computer hardware, software and which OXPs you are running. It should ideally be in excess of 60fps, with 30fps being a minimum.
 +
*It can be measured with cag's [[Javascript_optimization_tips#Frame_rate|fps_monitor.oxz]] which outputs into your [[Latest.log]]
 +
*Pressing <font color="Red">'''F'''</font> (in the '''TR''' (Developer's Test Release) versions of Oolite) displays frame rate, object- and collision-counter and player's pwm-coordinates.
 +
*[https://bb.oolite.space/viewtopic.php?t=4659 The nature of OXP on frame rate...] (2008)
 +
*See also [[Oolite JavaScript Reference: Timer|Timers]] and [[Oolite JavaScript Reference: Frame Callbacks |Frame Callbacks]]
  
 
== Links ==
 
== Links ==

Revision as of 10:43, 26 June 2025

When writing scripts or shaders for Oolite, there are several different time scales to consider. This article defines them and provides nomenclature to simplify discussions where the distinctions matter.

Player real time

This is the time frame of the human being playing the game. By definition, it advances at a rate of one player real time second per real-world second.

Game real time

This is the time frame of the game simulation. Assuming a properly-functioning computer, it runs at one game real time second per player real time second, except when the game is paused, at which time it is suspended. However, it can be run at different rates using the time acceleration factor testing facility. This is the time frame that’s generally relevant to shaders and AIs.

Game clock time

This is the time displayed on the clock on the HUD. It normally runs at a rate of one game clock time second per game real time second. However, some in-game events take a significant amount of clock time without providing an opportunity for gameplay; examples include buying equipment, launching from stations and jumping into witchspace. When such an event occurs, the HUD clock shows the label “adjusting” and runs faster than game real time. This time frame is relevant to missions with a time limit.

Other matters

Frame Rate

Of your monitor. This is affected by your computer hardware, software and which OXPs you are running. It should ideally be in excess of 60fps, with 30fps being a minimum.

Links

Time for the different definitions of Game clock time according to Aegidian, Selezen & Cim.