Skip to content
Joel edited this page Aug 6, 2022 · 10 revisions

Examples

TODO

Multi-instance Examples

TODO

Configuration

TODO

Directives

The engine currently supports two directives. [my-name:name] and [send-to:name]. Through the usage of these two directives, it's possible to run multiple instances of the Engine at once. Each engine just requires a unique name.

Commands

The engine supports multiple commands that may be passed along the command-line. If the engine is launched with commands, then the commands take precedence over any configuration files loaded.

If an instance of the Engine is already running, an attempt to launch an additional instance will instead forward the command-line to the existing instance. Note that this behavior will likely change, as in the future we'll support multiple engine instances at once.

graphics ...

This command has the following arguments:

--win-width

Optional

Specifies the width of the underlying window.

Defaults to 540


--win-height

Optional

Specifies the height of the underlying window.

Defaults to 960


--win-border

Optional

Specifies the border style of the underlying window. Note that this argument is virtually ignored if overlay is disabled.

Valid options are:

  • Resizable
  • Fixed
  • Hidden

Defaults to Resizable


--overlay

Optional

Specifies whether or not to perform the wallpaper overlay. If false, a window is created and the Engine operates out of that window.

Defaults to true


--refresh-rate

Optional

Specifies the graphical refresh rate.

Defaults to 60.0


--vysnc

Optional

Specifies if vsync should be enabled or disabled.

Defaults to true



scene ...

This command has the following arguments:

--default-scene

Optional

Specifies the name of the default, empty scene.
This is the scene that gets initially shown, assuming no other scene is yet loaded.

Defaults to __Default__


--thread-policy-draw

Optional

Specifies the threading policy for the rendering loop. Valid options are:

  • SingleThread
  • MultiThread
  • Progressive
  • MultiThreadProgressive

SingleThread sequentially renders each extension.
MultiThread renders each extension in parallel.
Progressive renders extensions in a rotating manner.

Defaults to SingleThread


--pkg-dir

Optional

Specifies the directory from which the engine will search for packages.

Defaults to ./modules/


--preload

Optional

Specifies a list of scene configuration files to pre-load into the scene store (cache)

Defaults to empty list.


--active-scene

Optional

Specifies the currently active scene.
If the value supplied differs from the currently active scene, switches to the specified scene.

Defaults to the name of the default scene.


--thread-policy-update

Optional

Specifies the threading policy for the update loop. Valid options are:

  • SingleThread
  • MultiThread
  • Progressive
  • MultiThreadProgressive

SingleThread sequentially updates each extension.
MultiThread updates each extension in parallel.
Progressive updates extensions in a rotating manner.

Defaults to SingleThread

scene create ...

This command controls the creation of scenes and resources within scenes.

The command has the following arguments:

--name

Required

Specifies the name of the new scene.

--clone

Optional

Bases a new scene on the scene with the specified name or configuration path.

Defaults to the default scene. See: scene --default-scene.

scene import ...

This command imports a scene from a scene configuration.

The command has the following arguments.

--location

Required

Specifies the scene configuration file to import.

--name

Optional

Specifies the name of the imported scene.

Defaults to the name of the scene within the configuration.

scene export ...

This command exports the scene to the specified configuration file.

The command has the following arguments.

--location

Required

Specified the location to export the scene configuration to.

--name

Optional

Specifies the name to export the scene with.

scene reload ...

This command reloads the current scene and all resources contained therein.

NOT YET IMPLEMENTED

scene reload module ...

This command reloads a module and all actors created from that module.

This command has the following arguments.

--moduleid

Required

The ID of the module to reload.

--keep-state

Optional

Specifies whether or not to retain the state of any actors using the specified module.

Default value false

scene info

This command displays a friendly-string representation of the current scene configuration.