From 17eb7606dbd9b9d4d9078b924f22c63cabc69081 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 18 Feb 2016 22:59:36 +1000 Subject: Polish up the docs merge. --- docs/BVJ.html | 14 ++++ docs/ClientHamr/README.BVJ | 20 ------ docs/LuaSL-New-scripting-engine.html | 119 +++++++++++++++++++++++++++++++++- docs/Nails.html | 4 ++ docs/SledjHamr/README.LuaSL | 121 ----------------------------------- docs/SledjHamr/README.nails | 14 ---- docs/index.html | 25 ++++---- 7 files changed, 147 insertions(+), 170 deletions(-) delete mode 100644 docs/ClientHamr/README.BVJ delete mode 100644 docs/SledjHamr/README.LuaSL delete mode 100644 docs/SledjHamr/README.nails diff --git a/docs/BVJ.html b/docs/BVJ.html index ab1499c..ce1a24e 100644 --- a/docs/BVJ.html +++ b/docs/BVJ.html @@ -3,6 +3,10 @@ +

BVJ is extensions to the BVH animation format used by SL technology. +It's in the ClientHamr section coz on the server side, they are just +dealt with as blobs to be sent to the viewers. This may change if we +implement animating link sets, and interaction with the sim physics.

Syntax

This example BVH is 20 lines 505 characters, and defines a pointless animation on a trivial skeleton.

   HIERARCHY
@@ -157,5 +161,15 @@
 

Fang Said: See the very last paragraph of SledjHamr, the "random notes from my old Web 3.0 document " section at the bottom, to see one suggested method of moving your hand.

Alice Replied: Looks cool, but requires Inverse Kinematics (if you mean the touch commands), or some puppeteer protocol that I know nothing about.

What I imagine right now is InworldAnimationEditor

+

links

+

Some useful links for actually writing animation code -

+Portal:Computer_graphics +3D_computer_graphics +Skeletal_animation +Morph_target_animation +Inverse_kinematics +

 

+bvhacker.com +bvh_file_specification diff --git a/docs/ClientHamr/README.BVJ b/docs/ClientHamr/README.BVJ deleted file mode 100644 index a232320..0000000 --- a/docs/ClientHamr/README.BVJ +++ /dev/null @@ -1,20 +0,0 @@ -Refer to - docs/BVJ.html - -BVJ is extensions to the BVH animation format used by SL technology. -It's in the ClientHamr section coz on the server side, they are just -dealt with as blobs to be sent to the viewers. This may change if we -implement animating link sets, and interaction with the sim physics. - -Also - -====== - -Some useful links for actually writing animation code - - -https://en.wikipedia.org/wiki/Portal:Computer_graphics -https://en.wikipedia.org/wiki/3D_computer_graphics -https://en.wikipedia.org/wiki/Skeletal_animation -https://en.wikipedia.org/wiki/Morph_target_animation -https://en.wikipedia.org/wiki/Inverse_kinematics - -http://bvhacker.com/ -http://www.character-studio.net/bvh_file_specification.htm diff --git a/docs/LuaSL-New-scripting-engine.html b/docs/LuaSL-New-scripting-engine.html index b6f9cfa..b8c730f 100644 --- a/docs/LuaSL-New-scripting-engine.html +++ b/docs/LuaSL-New-scripting-engine.html @@ -3,6 +3,14 @@ +

LuaSL is a Lua based LSL scripting engine that will aim for LSL +compatibility first, then adding Lua extensions. It aims to replace the +woeful XEngine from OpenSim, and at a later stage, be the basis for a +client side scripting engine.

+

To compile this, you will need Enlightenment Foundation Libraries (EFL) +installed in either /opt/e17 or /usr. These are typical places it get's +installed in. You will also need flex. The rest of the dependencies +are in the ../libraries directory.

write our own

I had considered in the SledjHamr document writing a new script engine from scratch in Lua. This is what I wrote -

"I'd love to write a Lua implementation of LSL, I'm sure Alice would want to write a Scheme one."

@@ -36,11 +44,120 @@

Design

There are a number of ways we can go about this. Do we write the entire scripting engine in Lua, and only interface with C# for those things we really need to in order to get OpenSim to do in world stuff? Do we write a LSL to Lua translation layer that then compiles the Lua? The OpenSim engine I understand does that, translates LSL to C# then compiles that to .NET. Could we start with a higher level of Lua that interfaces with the existing LSL support functions in OpenSim? Can we even rely on those LSL support functions being a stable API? Should we start by experimenting with Lua's meta language features, see how close we can get it to look like LSL syntax? Perhaps concentrate on those parts of the job that don't require interfacing to OpenSim, and hope that SledjHamr can meet it half way to avoid the entire .NET thing?

I choose to do those last two things - see how far I can get Lua to look like LSL, and concentrate on the parts that don't require interfacing to OpenSim, hoping that I can avoid the entire .NET thing.

+ +

The basic design will be made up as I go along, but so far I have this -

+ +

A parser parses an LSL script, validating it and reporting errors.

+ +

A translator takes the result of the parse, and converts it into Lua +source. Each LSL script becomes a Lua state. LSL states are handled as +Lua tables, with each LSL state function being a table function in a +common metatable. LL and OS functions are likely to be C or Lua +functions. Careful testing should be done with LuaJIT FFI, sandboxing, +and performance testing.

+ +

The Lua source is compiled by the Lua compiler.

+ +

LuaJIT is used as the Lua compiler, library, and runtime.

+ +

Luaproc is used to start up operating system threads and hand Lua states +between them. Luaproc messaging is also being used, but might need to +change to edje messaging. Note - luaproc has been extensively rewritten +for this project, mostly converting it to use EFL. That rewrite +substantially shrunk the source code. Then it was all rewritten again +to use EFL threads, and cooperative multitasking.

+ +

THIS IS WHERE WE ARE RIGHT NOW.

+ +

Should implement embedded Lua somehow. Probably the best thing to do is +to have comments like -

+ +

//Lua: local t = {1, 3, 42, x='something', 'something else}

+/*Lua: print(t.x) */

+ +

The LSL parser picks these up and stores them in the AST as Lua +snippets, then the compiler output functions just inserts them in the +Lua code it is generating. Obviously these Lua snippets can access the +rest of the generated Lua code. They should also be able to access +skang and thus do proper GUI stuff on viewers that support skang.

+ +

Nails will be used to pump commands in and out of the LuaSL system. +Incoming commands invoke LSL events via the LuaSL state metatable. LL +and OS functions that impact the world will be converted to nails +commands sent to the command pump.

+ +

Initially, since this is the first thing being written, a nails command +pump client needs to be installed into OpenSim's C# stuff. Though it +might be possible to talk directly to ROBUST instead. Think I'll try +the ROBUST route, see how far I can get. That's the general principle +applying in all of this - try to avoid C# and see how for we can get. +lol

+ +

On the other hand, might be better to leverage the existing C# +implementations of LSL functions, just to get things up and running +quickly. To that end, a protocol involving exchanging snippets of Lua +over a network socket has been developed, and the next step is to write +the C# side. sigh

+ +

A watchdog thread should be used to make sure no LuaSL script spends +forever processing any event.

+ +

Some form of serialization will need to be created for saving script +state during shutdowns, passing script state to other threads / +processes / computers. Apparently Lua is good at this.

+ +

There will have to be a MySQL (and maybe SQLite) client in the system, +so we can talk directly to the local sim database. Esskyuehl may be +suitable, though it's still in the prototype stage.

+ +

Email, HTTP, and XML-RPC might need to be dealt with by us. A ROBUST +client will be needed to. Azy might be suitable, but it's also in +prototype.

+ +

An object is a file system directory, full of LSL scripts as text files, +notecards as text files, animations as BVH (or later BVJ) files, etc. +There will be some sort of metadata in place. This could be created by +our own OpenSim compatible cache module.

+ + +

Test harness.

+-------------

+ +

I'll build a test harness. It will be based on EFL Edje Lua, with +buttons for triggering LSL events, SL style dialogs, and other goodies.

+ +

The initial goal will be to run standard MLP scripts. They have minimal +interface to the world, and exercise quite a bit of the rest of LSL. +They are also quite common, and sometimes responsible for a lot of the +script running load.

+ +

Later I should add stock standard OpenCollar scripts from SL. They are +a bitch to get working under OpenSim, so would be good compatability +tests.

+ +

Various eina logging domains might be used to handle whisper, say, shout, +etc.

+ +

Performance testing will have to be done on 5000 scripts, to see how +that compares against XEngine.

+ +

The test harness became the love world server.

+ + +

TODO

+

----

+ +

Useful for limiting the amount of time scripts use - +

https://groups.google.com/forum/#!topic/lua-alchemy-dev/3bDPk2aQ8FE

+

http://stackoverflow.com/questions/862256/how-can-i-end-a-lua-thread-cleanly

+ + +

 

onefangs implementation ideas

I'm gonna write an LSL script engine in Lua and C. At least initially, I'll pretend I can use SledjHamr instead of OpenSim, and see how far I get. The source is at https://github.com/onefang/SledjHamr on the experimental branch.

 

-

You’re in a maze of twisty little quirks, all different.

+

You're in a maze of twisty little quirks, all different.

LSL is known for being more quirks than features. Some of the quirks are just limitations that we can get rid of. Some we will have to replicate just to be compatible. OpenSim adds it's own quirks on top of those, but one of the points of doing this is to avoid that particular set of quirks. I'll create two variations, using the first line comment hack OpenSim invented to choose between them. The default is to use the quirky one, where an effort is made to replicate the full quirkiness of LSL. The other choice has no quirks at all, and even lets Lua features be mixed in. This Lua flavoured LSL will be the first one to work on, as it will be a lot easier.

 

Making Lua look like LSL

diff --git a/docs/Nails.html b/docs/Nails.html index 2885faf..1f99f4d 100644 --- a/docs/Nails.html +++ b/docs/Nails.html @@ -2510,6 +2510,10 @@ +

Not sure where else to put this, but nails I think is the bit that drives the network traffic the most -

+low-latency-requires-smart-queuing-traditional-aqm-is-not-enough +

Another article that deals with network issues in a 3D networked game -

+the_internet_sucks_or_what_i_


This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

diff --git a/docs/SledjHamr/README.LuaSL b/docs/SledjHamr/README.LuaSL deleted file mode 100644 index 7556bf7..0000000 --- a/docs/SledjHamr/README.LuaSL +++ /dev/null @@ -1,121 +0,0 @@ -Refer to - LuaSL_New_scripting_engine.html - -LuaSL is a Lua based LSL scripting engine that will aim for LSL -compatibility first, then adding Lua extensions. It aims to replace the -woeful XEngine from OpenSim, and at a later stage, be the basis for a -client side scripting engine. - -To compile this, you will need Enlightenment Foundation Libraries (EFL) -installed in either /opt/e17 or /usr. These are typical places it get's -installed in. You will also need flex. The rest of the dependencies -are in the ../libraries directory. - - -Design. -------- - -The basic design will be made up as I go along, but so far I have this - - -A parser parses an LSL script, validating it and reporting errors. - -A translator takes the result of the parse, and converts it into Lua -source. Each LSL script becomes a Lua state. LSL states are handled as -Lua tables, with each LSL state function being a table function in a -common metatable. LL and OS functions are likely to be C or Lua -functions. Careful testing should be done with LuaJIT FFI, sandboxing, -and performance testing. - -The Lua source is compiled by the Lua compiler. - -LuaJIT is used as the Lua compiler, library, and runtime. - -Luaproc is used to start up operating system threads and hand Lua states -between them. Luaproc messaging is also being used, but might need to -change to edje messaging. Note - luaproc has been extensively rewritten -for this project, mostly converting it to use EFL. That rewrite -substantially shrunk the source code. Then it was all rewritten again -to use EFL threads, and cooperative multitasking. - -THIS IS WHERE WE ARE RIGHT NOW. - -Should implement embedded Lua somehow. Probably the best thing to do is -to have comments like - - -//Lua: local t = {1, 3, 42, x='something', 'something else} -/*Lua: print(t.x) */ - -The LSL parser picks these up and stores them in the AST as Lua -snippets, then the compiler output functions just inserts them in the -Lua code it is generating. Obviously these Lua snippets can access the -rest of the generated Lua code. They should also be able to access -skang and thus do proper GUI stuff on viewers that support skang. - -Nails will be used to pump commands in and out of the LuaSL system. -Incoming commands invoke LSL events via the LuaSL state metatable. LL -and OS functions that impact the world will be converted to nails -commands sent to the command pump. - -Initially, since this is the first thing being written, a nails command -pump client needs to be installed into OpenSim's C# stuff. Though it -might be possible to talk directly to ROBUST instead. Think I'll try -the ROBUST route, see how far I can get. That's the general principle -applying in all of this - try to avoid C# and see how for we can get. -lol - -On the other hand, might be better to leverage the existing C# -implementations of LSL functions, just to get things up and running -quickly. To that end, a protocol involving exchanging snippets of Lua -over a network socket has been developed, and the next step is to write -the C# side. sigh - -A watchdog thread should be used to make sure no LuaSL script spends -forever processing any event. - -Some form of serialization will need to be created for saving script -state during shutdowns, passing script state to other threads / -processes / computers. Apparently Lua is good at this. - -There will have to be a MySQL (and maybe SQLite) client in the system, -so we can talk directly to the local sim database. Esskyuehl may be -suitable, though it's still in the prototype stage. - -Email, HTTP, and XML-RPC might need to be dealt with by us. A ROBUST -client will be needed to. Azy might be suitable, but it's also in -prototype. - -An object is a file system directory, full of LSL scripts as text files, -notecards as text files, animations as BVH (or later BVJ) files, etc. -There will be some sort of metadata in place. This could be created by -our own OpenSim compatible cache module. - - -Test harness. -------------- - -I'll build a test harness. It will be based on EFL Edje Lua, with -buttons for triggering LSL events, SL style dialogs, and other goodies. - -The initial goal will be to run standard MLP scripts. They have minimal -interface to the world, and exercise quite a bit of the rest of LSL. -They are also quite common, and sometimes responsible for a lot of the -script running load. - -Later I should add stock standard OpenCollar scripts from SL. They are -a bitch to get working under OpenSim, so would be good compatability -tests. - -Various eina logging domains might be used to handle whisper, say, shout, -etc. - -Performance testing will have to be done on 5000 scripts, to see how -that compares against XEngine. - -The test harness became the love world server. - - -TODO ----- - -Useful for limiting the amount of time scripts use - -https://groups.google.com/forum/#!topic/lua-alchemy-dev/3bDPk2aQ8FE -http://stackoverflow.com/questions/862256/how-can-i-end-a-lua-thread-cleanly diff --git a/docs/SledjHamr/README.nails b/docs/SledjHamr/README.nails deleted file mode 100644 index 7512944..0000000 --- a/docs/SledjHamr/README.nails +++ /dev/null @@ -1,14 +0,0 @@ -Refer to - Nails.html - -Nails bangs it all together, mostly via the command pump. - - -Not sure where else to put this, but nails I think is the bit that -drives the network traffic the most - - -http://gettys.wordpress.com/2013/07/10/low-latency-requires-smart-queuing-traditional-aqm-is-not-enough/ - - -Another article that deals with network issues in a 3D networked game - - -http://www.gamasutra.com/view/feature/131781/the_internet_sucks_or_what_i_.php?print=1 diff --git a/docs/index.html b/docs/index.html index f4f90ac..83827b5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -15,40 +15,37 @@ Welcome to the home of SledjHamr!
  • SledjHamr Tearing down the garden walls.
  • Server side -
  • -
  • Nails How to put it all together.
  • -
  • nails Nails bangs it all together.
  • +
  • Nails bangs it all together, mostly via the command pump.
  • mumble Voice integration.
  • -
  • libraries The various libraries used.
  • +
  • The various libraries used.
  • Croquet integration Just an idea, but we should support other virtual world tech if we can.
  • ClientHamr How to rip code out of the client and make it better.
  • -- cgit v1.1