ET:QW Widget v1.2

June 7, 2008 · Filed Under etqw widget, widgets · Comment 

The Enemy Territory: Quake Wars Stat site has been updated to use unique numbered IDs instead of player names. This is probably due to the XBOX 360 and PS3 releases. I have updated the ET:QW widget to reflect this change. You can update your widget or just enter your profile ID in the username field of the v1.1 widget. To get your profile ID, visit the stats site, search for your player name, select it and get the ID from the URL in your browser. This is the only update in v1.2.

Download ET:QW Widget v1.2

PortableApps Suite v1.1

May 22, 2008 · Filed Under software · Comment 

The PortableApps Suite has just been upgraded to version 1.1. It contains many new features, such as a movable menu, an eject button which closes the menu and opens the Safely Remove hardware dialog, and a global keyboard shortcut for opening the menu. I used this platform daily and it’s continued development is very welcome.

USB Portable Applications

May 15, 2008 · Filed Under software · Comment 

When I started my current position, I decided that I wanted to establish a distinct separation between my work data and personal data. While I’d love to have a separate personal laptop, the ultra light models have been too expensive to justify the cost. This year looks to change that with the introduction of many small inexpensive laptops. In the mean time, I am using USB flash drives and a USB portable hard drive. With all of these drives, I had three different options for running portable applications: Ceedo, U3 and PortableApps.

Ceedo came pre-installed on a 160GB portable hard drive. I use this drive to backup data from my home computer and my work laptop. The Ceedo application site has a very good selection of applications. Some are paid, but most of the offerings are free. My favorite is JetAudio, which I use to play music synced to the portable drive from my home machine. One of the nice features of Ceedo is the one-click eject; a single click closes the Ceedo application and makes the drive safe to eject. I also like how applications run from Ceedo can display a colored border to distinguish them from locally run applications. Overall, Ceedo is a solid portable application launcher.

U3 came pre-installed on a 2GB SanDisk cruzer USB Flash drive. I used the U3 applications for a couple months and was not satisfied at all. The U3 applications site was painfully slow, the application selection was poor, they are not frequently updated and many of them are trial software. The whole system it geared towards selling add-on software, not providing any type of portable convenience. The only nice feature is the one-click eject. The best U3 application is the uninstaller, which removes all U3 software and the extra system drive.

PortableApps is an open system that offers only free and open source software. There is a solid selection of software available, not as many as Ceedo or U3, but overall quality of applications is on par with Ceedo and blows away U3. The PortableApps Suite launcher is lightweight and fast. I use many of the applications available with PortableApps, some of which I discovered when there were converted to the PortableApps format.

  • 7-Zip and PeaZip are file compression tools.
  • AbiWord is a word processor that makes a great off-line blog writing tool. It doesn’t paste bloated markup like Microsoft Word!
  • BonkEnc is a amazingly fast CD ripper. I’ve used EAC for a long time, but BonkEnc appears to be on the order to 10 times faster and is much easier to setup.
  • FileZilla for FTP. I’m an old LeechFTP holdout. I tried SmartFTP for awhile, but it quickly got so bloated as to be not worth the nice interface. FileZilla now rivals LeechFTP and I’m not going back.
  • KeePass is a password storage tool. Having the ability to store passwords securely on a USB drive is key for anyone who uses multiple systems.
  • Mozilla Firefox, of course. The key extension is Google Browser Sync, which keeps my bookmarks and history synced between my home computer, the USB-based browser and various virtual machines. My browser settings anywhere!
  • Notepad++ has become my coding tool of choice. I was a diehard HomeSite fan, but Notepad++ is stable, mature and frequently updated. I use it for HTML, CSS, Javascript, ActionScript, Linden Scripting Language, widgets, XML, game configuration files, etc.
  • Task Coach is a new task manager. It’s still alpha software, but has a nice feature set and it updated regularly.
  • WinDirStat is directory size utility, similar to, but not quite as mature as TreeSize.
  • WinMerge is a file and directory comparison utility.

These are just the titles that I use, there are many more. I have also successfully installed some non-PortableApps software. Applications that don’t use the registry work best. The only downside to PortableApps is that ejecting the USB drive requires that you close the PortableApps Suite launcher and then eject the drive in Windows. This is a minor annoyance. The selection of applications and frequency of updates easily makes this my favorite USB application launcher.

Second Life: A Guide to Your Virtual World

May 13, 2008 · Filed Under Second Life, books · Comment 

When I started my first SL project, my wife grabbed a couple SL books from the library where she works. The first was Second Life For Dummies. This may seem surprising, but I have found many of the Dummies books to be humorous and informative introductions into new topics. This title didn’t fall into that category. I learned more exploring in-world for a couple hours than reading this book. Second Life for Complete Morons would be a better title.

The second was Second Life: A Guide to Your Virtual World by Brian A. White. This is an excellent introduction to SL! The book covers all of the major topics about SL, it contains many valuable tutorials and many excellent screenshots for reference. I highly recommend it. One of the build tutorials in the book is how to make a waterfall. Ironically, on my first SL project, I was asked to make a waterfall. I grabbed the exact waterfall used in the tutorial from Brian’s land in SL and dissected it before building multiple waterfalls.

SL Persistent Data Storage

May 13, 2008 · Filed Under Second Life · 1 Comment 

The storage of persistent data appears to be quite a hot topic in the Second Life scripting community. I can certainly understand why. There are three options for storing data persistently in SL and each has a significant limitation.

  1. Object names and descriptions offer a location to read and write dynamic values, so long as they are short. Names are limited to 63 characters and descriptions to 127 characters. I’ve used the description field to store single values as well as short lists of values to parse in script.
  2. Notecards are a popular way to store configuration values for scripts. Packaging a no modify script with a modifiable notecard, allows sellers to offer scripts that are configurable without giving the source code away. However, notecards are read-only.
  3. Scripts can pass data to each other, allowing for scripts designed solely to store data while other scripts are reset. However, even these scripts will loose data when the sim is restarted.

Linden Labs has indicated that they are not pursuing a solution, at least not before the release of Mono, the upcoming scripting language for SL with increased speed and stability. There are third-party solutions, but privacy and reliability would be big concerns. There are scripts available to setup your own external storage via PHP. This requires a hosting solutions outside of SL, an additional cost for many SL residents.

In the mean time, it seems like the best compromise would be an API that utilizes a reliable third party provider of storage. For example, an open source API created with Google App Engine would allow each scripter to easily setup their own private storage. hmmm

SL Teleport

May 8, 2008 · Filed Under Second Life · Comment 

The lack of a sound teleport function in Second Life has become a major frustration. I wrote a basic teleport script using the llSitTarget() hack. This worked well for short range distances, say anything under about 50 meters. However, when I implemented this over longer ranges of about 100m, some strange side-effects started to appear. The teleporting avatar would appear underground by more than 70m or off the sim by more than 100m. After 3-5 seconds, the avatar would snap to the correct position. This would certainly be confusing the many users.

On some teleports, the camera would start moving from the source to the destination, but stop mid-way, even though the avatar completed the trip. Using the moving keys would snap the camera to the correct position behind the avatar, but still not a good user experience.

Don’t even get me started on dealing with rotations in the llSitTarget() function. I could certainly be implementing them wrong, I’ve gotten some to work properly, but most do not. It seems to depend a great deal on the local rotation of the object. I’ve even had some chairs where two of the vector floats controlled the same axis! This limited me to rotating a sit target in two dimensions. I could rotate left-to-right and side-to-side, but not front-to-back.

I also tried implementing the popular warpPos function, which sits the avatar on a prim, moves the prim in 10m increments to the destination and then unsits the avatar. This worked, but exhibited the same unusual side-effects.

I also tested a number of commercial teleport solutions and they all exhibit the same side-effects.

Of course, llMapDestination() is the official method for teleporting. However, this simply brings up the full map with the target destination highlighted. The user is required to click the Teleport button among a sea of options. The map is a powerful tool, but completely overkill when you simply want to teleport to a specified destination.

A simple function would address all of these issues:

llTeleportAgent(vector targetLocation, float targetCompassFacingInDegrees, integer showMap)

I know there are security concerns that need to be addressed, but it’s hard to imagine creating mass-appeal for this environment when such basic issues persist.

SL LSL Wish List

May 6, 2008 · Filed Under Second Life · Comment 

The lack of any type of error handling in Linden Scripting Language (lsl) is a bit frustrating. This could be addressed with the addition of a try/catch or an error event.

Type checking would also be nice. This could either be done with individual functions, such as llIsInteger(), llIsVector(), etc. Or a single function could return the type of a variable, such as llGetVariableType(string variableName).

SL Updating Scripts

May 6, 2008 · Filed Under Second Life · Comment 

When I started scripting in Second Life, I quickly realized that I would have many dozens of objects that used the same script. This script would need to be updated in all of those objects repeatedly, not something I was looking forward to doing manually. While it would be ideal if multiple objects could reference the same script from a single location, that option is not available.

The next best option was to push the updated script from a central script server object to the client objects. A single script could handle serving the script using llRemoteLoadScriptPin(). This function pushes the specified script to an object with a specified key. If all of the objects that needed the script had the same name, then the central script could query those objects by name and create a list of their keys.

Not so fast. There is no function to return a list of object keys based on name or any other criteria aside from linkage. Due to the distances involved, linking was not an option. I certainly didn’t want to maintain a list of keys for the objects manually. And of course, the client object getting the script would need to have a matching pin number set for llRemoteLoadScriptPin() to work. Both of these issues meant that a client script was also required.

It’s easy enough to set the pin in the client script using llSetRemoteAccessPin(). However, how would the server script get the key of the client object? The client script needs to provide it. Not unlike an HTTP or FTP request, the client would need to request the script via chat and the server object, listening for the request, could provide the requested script back to the requesting object.

This created another issue: How is the client request initiated for each of dozens of objects? I added a listener to the client script that would listen for a specific chat command from my avatar on a private channel. This way, I could update objects within 20 meters via chat or objects up to 100 meters away via shout. This system has worked fairly well and only requires about 3 shouts to update the client scripts scattered across an entire region.

I also considered creating a single point of activation at the server. This could be done by adding another listener to the server which would broadcast an update request region-wide, prompting all of the clients in the region to request an update.

  1. Avatar to Server: hey server, broadcast update request to region
  2. Server to Region: if you can hear me, it’s time to update
  3. Client to Server: hey server, please send me this script
  4. Server to Client: sends script

I didn’t have the need to implement this by the end of this project, but may do so right at the beginning of my next SL project.

I have also added code to each script that queries the object name and prevents of the script from running if it’s located on the script server. This will avoid potentially wacky behavior that might result from various scripts running on the server.

ET:QW Widget in Yahoo Widget Gallery

May 3, 2008 · Filed Under etqw widget · Comment 

Yahoo has posted my ET:QW player stats widget in their widget gallery. You can view it here. I’ve also added a download button to the sidebar.

SL Rotations

April 29, 2008 · Filed Under Second Life · Comment 

I recently completed the construction of a transportation system within an island of Second Life. This included a vehicle which needed to operate along a generally fixed but not exact path. Instead of putting the vehicle on some type of an rail, I placed the vehicle in the space, pointed it in a particular direction and let it go. I lined the space with invisible bumpers. When the vehicle collides with the invisible bumpers, it changes direction. This would allow the vehicle paths to vary slightly on each pass. I discussed the communication issues in Second Life Phantom Collisions.

I encountered a very complex subject in SL: rotations. Since the vehicles needed to point in a particular compass direction at start and on collision, I would need to know the direction for each of these cases. This required determining the compass direction in an easy to read number from 0 to 359 degrees. This number was then converted to a vector (<x, y, z>), where x and y are both 0 and the degrees assume the z value (<0.0, 0.0, direction>). This vector was then converted from degrees to radians and then to a rotation. This was fairly easy to piece together using examples from the various LSL wikis (lslwiki.net and wiki.secondlife.com). However, as is with SL, there are always a few undocumented catches.

First, the degrees value is not what you might think. I would expect 0 degrees to represent North and proceed clockwise around the compass. I could also see the values starting at East and progressing clockwise. Neither was the case, 0 starts at East and proceeds counter-clockwise around the compass: 90 degrees is North, 180 degrees is West, 270 degrees is South, etc.

It was much too inaccurate to guess the degree values based on the compass headings in the mini-map, so I built a HUD to display an exact value based on the facing of my avatar. This way, I could point my avatar, read the value and plug it into the object needing a direction. After a series of tests, it became clear that the HUD was inaccurate anywhere between 1 and 9 degrees. After some trial and error, I switched from the rotation of the avatar with llGetRootRotation() to the rotation of the camera with llGetCameraRot(). This produced an accurate result.

To summarize, the HUD would convert the rotation of the camera to a human-friendly direction in degrees and the objects could convert that direction back to a SL-friendly rotation.

The HUD simply consisted of floating text on an invisible prim. I had originally attached this to my head, which worked but lead to my fellow developers wondering why I had text floating above my head all the time. n00b! Instead, I attached the prim directly to my HUD, so that only I would see it. My first HUD attachment.

I’ve also been attempting to convert local rotations to global rotations and then modify those further based on a particular direction, but this has proved extremely challenging and beyond the scope of any SL rotation documentation that I have found. According to the documentation, it should be possible, I just haven’t figured it out yet.

Next Page »