Author Topic: Embedding the $ Script Engine.  (Read 3500 times)

0 Members and 1 Guest are viewing this topic.

Offline Charles Pegge

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 704
    • Charles Pegge
Embedding the $ Script Engine.
« on: August 15, 2007, 02:28:48 PM »
I am working on a DLL (and .SO) capable version of $. I will be testing its mettle on the Viewer2 demo, which contains Opengl, dynamics, and a GUI.

Giving some thought to the most useful and efficient interfaces, here is a sketch of how it will work:

Code: [Select]
'   3D host example
  ===================
  |      Load       |
  |   Initialise    |
  |      Link       |
  |=================|
  |     CYCLE:      |__
  |-----------------|  \
  | Frame Generator |  |
  |-----------------|  |
  | User interface  |  ^
  |-----------------|  |
  |    Dynamics     |  |
  |-----------------|  |
  |  Script Engine  |  |
  |-----------------|  |
  |     REPEAT      |__/
  |=================|
  |    Terminate    |
  |     Unload      |
  ===================


  INTERACTIONS WITH SCRIPT:

 1 By passing values:
   Host copies values into
   Script Engine's Variables

 2 By Calling script Functions

 3 By Variable links:
   Script accesses Host variables
   using pointering and
   type conversion if needed.

  ====================
  | Script Variables |
  ====================
    | | | INDIRECTION
    | | |   LINKS  |
    |  \ \____    /
    |   \     \  |
  ====================
  | Host Variables   |
  ====================


The $ script engine is also capable of running asynchronously in a thread, but, that is left to the host to set up.and manage.

As a DLL it is intended to be language-independent, with interfaces for Asciiz and length specified strings.
« Last Edit: August 17, 2007, 08:28:26 PM by Charles Pegge »