Scripting Languages
From Dreamworld Virtual World
Contents |
Supported scripting languages
At present time it's possible to use several languages to use for scripting in Dreamworld. Support for more coding languages will follow soon. Scripting doesn't stop with the limited functions from the "Linden Scripting Language" LSL. There is already support for the following programming languages:
- C#
- Java
- LSL
- VB.Net
- LUA
C#
C# is a .Net language. Although it is C# the behaviour is much like LSL in the sense that you still use ll-functions like llSay(), and still use the same events as in LSL. The first 4 characters in your script must be "//cs" for the compiler to treat it as C#.
Example code:
//cs
public void default_event_state_entry()
{
llSay(0, "This is the beginning of an incredible program.");
}
JScript.Net
The first 4 characters in your script must be "//js" for the compiler to treat it as JScript.Net.
Example code:
//js
function default_event_state_entry()
{
llSay(0, "This is an incredibly useless program.");
}
LSL
LSLv2 is the well known Linden scripting language which is used in the virtual world of Second Life. LSL is basically a C#/Java-like language. Although many commands are still being developed, the majority of ll-functions has been implemented and it is possible to make usable scripts. If you want to ensure that the compiler treats your script as LSL you should have "//lsl" as the first 5 letters in script.
Example code:
default
{
state_entry()
{
llSay(0, "This is an incredibly useless program.");
}
}
VB.Net
VB.Net is a .Net language. Although it is VB.Net the behaviour is much like LSL in the sense that you still use ll-functions like llSay(), and still use the same events as in LSL. The first 4 characters in your script must be "//vb" for the compiler to treat it as VB.Net.
Mono does not have compiler for VB.Net, so VB.Net scripts may not work on Mono.
Example code:
//vb
Public Sub default_event_state_entry()
llSay(0, "This is an incredibly useless program.")
End Sub
Lua
At the moment a dedicated Lua scripted engine is under development for Dreamworld. This scripting language is used in many games and is accepted as the industry standard compliant scripting language for games and MMORPG's. Lua is for example used as the scripting and coding language for World of Warcraft.