YEngine

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(New language extensions)
(New language extensions)
Line 37: Line 37:
 
* [[YENGswitch | switch]]
 
* [[YENGswitch | switch]]
 
* [[YENGbreak | break]]
 
* [[YENGbreak | break]]
* continue
+
* [[YENGcontinue | continue]]
  
 
= Activation =
 
= Activation =

Revision as of 15:34, 19 September 2020

Contents

Summary

This is a fully functional alternative to XEngine for LSL/OSSL scripts

  • Preemptive Multitasking
  • Improved script syntax
  • New language extensions

Preemptive Multitasking

YEngine executes script events using preemptive multitasking.
This means that, at certain control points or when told, a script may release execution, waiting in a queue until it is its turn to execute again.
A script event can run for about 60ms before placed in queue, then on continuations it can run for about 30ms. (This times may change)
The script can also be placed in a sleep state until a sleep time elapses.
This, for example, solves one of XEngine worse problems: llSleep(). llSleep just places the script on a wait queue, until the sleep time expires, using no other execution resources

Improved script syntax

YEngine follows more closely LSL script syntax and execution order. statements like

if(oneKey)
   ...

should now work.

llSomething; // missing()
break; // but see new extensions

are now a errors

complex statements execution order may be different from XEngine. One should always use (..) to enforce it the wanted order! (and in any language)

New language extensions

if the first or second line of a script is (first line can still be script engine and language selection)

yoptions;

Yengine specific language extensions are activated. Note this scripts will not run on XEngine.

Activation

Opensimulation default configuration selects XEngine. To change to YEngine you need to change OpenSim.ini:
[Startup] section:

DefaultScriptEngine = "YEngine"

[Yengine] section:

Enable = true

[Xengine] section:

Enable = false


Note: in theory, opensimulator could run several engines at same time, but we should not do that with X and Y engines.

Personal tools
General
About This Wiki