Wednesday, June 15, 2011

Second Life: More Scripting

For this week, we're taking a thorougher look at scripting in Second life using Linden Scripting Language (LSL). First and foremost re-run through some basic rules and outlines of LSL:
  • it is a strongly typed language (every variable needs to be declared and they can only hold values of the relevant type)
  • variables: integer, float string, key, vector, rotation and list and some of their practical uses
  • basic loops and conditions (for, do, while) which are similar to Java and PHP
  • a look at some string functions
Through the basic understanding, we now applied some of the example scripts in-game and modified them to our preferences. These included a colour changing object, objects that open webpages and objects that change the light they emit when selected.

While scripting these objects we became more familiar with some LSL functions, such as, the different chat levels that are available in game (channels, owner chat, private messaging etc.), dialogue options, object listening and making use of vectors and lists.

Following up on this, I decided to implement an object that will give a passer-by the option to type a message which will be sent to the owner via email. First and foremost I create the object out of basic shapes and gave it some texture. The picture below illustrates the mailbox object.

Photo & Video Sharing by SmugMug

For the object scripting I made use of and combines some of the examples to produce the desired result. The script will check for the online status of the owner and always display that status as part of that object. When a user selects the mailbox, they are prompted with the option to enter a line of text in the chatbox. That line is then sent via email to the owner. The pictures below depict a user sending a message through the mailbox system.

Photo & Video Sharing by SmugMug

Photo & Video Sharing by SmugMug

Conclusion

This brings to an end the Second Life portion of this module. Second Life was quite an interesting subject to tackle. It is a niche in itself, a game that give you abilities and tools to create and manipulate objects at will. This "game" however seems to lack any purpose, there does not seem to be any quests or end-game objective or any form of completion. Thus, it is a platform on it's own. In today's world we are seeking integration in everything. You Log In with your Facebook or Twitter account to leave comments on blogs or forums, eliminating the Signing Up process and combining your digital life into a few accounts. As we discussed in class and as it was pointed out by several class-mates, if somehow, this platform could be integrated with social networking, then it could increase the appeal of the game.

No comments:

Post a Comment