Game Development Reference
In-Depth Information
FIGURE 14.1 Screen grab from OpenSim showing architectural columns with “twist response” relexive scripting,
developed by Jon Brouchoud (Keystone Bouchard in Second Life). The LSL script makes them twist in response to
avatar proximity.
These observations provide valuable insight into how interactivity can be developed and enhanced.
Humans, and the avatars they inhabit, have a fundamental need to interact with their environment, and a
good designer utilizes this to make his or her scripted designs part of a powerful and immersive environment.
14.3 AN OVERVIEW OF HOW LSL SCRIPTS WORK
Because writing commands out in binary or even machine language is cumbersome at best, we have devel-
oped programming languages like C, C++, C# (pronounced “C sharp”), Java, and so on to enable our com-
munication with the computer. The scripting languages used in Second Life and OpenSim (LSL and OSSL)
are related to, but different from, programming languages like C, C++, C#, or Java. LSL language and the
scripts made from it are designed to help you communicate with the server about the things you would like
your content to do, in a way that is easier to understand, manage, and modify.
There is a pivotal scene in the Wizard of Oz , the 1939 MGM ilm, when Dorothy discovers that the “great
and powerful Oz” is just a middle-aged man pulling levers on a machine behind a curtain. Dorothy quickly
comes to the realization that she could just as easily control these magical devices, and suddenly the whole
status of Oz changes in her mind. People who write the scripts in virtual worlds may seem like wizards.
Let us pull the curtain back, look at their tools, and try running the magic ourselves.
A script is really just a set of instructions that is running on the server and referenced by your content.
You have probably seen a similar thing in real life. For example, look at this snippet of a script you might
write for a movie scene.
Dorothy: Wow! That is some magic-making machinery you have there! [She moves forward.]
A script for objects in a virtual world shares several characteristics with that bit of screenwriting: (1) It
identiies what (or who in this case) is directed to do something, and (2) it deines what that thing or person
Search WWH ::




Custom Search