<?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>Randomly Designless &#187; Reaction Grid</title>
	<atom:link href="http://www.cminion.com/wordpress/tag/reaction-grid/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cminion.com/wordpress</link>
	<description>A series of accidental projects</description>
	<lastBuildDate>Wed, 12 May 2010 11:35:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mobile Ducks have migrated for the summer</title>
		<link>http://www.cminion.com/wordpress/2009/04/27/mobile-ducks-have-migrated-for-the-summer/</link>
		<comments>http://www.cminion.com/wordpress/2009/04/27/mobile-ducks-have-migrated-for-the-summer/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 11:34:54 +0000</pubDate>
		<dc:creator>cminion</dc:creator>
				<category><![CDATA[opensim]]></category>
		<category><![CDATA[ducks]]></category>
		<category><![CDATA[Reaction Grid]]></category>

		<guid isPermaLink="false">http://www.cminion.com/wordpress/?p=60</guid>
		<description><![CDATA[A few people asked me about my Ducks not being on the server (well 1) .
I have been asked to remove the randomly moving around ducks from the our SIM on ReactionGrid. I was &#8220;Cooking the server&#8221; and as the server was donated to us I felt obliged not to take advantage.
Thanks once again for [...]]]></description>
			<content:encoded><![CDATA[<p>A few people asked me about my Ducks not being on the server (well 1) .</p>
<p>I have been asked to remove the randomly moving around ducks from the our SIM on ReactionGrid. I was &#8220;Cooking the server&#8221; and as the server was donated to us I felt obliged not to take advantage.</p>
<p>Thanks once again for the people at ReactionGrid for providing us with a server to use for HomeCamp, lets see if we can improve its use for the next HomeCamp.</p>
<p>HomeCamp blog post to follow and a twitter search library post to follow when I get a few minute</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cminion.com/wordpress/2009/04/27/mobile-ducks-have-migrated-for-the-summer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Friendly Ghost Ducks</title>
		<link>http://www.cminion.com/wordpress/2009/04/18/friendly-ghost-ducks/</link>
		<comments>http://www.cminion.com/wordpress/2009/04/18/friendly-ghost-ducks/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 00:25:37 +0000</pubDate>
		<dc:creator>cminion</dc:creator>
				<category><![CDATA[opensim]]></category>
		<category><![CDATA[ducks]]></category>
		<category><![CDATA[Ghost]]></category>
		<category><![CDATA[Reaction Grid]]></category>

		<guid isPermaLink="false">http://www.cminion.com/wordpress/?p=48</guid>
		<description><![CDATA[I was aiming to produce an autonomous  dynamic enviroment developer tool for open sim.  As I had no idea what this would include I decided to start small and took the duck model supplied by Chris H and added a little script.
The first iteration  randomly chooses a direction (North, South, East or West)  and moves [...]]]></description>
			<content:encoded><![CDATA[<p>I was aiming to produce an autonomous  dynamic enviroment developer tool for open sim.  As I had no idea what this would include I decided to start small and took the duck model supplied by Chris H and added a little script.</p>
<p>The first iteration  randomly chooses a direction (North, South, East or West)  and moves one meter. This repeated every second. I had to introduce a 270m boundary otherwise the ducks had a habit of trying to change sims.</p>
<blockquote><p>float x = 82;<br />
float y = 237.682;<br />
float z = 22.5;<br />
float period = 1;<br />
float noMove = 10;<br />
float touchCount =0;<br />
default<br />
{<br />
timer()<br />
{<br />
list dice = [0,1,2,3,4];<br />
integer rand = llList2Integer(llListRandomize(dice, 1),0);<br />
vector xyz_angles = &lt;0,0,0&gt;;<br />
integer i=0;<br />
for( i=0;i&lt;noMove;i++) {<br />
if (rand == 0)<br />
{<br />
x=x+period/noMove;<br />
if (x &lt; 92)<br />
{<br />
xyz_angles = &lt;0,0,180&gt;;<br />
}<br />
else {<br />
x=x-period/noMove;<br />
x=x-period/noMove;<br />
xyz_angles = &lt;0,0,0&gt;;<br />
}<br />
}<br />
else if (rand ==1) {<br />
x=x-period/noMove;<br />
if (x &gt; 71)<br />
{<br />
xyz_angles = &lt;0,0,0&gt;;<br />
}<br />
else {<br />
x=x+period/noMove;<br />
x=x+period/noMove;<br />
xyz_angles = &lt;0,0,180&gt;;<br />
}<br />
}<br />
else if (rand == 2) {<br />
y=y-period/noMove;<br />
if (y &gt; 226)<br />
{<br />
xyz_angles = &lt;0,0,90&gt;;<br />
}<br />
else {<br />
y=y+period/noMove;<br />
y=y+period/noMove;<br />
xyz_angles = &lt;0,0,270&gt;;<br />
}<br />
}<br />
else if (rand==3) {<br />
xyz_angles = &lt;0,0,270&gt;;<br />
y=y+period/noMove;<br />
if (y &lt; 247)<br />
{<br />
xyz_angles = &lt;0,0,270&gt;;<br />
}<br />
else {<br />
y=y-period/noMove;<br />
y=y-period/noMove;<br />
xyz_angles = &lt;0,0,90&gt;;<br />
}<br />
}<br />
//llSay(0,(string)x+&#8221; &#8220;+(string)y+&#8221; &#8220;+(string)z);<br />
vector angles_in_radians = xyz_angles*DEG_TO_RAD;<br />
rotation rot_xyzq = llEuler2Rot(angles_in_radians);<br />
llSetRot(rot_xyzq);<br />
llSleep(period/noMove);<br />
llSetPos(&lt;x,y,z&gt;);<br />
}<br />
}<br />
state_entry()<br />
{<br />
llSetTimerEvent(period+0.5);<br />
llSetText(&#8221; &#8220;,&lt;1, 0, 0&gt;,1);<br />
}<br />
touch_start(integer total_number)<br />
{</p>
<p>string soughtName = llDetectedName(0);;<br />
touchCount = touchCount + 1;<br />
}<br />
}</p></blockquote>
<p>The second (and current) iteration of Duck allows them to be more interactive. If you talk while near the duck, it becomes scared of you (-1 modifier) however if you touch it it likes you (+1 modifier). The distance and direction it moves is connected to the accumulated modifier. If the modifier is positive it moves towards  you, if it is negative it moves away from you.</p>
<blockquote><p>float x = 82;<br />
float y = 237.682;<br />
float z = 22.5;<br />
float period = 4;<br />
float noMove = 10;<br />
float touchCount =0;<br />
vector location;<br />
string name;<br />
list likesName = [];<br />
list likesOpinions = [];<br />
integer listen_handle ;<br />
default<br />
{<br />
sensor( integer vIntFound )<br />
{<br />
if (vIntFound &lt; 1   )<br />
{<br />
name = &#8220;&#8221;;<br />
}<br />
integer vIntCounter = 0;<br />
location = llDetectedPos( vIntCounter ) ;<br />
name = llDetectedName(vIntCounter);<br />
}<br />
timer()<br />
{<br />
vector oldLocation = location;<br />
list dice = [0,1,2,3,4];<br />
float oldPeriod = period;<br />
llSensor( &#8220;&#8221;, &#8220;&#8221;, AGENT, 5, PI );<br />
if (name != &#8220;&#8221;){<br />
integer indx = llListFindList(likesName,name);<br />
if (indx == -1) {<br />
indx = 1;<br />
}<br />
integer like = llList2Integer(likesOpinions,indx);<br />
if (like &gt; 10 ) {<br />
like = 10;<br />
}<br />
period = 15;<br />
y = y-(y-location.y)/noMove*like;<br />
x = x-(x-location.x)/noMove*like;<br />
llSetPos(&lt;x,y,z&gt;);<br />
//llOwnerSay(&#8220;Walking towards &#8220;+name+&#8221; &#8220;+(string)x+&#8221; &#8220;+(string)y+&#8221; &#8220;+(string)z);<br />
name = &#8220;&#8221;;<br />
}<br />
else {<br />
period = oldPeriod;<br />
integer rand = llList2Integer(llListRandomize(dice, 1),0);<br />
vector xyz_angles = &lt;0,0,0&gt;;<br />
integer i=0;<br />
for( i=0;i&lt;noMove;i++) {<br />
if (rand == 0)<br />
{<br />
x=x+period/noMove;<br />
if (x &lt; 92)<br />
{<br />
xyz_angles = &lt;0,0,180&gt;;<br />
}<br />
else {<br />
x=x-period/noMove;<br />
x=x-period/noMove;<br />
xyz_angles = &lt;0,0,0&gt;;<br />
}<br />
}<br />
else if (rand ==1) {<br />
x=x-period/noMove;<br />
if (x &gt; 71)<br />
{<br />
xyz_angles = &lt;0,0,0&gt;;<br />
}<br />
else {<br />
x=x+period/noMove;<br />
x=x+period/noMove;<br />
xyz_angles = &lt;0,0,180&gt;;<br />
}<br />
}<br />
else if (rand == 2) {<br />
y=y-period/noMove;<br />
if (y &gt; 226)<br />
{<br />
xyz_angles = &lt;0,0,90&gt;;<br />
}<br />
else {<br />
y=y+period/noMove;<br />
y=y+period/noMove;<br />
xyz_angles = &lt;0,0,270&gt;;<br />
}<br />
}<br />
else if (rand==3) {<br />
xyz_angles = &lt;0,0,270&gt;;<br />
y=y+period/noMove;<br />
if (y &lt; 247)<br />
{<br />
xyz_angles = &lt;0,0,270&gt;;<br />
}<br />
else {<br />
y=y-period/noMove;<br />
y=y-period/noMove;<br />
xyz_angles = &lt;0,0,90&gt;;<br />
}<br />
}<br />
//llSay(0,(string)x+&#8221; &#8220;+(string)y+&#8221; &#8220;+(string)z);<br />
vector angles_in_radians = xyz_angles*DEG_TO_RAD;<br />
rotation rot_xyzq = llEuler2Rot(angles_in_radians);<br />
llSetRot(rot_xyzq);<br />
llSleep(period/noMove);<br />
llSetPos(&lt;x,y,z&gt;);<br />
}<br />
}<br />
}<br />
state_entry()<br />
{<br />
llSetPos(&lt;x,y,z&gt;);<br />
llSetTimerEvent(period+0.5);<br />
llSetText(&#8221; &#8220;,&lt;1, 0, 0&gt;,1);<br />
listen_handle = llListen(0, &#8220;&#8221;, llGetOwner(), &#8220;&#8221;);<br />
}<br />
touch_start(integer total_number)<br />
{<br />
string soughtName = llDetectedName(0);<br />
integer indx = llListFindList(likesName,soughtName);<br />
if (indx == -1 ) {<br />
likesName = llListInsertList(likesName, [soughtName], llGetListLength(likesName));<br />
indx = llListFindList(likesName,soughtName);<br />
}<br />
integer mod = llList2Integer(likesOpinions,indx) + 1;<br />
if (mod ==0) {<br />
mod =1;<br />
}<br />
likesOpinions = llListReplaceList(likesOpinions,[mod],indx,indx);<br />
llOwnerSay(soughtName +&#8221; likeness is set to &#8220;+mod);<br />
touchCount = touchCount + 1;<br />
}<br />
listen( integer channel, string name, key id, string message )<br />
{<br />
string soughtName = name;<br />
llSay(0,soughtName + &#8221; just spoke and scared me&#8221;);<br />
integer indx = llListFindList(likesName,soughtName);<br />
if (indx == -1 ) {<br />
likesName = llListInsertList(likesName, [soughtName], llGetListLength(likesName));<br />
indx = llListFindList(likesName,soughtName);<br />
}<br />
integer mod = llList2Integer(likesOpinions,indx) &#8211; 1;<br />
if (mod ==0) {<br />
mod = -1;<br />
}<br />
likesOpinions = llListReplaceList(likesOpinions,[mod],indx,indx);<br />
llOwnerSay(soughtName +&#8221; likeness is set to &#8220;+mod);<br />
}<br />
}</p></blockquote>
<p>Not sure what will be done next, feedback is welcome</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cminion.com/wordpress/2009/04/18/friendly-ghost-ducks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
