Suggestion: Multi-source script bundles/script-assemblies

So, piggybacking on these threads:




Although my preferred solution to large-scale scripts and script libraries and alternate Mono/CLR-supported .Net languages like F# is the ability to upload compiled assemblies instead of .cs source files, I realize there are a couple of potential barriers to this on a technical level. The primary barrier is probably security verification of scripts (which might be easier with .cs code than bytecode).

However, for large-scale scripting, the one-cs-file-at-a-time system is very limiting and cumbersome, and the inability to write re-usable libraries and utilities for multiple scripts is particularly limiting. 

So, this is a suggestion for an alternative to uploading assemblies that bypasses the issues and integrates, I think, easily in the current system. Instead of uploading assemblies, Sansar could support a script bundle format that supports multiple source files. These bundles would basically be just a .zip file with all the source files in it. Simple utilities on the command line could produce one from a source directory (or just right-click and Send-to-zip in windows).

These bundles would then be compiled into a single assembly on the server side. Users could optionally provide assembly metadata in the usual way (with static attributes, e.g. in a Properties.cs file), which would allow you reference one script bundle from another. Effectively it's a source-only replacement for a compiled .Net assembly.

In the UI, once you've uploaded a bundle, you can attach a specific class from the bundle to an object, instead of just a specific .cs file.

This bundle support would be in addition to simple single-file scripting support, and would enable more sophisticated scripts to be created - as well as help large and complicated worlds share common code between lots of different object scripts, thus enabling far more dynamic and interesting content.


Please sign in to leave a comment.