Difference between revisions of "Energy"

From Second Life Wiki
Jump to navigation Jump to search
(Added lag question)
Line 1: Line 1:
When a function is called it uses energy, when an object runs out of energy all scripts inside it stop executing. Energy slowly returns to an object over time.
When certain dynamic functions are called from a script running on a physical pbject, the object loses energy.  As the object loses energy, the effectiveness of dynamic functions on the object decreases. Energy is mostly relevent for large physical objects. For objects the size of an avatar or smaller, energy effects can generally be ignored.


Please describe how it works! Answer at least the following questions:
Please describe how it works! Answer at least the following questions:
* What's the energy content of an object?
* What's the energy content of an object?
** Depends on the mass
** It is a value from 0.0 to 1.0.  It is not analogous to RL energy.
* Is it possible to calculate the energy consumption of an action, e.g., running a script;
* Is it possible to calculate the energy consumption of an action, e.g., running a script;
** Yes, but it is involved.
** Yes, but it is involved.
Line 9: Line 9:
** 200/mass units of energy per second.
** 200/mass units of energy per second.
* During the energy build-up can we execute all actions needing less energy than the energy available?
* During the energy build-up can we execute all actions needing less energy than the energy available?
** Yes, energy regenerates while the script runs.
** Yes, but their effect will be diminished if the energy is less than 1.0.


Also
Also
* Does the script totally stop when it runs out of energy?  Or pause?
* Does the script totally stop when it runs out of energy?  Or pause?
** The script pauses until enough energy has regenerated to continue.
** Neither.  The script is executed regardless of the energy level.  Only the effect of those functions requiring energy is diminshed.  
* Are events that occur during such an "energy pause" queued up so when it it restarted they are then triggered?
* Are events that occur during such an "energy pause" queued up so when it it restarted they are then triggered?
** Think so yes.
** No.  There is no pause in the script, nor queued events.
* At what rate does energy return (so one can add pauses in scripts for energy to return)?
* At what rate does energy return (so one can add pauses in scripts for energy to return)?
** 200/mass units of energy per second.
** 200/mass units of energy per second.
* Does an object's energy exist per-prim, or per-object (link sets)?
* Does an object's energy exist per-prim, or per-object (link sets)?
 
** Per object.
* How does Energy get treated on Avatars?
* How does Energy get treated on Avatars?
** Under normal circumstances, an avatar is not subject to energy concerns.
* How is energy used in scripts related to lag?
* How is energy used in scripts related to lag?
** No direct relationship, to the extent that lag refers to things not happening in a timely manner.  But energy constraints can make the movement of large physical objects erratic, which might be blamed on lag.

Revision as of 10:19, 4 March 2007

When certain dynamic functions are called from a script running on a physical pbject, the object loses energy. As the object loses energy, the effectiveness of dynamic functions on the object decreases. Energy is mostly relevent for large physical objects. For objects the size of an avatar or smaller, energy effects can generally be ignored.

Please describe how it works! Answer at least the following questions:

  • What's the energy content of an object?
    • It is a value from 0.0 to 1.0. It is not analogous to RL energy.
  • Is it possible to calculate the energy consumption of an action, e.g., running a script;
    • Yes, but it is involved.
  • When the energy is consumed how much time does it take to build it up again?
    • 200/mass units of energy per second.
  • During the energy build-up can we execute all actions needing less energy than the energy available?
    • Yes, but their effect will be diminished if the energy is less than 1.0.

Also

  • Does the script totally stop when it runs out of energy? Or pause?
    • Neither. The script is executed regardless of the energy level. Only the effect of those functions requiring energy is diminshed.
  • Are events that occur during such an "energy pause" queued up so when it it restarted they are then triggered?
    • No. There is no pause in the script, nor queued events.
  • At what rate does energy return (so one can add pauses in scripts for energy to return)?
    • 200/mass units of energy per second.
  • Does an object's energy exist per-prim, or per-object (link sets)?
    • Per object.
  • How does Energy get treated on Avatars?
    • Under normal circumstances, an avatar is not subject to energy concerns.
  • How is energy used in scripts related to lag?
    • No direct relationship, to the extent that lag refers to things not happening in a timely manner. But energy constraints can make the movement of large physical objects erratic, which might be blamed on lag.