FS2LSL

Version 1.0 (most recent stable version) of FS2LSL can be used by clicking here

 

(you do not need to download and install any program (except the Adobe Flash player) to use FS2LSL)

 

Flash Scratch to Linden Scripting Language

FS2LSL is a web-based programming environment intended to simplify the creation of the Linden Scripting Language (LSL) programs used to imbue Second Life (or OpenSim) objects with behavior, and to help you get started developing these programs.  LSL is in the C family of languages, and is distinguished by its inclusion of state as a built-in feature. Many (but certainly not all) LSL library functions are supported, and in particular, all of the functions needed to implement the coding http://inworks.ucdenver.edu/jkb/fs2lsl/Examples in the first five chapters of Scripting Your World: The Official Guide to Second Life Scripting, by Dana Moore, Michael Thome, and Karen Haig, are supported.

You create a program by dragging blocks from the palette onto the stage (the center part of the grey window). Once on the stage, any block with a menu option has that option highlighted in yellow. At any time, you can press Generate LSL to translate your block-defined program to Linden Scripting Language and display the LSL for your program in the LSL script window. The LSL script window is editable. You can also choose to view or hide the XML intermediate language. This XML is also editable, and changes made in the XML window can be converted back to blocks by selecting Load Program from XML Window from the File menu. The Save Program to XML Window menu item translates the block representation to the XML representation. Normally you will not need to use the XML window, but it is a great way to update an FS2LSL program from a prior version (which is occasionally required). You can also save and load your work to/from a file using the File menu (the saved file is just the contents of the XML window.)

You can choose to see all of the features of FS2FSL, or just the basic ones, by clicking on Show Basic or Show Advanced. Some LSL features are not supported by OpenSim. To restrict the use of such features, select Coding for OpenSim. Coding for SL removes these restrictions (this feature is not yet fully implemented).

FS2LSL was originally created to be used in a first year course in computer science for non-majors and majors. It is intended to bridge the sometimes substantial gap between "I understand how to think computationally" and "I am able to express that understanding using a programming language in a syntactically correct manner."  FS2FSL builds upon the Scratch for Second Life (S4SL) work of Eric Rosenbaum of the MIT Media Lab Lifelong Kindergarten Group, which in turn builds upon Scratch, which in turn builds upon Squeak, which in turn builds upon Smalltalk 80, etc. Portions of the AS3 source code for FS2LSL were derived from code created by John Maloney, Evelyn Eastmond and Eric Rosenbaum, all of the MIT Media Lab.  Many thanks to Eric and his colleagues for making this code available.

John K. Bennett

Inworks

CU Denver | Anschutz Medical Campus

 

Version 1.0 (most recent stable version) of FS2LSL can be used by clicking here

 

Version 1.0 corrects a few minor issues and adds support for switch statements, which will only work with the Firestorm Viewer (when enabled), or other viewer that supports C-style switch/case statements. Most of the code http://inworks.ucdenver.edu/jkb/fs2lsl/Examples require version 0.81 or later.

 

Examples of FS2LSL programs you can download and import (most of these examples use features of V0.81)

 

·         Wall: a simple programmable wall

·         Colored Ball: a ball that changes colors when touched

·         Integer Factorial: an example of function use with recursion (that also demonstrates arithmetic overflow)

·         Floating Point Factorial: the above example that does not exhibit overflow

·         Selection Sort: using the LSL list functions

 

The following FS2LSL http://inworks.ucdenver.edu/jkb/fs2lsl/Examples implement all of the LSL programming http://inworks.ucdenver.edu/jkb/fs2lsl/Examples from the first five chapters of Scripting Your World: The Official Guide to Second Life Scripting, by Dana Moore, Michael Thome, Karen Haigh.  This is an excellent book, well worth the $27.00 investment.

 

·         Scripting Your World Listing 1.1

·         Scripting Your World Listing 1.2

·         Scripting Your World Listing 1.3

·         Scripting Your World Listing 1.4

·         Scripting Your World Listing 1.5

·         Scripting Your World Listing 1.6

·         Scripting Your World Listing 1.7

·         Scripting Your World Listing 1.8

·         Scripting Your World Listing 1.9

·         Scripting Your World Listing 1.10

·         Scripting Your World Listing 2.1

·         Scripting Your World Listing 2.2

·         Scripting Your World Listing 2.3

·         Scripting Your World Listing 2.4

·         Scripting Your World Listing 2.5

·         Scripting Your World Listing 2.6

·         Scripting Your World Listing 2.7

·         Scripting Your World Listing 2.8

·         Scripting Your World Listing 2.9

·         Scripting Your World Listing 2.10

·         Scripting Your World Listing 2.11

·         Scripting Your World Listing 2.12

·         Scripting Your World Listing 3.1

·         Scripting Your World Listing 3.2

·         Scripting Your World Listing 3.3

·         Scripting Your World Listing 3.4

·         Scripting Your World Listing 3.5

·         Scripting Your World Listing 3.6

·         Scripting Your World Listing 3.7

·         Scripting Your World Listing 3.8

·         Scripting Your World Listing 3.9

·         Scripting Your World Listing 3.10

·         Scripting Your World Listing 3.11

·         Scripting Your World Listing 3.12

·         Scripting Your World Listing 3.13

·         Scripting Your World Listing 4.1

·         Scripting Your World Listing 4.2

·         Scripting Your World Listing 4.3

·         Scripting Your World Listing 4.4

·         Scripting Your World Listing 4.5

·         Scripting Your World Listing 4.6

·         Scripting Your World Listing 4.7

·         Scripting Your World Listing 4.8

·         Scripting Your World Listing 4.8_Earth

·         Scripting Your World Listing 4.9

·         Scripting Your World Listing 4.10

·         Scripting Your World Listing 5.1

·         Scripting Your World Listing 5.2

·         Scripting Your World Listing 5.3

·         Scripting Your World Listing 5.4

·         Scripting Your World Listing 5.5

·         Scripting Your World Listing 5.6

·         Scripting Your World Listing 5.7

·         Scripting Your World Listing 5.8

·         Scripting Your World Listing 5.9

FS2LSL Source Code

Source Code for FS2LSL (Flash Scratch to LSL) by John K. Bennett is available for non-commercial use under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unsupported License (http://creativecommons.org/licenses/by-nc-sa/3.0/).

For access to FS2LSL Source code, contact the author: jkb@ucdenver.edu

FS2LSL was built using Adobe Flash Builder 4.5 (Standard), but will build successfully with 4.6 or 4.7.

Questions, comments, new FS2LSL http://inworks.ucdenver.edu/jkb/fs2lsl/Examples (and especially bug reports that are reproducible) should be sent to jkb@ucdenver.edu