[Opensim-dev] SOG and scripting

Diva Canto diva at metaverseink.com
Tue Sep 2 15:56:16 UTC 2008


Hi,

You're probably all busy at the Virtual Worlds conference :-)
I left a couple of comments in the obscure talk page of the XML 
Serialization, I bet no one saw that; so I'm repeating the most 
important one here:

    * Sub-classing SceneObjectGroup:

I'm working on simulations that involve subclassing SceneObjectGroup. 
The current serialization implementation doesn't work for them, because 
it always instantiates objects of type SceneObjectGroup. We should 
account for the sub-type of the object in the XML, and instantiate the 
right sub-type. Includes having to override the xml-related methods of 
SceneObject, so make those virtual.

-----

My recent experience with writing subclasses of SOG (and IClientAPI, but 
that's another topic) opened my mind to the fantastic architecture that 
you guys have put in place here. I suspect that not many people realize 
the power of this architecture yet.

So, this other thought popped in my mind: why not implement scripted 
objects as instances of sub-classes of SOG, and bypass script 
interpreters and their use of reflection altogether? Something like 
this: whenever you attach scripts to an object, the OS runtime would 
generate (assemble, really) CIL bytecodes representing a subclass of SOG 
implementing those scripts. An instance of that class would then replace 
the original object, preserving all the important properties and IDs. 
Rez would be nothing but new-ing those subclasses.
That way there would be only one uniform representation of active scene 
objects, independent of whether they were written directly in modules or 
written by scripting them inworld, and it would use this great API that 
you have put in place. I bet it would make a lot things a lot faster.

I know it's not as easy as I make it sound, and there are many tricky 
details, but... is there any fundamental obstacle to this?

Diva / Crista

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080902/4bfc8544/attachment-0001.html>


More information about the Opensim-dev mailing list