SL Cert - Intermediate Scripting

From Second Life Wiki
Jump to navigation Jump to search

Overview

Criteria required for persons to become certified in intermediate scripting.

Audience

Persons who wish to demonstrate competence in intermediate LSL scripting.

Prerequisites

Applicant must hold basic scripting certification, basic texture certification, and basic building certification.

(Recommended) An application should have a basic understanding of algebraic functions.

Criteria for testing to intermediate level

Scripting includes a wide variety of categories. At the intermediate level the different categories are broken out separately. The different categories are given below with the associated topics. Note that there is some overlap between categories. This is because the different topics can not be easily divided and are related. Some topics may be necessary for multiple categories and are listed multiple times to avoid prerequisite clashes between categories.

Primitives, Objects

The different ways scripts can manipulate an object are included in this category. It does not include the ways to interact between objects and agents. The interaction categories are included in the detection and communications categories.

  • Faces
  1. Each face on a prim has a number associated with it.
  2. The number varies by prim type and can vary depending if the prim has a "cut."
  3. It is not necessary to memorize all of the face numbers for every prim. It is necessary to know how to find the information and understand how the convention depends on whether or not a prim is cut.
  • Changing color
  1. Commands for changing the color.
  2. RGB definition of a color vector in LSL and how it is different from the editor window.
  3. Know how to convert back and forth between an RGB color vector in LSL and the format found in the editor window.
  4. Know how to identify when a color is changed using the changed event and the predefined constant CHANGED_COLOR.
  • Changing alpha(transparency)
  1. Commands for changing the alpha level.
  2. Difference between changing alpha level and the two different transparent textures, TEXTURE_TRANSPARENT and e97cf410-8e61-7005-ec06-629eba4cd1fb (invisiprim).
  3. Know how to identify when an alpha level is changed using the changed event and the predefined constant CHANGED_COLOR.
  • Changing textures
  1. Commands for changing the textures.
  2. Predefined constants for UUIDs of textures.
  3. Know the difference between the constants TEXTURE_TRANSPARENT, TEXTURE_BLANK, TEXTURE_MEDIA, and TEXTURE_PLYWOOD.
  4. Know how to identify when a texture is changed using the changed event and the predefined constant CHANGED_TEXTURE.
  • Particles
  1. Command to create particles.
  2. Basic limitations of particles.
  3. Basic understanding on how to turn particles on and off.
  • Link commands and options
  1. Commands to determine the UUID, link number, total number of prims etc. for prims within the current object.
  • Text and pie menu text
  1. Commands to change the text over a prim.
  2. Commands to change the text for different options in the pie menu.
  • Primitive name and description
  1. Commands to get the name and description of a prim.
  2. Commands to change the name and description of a prim.
  • Dataserver events
  1. Basic understanding of the dataserver event.
  2. Basic understanding of the different kinds of information that can be obtained using the dataserver event.
  • Obtaining object information
  1. Getting agent information (llRequestAgentData)
  2. Getting object information (llGetObjectDetails)
  • Sound
  1. Commands to preload sound files.
  2. Commands to play sounds.


Note that for many of these items there are a large number of commands associated with the topic. For example, just to change the color of a prim the following commands can be used: llSetColor, llSetLinkColor, llGetColor, llSetPrimitiveParams, llGetPrimitiveParams, llSetLinkPrimitiveParams. It is adequate for a person to just know how to use llSetPrimitiveParams and llSetLinkPrimitiveParams to change the color of a prim, but the person should know the other commands in case they are asked to adapt another person's code.

Avatars and Agents

  • Sit positions and associated functions
  1. Setting the position and rotation of a sit position.
  2. Turning off a sit position after it has been set.
  3. Know how to set the camera orientation for a sitting avatar.
  • Permissions
  1. Basic understanding of the permissions system.
  2. Basic understanding of the different types of permissions that may be obtained.
  3. Know how to obtain permissions and basic understanding when it is required.
  • Animations
  1. Know how to set a the animation of a person sitting on a prim.
  2. Know how to obtain permission before setting the animation.
  3. Know how to remove an active animation.
  • Camera Controls
  1. Know how to obtain permission to change the camera orientation.
  2. Know the basic ways to change the camera. (Static positioning)
  • Dataserver
  1. Know the commands that can be used to obtain information about an agent.
  2. Know how to obtain agent and avatar information via the dataserver event.

A person should know the basic ways to manipulate and change an avatar. The person should be able to set and clear sit positions on a prim. The person should be able to set the default camera position for an agent once their avatar is sitting on a prim. The person should know how to find the UUID and link number of an avatar when an agent sits on an object.

A person should demonstrate the basic use of the permission system. This includes the different types of permissions. Also, the person should know under what circumstances the agent is given a dialog to obtain permissions and when the dialog is not provided to the agent. The different permissions are not limited to just animations but include all permissions.

The person should demonstrate a basic understanding of how to change a camera. The person is required to be able to move a camera to look at a specific point but not necessarily calculate specific rotations for a given view. The person should be able to obtain permission to change a camera and know how to change it.

The person should be able to identify all of the options available for the dataserver event and find a given piece of information. The person should be able to manipulate the information and identify what the information is and any limitations. For example, a query to determine if an agent is online will only determine if the agent is online and has provided permission for the owner of the script to determine if the agent is online.

Inventory, Land and Simulator Information

  • Note cards
  1. Get the number of lines in a note card.
  2. Step through and get each line in a note card.
  3. Know how to stop reading a note card by testing for the EOF constant.
  • Detect when the inventory has changed.
  • Inventory information
  1. Get the name of the creator for an object.
  2. Inventory numbering system.
  3. Inventory types.
  4. Inventory permissions.
  • Land
  1. Find the water level at a given position
  2. Find the normal to the terrain at a given position
  3. Find the slope to the terrain at a given position
  4. Find the owner of the parcel at a given position
  5. Use of the llGetParcelDetails command to get parcel information at a certain position.
  • Basic use of the llRequestSimulatorData command.

A person seeking intermediate accreditation for the inventory and simulator information should be able to read the full contents of a note card and perform basic string manipulations to determine and react to the contents on a given line in the note card. The person should be able to read the full contents of the note card using both the number of lines in the card and using the EOF constant.

The person should be able to use the changed event to determine when the inventory has been changed and react accordingly.

The person should be able to get basic information about specific inventory items. The person should know how to search all items in the inventory and search all inventory items of a given type. This implies a basic understanding of how the inventory is numbered in relation to the different types.

Intermediate I/0

  • Chat commands
  1. Dialogs.
  2. Limitations of chat commands.
  3. Email.
  • Text and menu
  1. Setting text over an object.
  2. Commands to manipulate the pie menu.
  • Link messages
  1. The link_message event.
  2. Sending link messages.
  3. Limiting link messages to specific prims within a build.
  • Shared Media
  1. Basic use of the llSetPrimMediaParams command to display web pages on a prim.
  2. Use of data:text/html format to specify web pages.
  • Basic security
  1. Relying on arcane channels is not secure.
  2. Methods to insure a message is coming from an agent/object.
  3. Basic validation using MD5 and SHA1 hashes.


In addition to the basic chat commands and listen event defined in the basic level the person should now be able to perform more advanced interactions including the use of dialogs. Also the person should have a broader understanding of the limitations of chat commands and know how to use the options to share email messages between scripts.

Also, the person should be able to change and manipulate the text over an object as well as remove the text over an object. The various commands to change the text in a pie menu should also be known.

In addition to the chat and listening events the person should also know how to use link messages to communicate between scripts within an object. The person should know all of the options to communicate to specific prims or all of the prims in an object using link messages.

Finally, the person should have a basic understanding of security issues and limitations. The person should be able to identify and check for specific agents as well as check and limit communications for ownership and group identities.

Predefined channels (DEBUG_CHANNEL and PUBLIC_CHANNEL).

Physics

  • Linear and Angular Force
  1. Commands for Force.
  2. Know the difference between local and global settings.
  3. Know the difference between linear and angular forces.
  • Linear and Angular Impulse
  1. Commands for Impulse.
  2. Know the difference between local and global settings.
  3. Know the difference between linear and angular impulse.
  • Vehicles
  1. Know the basic commands and settings to initiate a vehicle.
  2. Know the basic ideas behind the different options.
  3. Know the impact of changing the individual parameters.

The person who wants to achieve an intermediate rating for physics should know all of the basic commands for both linear and angular force as well as momentum. The person should know the difference between the local and global settings. The person should know the difference between the force/torque commands and the impulse commands.

The person should know the relationship between force and impulse. Both are representations of Newton's Second Law where force is the differential form and impulse is the integral form. The person should understand the relationship between force, mass, and acceleration as well as the relationship between impulse and momentum.

The very basic commands of scripting a vehicle should be known. At the intermediate level a person is not expected to be able to create a script for a vehicle but should understand the basic commands necessary for its functionality and alter an existing vehicle script.

Detection

  • Touch events.
  1. The three touch events.
  2. Functions to detect information about who has touched a prim.
  3. Passing touch information to other prims in a build.
  • Collision events
  1. The three collision events.
  2. Functions to detect information about what/who took part in the collision.
  • Land collision events
  1. The three land collision events.
  2. Functions to detect information about what/who took part in the land collision.
  • Sensors
  1. The sensor commands.
  2. The two sensor related events.
  3. Limiting the scope of a sensor.
  4. Limitations of a sensor.

A person who wishes to achieve an intermediate certification in detection should know the different events in which detection is relevant. The person should know how the different detection commands are used within the different events. The person should know be able to construct scripts that make use of the events and detection routines and combine them.

Additionally a person should be able to use sensors to detect a person. The person should know the difference between a repeating and one time sensor. The person should know how to construct scripts that make use of the sensor and no_sensor events. The person should know the limitations of the commands and understand the importance and how to narrowly define a sensor.

Rotations and Vectors

For the intermediate requirements a person should be able to take the ideas required for the basic requirements and implement them in LSL. More importantly the person should begin to demonstrate an ability to work with the definitions in specific contexts and solve basic problems using a script.

Reference Frames

  • Global
  • Sim
  • Local

Similar to the basic requirements, but the person must be able to demonstrate an ability to move back and forth between global, sim, and local coordinates. For example, a script that is in a link set should be able to work with a coordinate passed to it from an object in the sim's reference frame and react accordingly.

Basic commands to get position information

  • llGetPos
  • llGetLocalPos
  • llGetRootPosition
  • llGetRegionCorner

A person must demonstrate an understanding of the basic position commands for getting information about an object's position. The person must demonstrate an understanding how the command works in different global and local contexts.

Basic commands to get rotation information

  • llGetRot
  • llGetLocalRot
  • llGetRootRotation

A person must demonstrate an understanding of the basic rotation commands for getting information about an object's rotation. The person must demonstrate an understanding how the command works in different global and local contexts.


Basic commands for changing position

  • llSetPos
  • llSetPrimitiveParams
  • llSetPos within different reference frames.

A person must demonstrate a basic understanding of how to move an object. The person should be able to move an object to specific points. This should be done in both local, sim, and global coordinate systems. For example, a person should be able to move a prim within a link set to a specific point in the sim's coordinate system. More importantly given two separate objects the person must be able to move a prim to points in a local context defined by the two objects.

Basic commands for changing and working with rotations

  • llSetRot
  • llSetLocalRot
  • llSetPrimitiveParams
  • llAxes2Rot
  • llAxisAngle2Rot
  • llRotBetween
  • llRot2Axis
  • llRot2Angle
  • How the commands work in different reference frames.
  • Rotations
    • Multiplication and division of rotations
    • Difference between left and right multiplication

A person must demonstrate a basic understanding of how to rotate an object. The person must be able to rotate an object to specific orientations. This should be done with a variety of different commands. The person should demonstrate an ability to calculate appropriate rotations given a variety of information. For example, the person should be able to calculate the rotation necessary to achieve a given orientation using an Euler rotation as well as making use of an axis of rotation and an angle.

Working with vectors

  • Finding a vector component in a given direction.
  • Finding a vector perpendicular to two vectors.
  • Finding a vector perpendicular to a plane.

The person should be able to perform basic vector operations in LSL. The person should be able to calculate the components of a vector in arbitrary directions. The person should be able to do this in a variety of contexts such as using a plane or multiple vectors.

Programming and Software Development

  • More advanced use of lists.
  1. Adding to a list.
  2. Removing part of a list.
  3. Inserting into a list.
  4. Replacing part of a list.
  5. Finding an item in a list.
  • More advanced string functions.
  1. Removing a substring.
  2. Replacing a substring.
  3. Inserting a substring.
  4. Finding a substring.
  • More advanced revision systems.
  1. Basic understanding and use of at least on revision control system. (ex: RCS, subversion, or git)
  2. Be able to maintain revisions and find particular revisions using at least one revision control system.
  • Work flow
  1. Demonstrate effective interactions with clients and remain flexible through the entire development cycle.
  2. Be able to establish a basic plan for the creation of a script that must accomplish multiple task.
  3. Be able to adapt the plan as the requirements change.
  4. Be able to provide effective mock-ups and trial programs for clients.

At the intermediate level the Programming and Software Development category includes greater in depth knowledge of the basic LSL commands. At this level the person should know how to use all of the flow commands and construct a wide variety of scripts that require all of the flow commands.

In addition, the person should know and understand how to use all of the list commands. A person should be able to manipulate lists. For example, a person should be able to delete and insert sublists into an existing list. The person should be able to use strided list and know how to sort and randomize a list. The person should also have a basic understanding of the memory overhead associated with a list.

The person should also know and understand all of the string manipulation routines. The person should be able to manipulate strings. For example, a person should be able to delete and insert substrings into an existing string. The person should have a basic understanding of the memory overhead associated with strings.

With respect to project management and the practice of writing programs, the same practices for comments discussed at the basic level must be maintained at the intermediate level. Programs submitted for evaluation are expected to include clear, consise, and consistent commenting.

The person should be able to make use of at least one revision control system. The person should be able to maintain revisions and recall specific revisions. At this level a person does not need to know know how to find differences in revisions or be able to create and maintain a branch and merge the branch into an existing code base.

Finally, a person should understand how to create a broad, flexible plan to create and maintain a software project. The person should understand how the importance of creating a plan and developing an approach to a project before any coding is to begin. The person should understand the importance of flexibility and the importance of long term planning and how it relates to the code base.