<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Keltic Games &#187; description</title>
	<atom:link href="http://www.kelticgames.com/index.php/tag/description/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kelticgames.com</link>
	<description></description>
	<lastBuildDate>Wed, 27 May 2009 15:20:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>SL Persistent Data Storage</title>
		<link>http://www.kelticgames.com/index.php/2008/05/13/sl-persistent-data-storage/</link>
		<comments>http://www.kelticgames.com/index.php/2008/05/13/sl-persistent-data-storage/#comments</comments>
		<pubDate>Tue, 13 May 2008 13:35:56 +0000</pubDate>
		<dc:creator>Keltic</dc:creator>
				<category><![CDATA[Second Life]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[description]]></category>
		<category><![CDATA[engine]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[lsl]]></category>
		<category><![CDATA[mono]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[notecard]]></category>
		<category><![CDATA[persistent]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[sl]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[values]]></category>
		<category><![CDATA[variables]]></category>

		<guid isPermaLink="false">http://www.kelticgames.com/index.php/2008/05/13/sl-persistent-data-storage/</guid>
		<description><![CDATA[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. Object names and descriptions offer a location to read and write dynamic values, so long as [...]]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<ol>
<li>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&#8217;ve used the description field to store single values as well as short lists of values to parse in script.</li>
<li>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.</li>
<li>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.</li>
</ol>
<p>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.</p>
<p>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 <a href="http://code.google.com/appengine/" target="_blank">Google App Engine</a> would allow each scripter to easily setup their own private storage. hmmm</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kelticgames.com/index.php/2008/05/13/sl-persistent-data-storage/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Second Life Simple Data Storage</title>
		<link>http://www.kelticgames.com/index.php/2008/04/24/second-life-simple-data-storage/</link>
		<comments>http://www.kelticgames.com/index.php/2008/04/24/second-life-simple-data-storage/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 13:37:10 +0000</pubDate>
		<dc:creator>Keltic</dc:creator>
				<category><![CDATA[Second Life]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[description]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[prim]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[sl]]></category>
		<category><![CDATA[variables]]></category>

		<guid isPermaLink="false">http://www.kelticgames.com/index.php/2008/04/24/second-life-simple-data-storage/</guid>
		<description><![CDATA[In creating scripts for Second Life, I&#8217;ve tried to keep the scripts as portable and re-usable as possible. At the most basic level, this means creating a separation of code and data. For scripts that are used in a limited number of prims, this can be as simple as setting customizable variables at the top [...]]]></description>
			<content:encoded><![CDATA[<p>In creating scripts for Second Life, I&#8217;ve tried to keep the scripts as portable and re-usable as possible. At the most basic level, this means creating a separation of code and data. For scripts that are used in a limited number of prims, this can be as simple as setting customizable variables at the top of the script. For scripts that are going to be used in many prims, this system requires maintaining a unique copy of each script in each prim. If your base script is updated to fix a bug or add a feature, you&#8217;ll need to update each script by hand or overwrite the script in prim and reset the custom variables. Both options are prone to error.</p>
<p>For scripts used in many prims, storing the data for those variables in the prim&#8217;s description field can be an effective solution. This allows you to replace the script without impacting the custom data in each prim. The description field is limited to 127 characters, so this method is only useful with short length data. Also, since the description field can be publicly viewed in prim properties, this method should not be used to store private or sensitive data. On the plus side, this data can be updated dynamically using llSetObjectDesc().</p>
<p>When storing the value of a single variable in the description field, use this code to retrieve the value. If the type is anything other than a string, simply prefix the function with the data type. In this case, the variable type is a vector.</p>
<p><code>vector myVector; //declare variable type<br />
myVector = (vector)llGetObjectDesc(); //read the description, a string by default, and convert to a vector</code></p>
<p>If you need to store multiple values, format the data in the description field as a list, such as &#8220;Someplace;&lt;72,89,25&gt;&#8221;, read the data and parse it. This example uses the semi-colon as a delimiter.</p>
<p><code>list description;<br />
string locationName;<br />
vector locationTarget;</code></p>
<p><code>description = llParseString2List(llGetObjectDesc(), [";"], [""] );<br />
locationName = llList2String(description, 0);<br />
locationTarget = (vector)llList2String(description, 1);</code></p>
<p>I have found this method to be very effective and efficient for scripts that contain a limited amount of custom data. To store larger amounts of data, you&#8217;ll need to use a notecard or data store external to the prim.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kelticgames.com/index.php/2008/04/24/second-life-simple-data-storage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
