intelvwi / DSG

Distributed Scene Graph
20 stars 13 forks source link

Created script do not execute when running in DSG #17

Open rryk opened 11 years ago

rryk commented 11 years ago

Hi,

When a script is created by the user, the client machine sends RezScript message to the region. This arrives to the client manager and doesn't get synchronized to the other actors, most notable the scripting actor. For this reason, scripted object doesn't get registered in the script actor and scripts are not executed.

To reproduce:

Expected:

Actual:

This is verified to work in Standalone mode without DSG.

Script code:

default
{
    state_entry()
    {
        llSay(0, "Hello, Avatar!");
    }

    touch_start(integer total_number)
    {
        llSay(0, "Touched.");
    }
}
dslake commented 11 years ago

In its current form, DSG is better suited as a scalable platform for deploying existing workloads. Many of the sandbox-type features like editing scripts, building complex objects, etc do not synchronize between actors. There is an easy workaround to most of these building/editing situations which I will outline here:

Create an object. Add a script. Edit the script to have the desired text. Take the object (or a copy) into your inventory Drop the item from your inventory into the world (rez) The object will come into the world with all of the correct properties and synchronized across all simulators.

I will leave this issue open as a placeholder of the many editing functions that are not yet implemented. The recommendation is that you use a vanilla non-DSG opensimulator region to create your content. Then, save the content as an oarfile and load it into a DSG-enable region on the persistence simulator.

rryk commented 11 years ago

The workaround didn't work for me. After dropping the item from the inventory the script still do not work. Will try the second workaround (using standalone and exporting into oar file).

rryk commented 11 years ago

I managed to load scripted cube into DSG with an oar file, but only state_entry got executed. touch_start doesn't get executed when object is clicked on. Persist actor has logged the following:

18:38:16 - Duplicate event ObjectGrab originated from fa9cc21e-5d13-49b0-aa84-73102a028590, seq# 0 has been received
18:38:17 - Duplicate event ChatFromWorld originated from fa9cc21e-5d13-49b0-aa84-73102a028590, seq# 1 has been received
18:38:27 - [ARCHIVER]: Starting scripts in scene objects
18:38:29 - Duplicate event ChatFromWorld originated from fa9cc21e-5d13-49b0-aa84-73102a028590, seq# 2 has been received
18:38:30 - Duplicate event ChatFromWorld originated from fa9cc21e-5d13-49b0-aa84-73102a028590, seq# 3 has been received
18:38:40 - [REGION SYNC MODULE]:persist/My Region SyncOutUpdates(): An update thread is already running.
18:40:17 - Duplicate event ChatFromWorld originated from fa9cc21e-5d13-49b0-aa84-73102a028590, seq# 4 has been received
18:40:27 - Duplicate event ChatFromWorld originated from fa9cc21e-5d13-49b0-aa84-73102a028590, seq# 5 has been received
dslake commented 11 years ago

It looks like you have debug chat enabled. That will have a serious hit on performance. But about the touch events, that should be working. I will try that out here.

rryk commented 11 years ago

There is the oar file that I used: http://dl.dropbox.com/u/16259710/dsg/region.oar. I don't care about performance at the moment - I am running a debug build to be able to understand how the system works.

kittyfly commented 11 years ago

Please take a look at the wiki page. We updated it with some instructions on how to configure and run a DSG system.

DougOsborn commented 11 years ago

My scripted objects demonstrated this same behavior during the second MOSES performance test last week.

Objects that were scripted to reset on sim restart were working but TOUCH was disabled on those objects. Scripts correctly set new sit positions and initiated animations.

Scripted objects worn as attachments or HUD objects DID have TOUCH enabled and responded correctly.