Before you start
This tutorial explains how to conduct Sametime chats from within the Second Life game and vice versa. It is for developers who want to learn more about using Sametime bots or who want to know about basic non-animation-related scripting in Second Life.
To follow along with this tutorial, you should be familiar with general Java™ programming concepts. Familiarity with servlets and concepts such as threads would also be helpful, but is not required. This tutorial assumes that you are not necessarily familiar with programing in Linden Script Language, the scripting language of Second Life.
Also, under certain circumstances, you might need to use a PHP-based proxy -- see the systems requirement section for an explanation -- but you won't need any PHP knowledge; the tutorial provides everything you need.
Second Life is a Massively Multiplayer Online Role-Playing Game (MMORPG) in which users can immerse themselves in the world that represents the game. They can spend hours (or longer!) chatting with individuals in the game. But as the business world starts to discover Second Life, obvious questions arise, such as "how can you keep up a presence 'in world' and still take care of work responsibilties?"
On the other hand, Lotus Sametime is a chat environment that enables organizations to keep in touch in real time without having to constantly stare at the chat window.
This tutorial explains how to create an environment in which you can experience the best of both worlds. You learn how to create a Sametime object that relays a Second Life chat into Lotus Sametime and vice versa. In other words, you can use Lotus Sametime to carry on a conversation with a gamer inside Second Life without ever logging in and carry on a normal chat within Second Life that's effortlessly relayed to the outside world.
In this tutorial, you will learn:
- How to create a Sametime bot
- How to communicate with Lotus Sametime from outside Lotus Sametime Connect
- How to integrate a Sametime bot with a Java servlet
- How to create basic Second Life scripts
- How to speak and listen in Second Life
- How to use HTTP requests with Second Life
- How to create a PHP "proxy" to solve connectivity problems
Basic knowledge of programming in some language is required. Experience with events and vector algebra will definitely help, but isn't necessary.
To follow along with this tutorial, you need to have the following tools installed and/or available to you.
- Lotus Sametime V7.5: This tutorial doesn't require you to have your own Sametime server available; you can use the Sametime 7.5 Demo server. You can, however, download a trial version of Lotus Sametime.
- Lotus Sametime SDK V7.5: This toolkit provides the necessary support classes and files for interacting with Lotus Sametime from various environments. This tutorial uses the Lotus Sametime Connect Java client JAR files.
- Lotus Sametime Connect: You need a Sametime client to communicate with the avatar in Second Life.
- Second Life: You can download the Second Life client for free after signing up for a free account at http://www.secondlife.com. (All steps in this tutorial were carried out with a free account.) See the system requirements for Second Life. Note that at the time of this writing, Microsoft® Windows® Vista support was just coming online.
- IBM Rational Application Developer or another Eclipse-based IDE: You develop a Java class and a Java servlet, so your life will be much easier if you use a tool such as Rational Application Developer.
- Connectivity: Your Sametime bot communicates through a Java servlet. If you have Java-based hosting that's accessible from the outside world, you're done with installation, and you can move on to the Overview. If not -- for example, if you can only run a servlet on your local machine, which isn't addressible from outside the company's firewall -- you need to get one more set of software:
- PHP/Apache: In this tutorial, you see how to create a PHP-based "proxy" that enables the Sametime bot to communicate with the outside world without actually being addressible by it. The simplest way to accomplish this is to get the WAMP package, which includes the Apache HTTP server with PHP pre-installed. The proxy included in the sample files also requires a PHP server accessible from the Internet. (The proxy is provided with the source code, but isn't discussed in the tutorial.)


