<?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>The Park is Vast &#187; Entity Scripting v0.85.3</title>
	<atom:link href="http://theparkisvast.com/VastPark/nerdy/site-building/entity-scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://theparkisvast.com</link>
	<description></description>
	<lastBuildDate>Mon, 31 Oct 2011 18:44:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>VietPark 1.5 Online</title>
		<link>http://theparkisvast.com/2007/04/06/vietpark-15-online/</link>
		<comments>http://theparkisvast.com/2007/04/06/vietpark-15-online/#comments</comments>
		<pubDate>Fri, 06 Apr 2007 07:17:00 +0000</pubDate>
		<dc:creator>craigomatic</dc:creator>
				<category><![CDATA[Entity Scripting v0.85.3]]></category>
		<category><![CDATA[Site Building v0.85.3]]></category>

	<!-- AutoMeta Start -->
	<category>features</category>
	<category>online</category>
	<category>control</category>
	<category>slider</category>
	<category>version</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://craigomatic.jumbahost.com/2007/04/06/vietpark-15-online/</guid>
		<description><![CDATA[A new version of VietPark is now online, here&#8217;s what I&#8217;ve changed: The site now shows all of my photos rather than just 5 max Added smart caching system to prevent redundant queries to Flickr Added a loading animation Removed the movie clapper, it wasnt being used for anything just yet so was adding unnecessary [...]]]></description>
			<content:encoded><![CDATA[<p>A new version of VietPark is now online, here&#8217;s what I&#8217;ve changed:</p>
<ul>
<li>The site now shows <strong>all</strong> of my photos rather than just 5 max</li>
<li>Added smart caching system to prevent redundant queries to Flickr</li>
<li>Added a loading animation</li>
<li>Removed the movie clapper, it wasnt being used for anything just yet so was adding unnecessary size</li>
<li>Removed the picture frames, instead im using the Slider plugin to display the images</li>
</ul>
<p>Its starting to get closer to where I want it for version 2, which I had a few ideas about over <a href="http://craigomatic.jumbahost.com/2007/04/01/a-collection-of-ideas/">here</a>.</p>
<p>Check it out for yourself at <a href="vp://vastpark/craigomatic/vietpark">vp://vastpark/craigomatic/vietpark</a> and let me know what you think.</p>
<p>BTW, thanks to <a href="http://vastpark.com/uprofile.php?UID=15">ashepherd</a> for his efforts in making the assets for VietPark.</p>
]]></content:encoded>
			<wfw:commentRss>http://theparkisvast.com/2007/04/06/vietpark-15-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VietPark &#8211; Part 4: Implementation</title>
		<link>http://theparkisvast.com/2007/03/04/vietpark-part-4-implementation/</link>
		<comments>http://theparkisvast.com/2007/03/04/vietpark-part-4-implementation/#comments</comments>
		<pubDate>Sun, 04 Mar 2007 07:24:41 +0000</pubDate>
		<dc:creator>craigomatic</dc:creator>
				<category><![CDATA[Content Importing v0.85.3]]></category>
		<category><![CDATA[Entity Scripting v0.85.3]]></category>
		<category><![CDATA[Site Building v0.85.3]]></category>

	<!-- AutoMeta Start -->
	<category>script</category>
	<category>easy</category>
	<category>describe</category>
	<category>champion</category>
	<category>modeller</category>
	<category>knock</category>
	<category>office</category>
	<category>quick</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://craigomatic.jumbahost.com/2007/03/04/vietpark-part-4-implementation/</guid>
		<description><![CDATA[
Setting up the actual layout of the site in the VastPark Site Builder is very quick and easy, so I got our champion 3D modeller in the office to knock up some assets for me and I did just that. Some of the ideas in the original mockup I&#8217;ve decided against, such as the walls. [...]]]></description>
			<content:encoded><![CDATA[
<p>Setting up the actual layout of the site in the VastPark Site Builder is very quick and easy, so I got our champion 3D modeller in the office to knock up some assets for me and I did just that.</p>
<p>Some of the ideas in the original mockup I&#8217;ve decided against, such as the walls. Instead its going to be a black space with the entities arranged in a similar way to how I previously wanted them. </p>
<p>Here&#8217;s are some screenshots that show the site in the builder:</p>
<p><a href='http://www.theparkisvast.com/wp-content/uploads/2007/03/vietpark_proto_shot1.jpg' title='VietPark - Alpha - Shot 1'><img src='http://www.theparkisvast.com/wp-content/uploads/2007/03/vietpark_proto_shot1.thumbnail.jpg' alt='VietPark - Alpha - Shot 1' /></a></p>
<p><a href='http://www.theparkisvast.com/wp-content/uploads/2007/03/vietpark_proto_shot2.jpg' title='VietPark - Alpha - Shot 2'><img src='http://www.theparkisvast.com/wp-content/uploads/2007/03/vietpark_proto_shot2.thumbnail.jpg' alt='VietPark - Alpha - Shot 2' /></a></p>
<p>And here is a code sample that shows how im making it all happen:</p>
<p><strong>Clicking the flags:</strong></p>
<p>Using the Flickr Plugin, this is fairly simple. First I search Flickr for my username and the tags for the images that I want to show for a particular example. The below code sample shows how to do the Saigon flag:</p>
<p><pre class="lua"><span style="color: #b1b100;">function</span> OnClick<span style="color: #66cc66;">&#40;</span>sender, entity<span style="color: #66cc66;">&#41;</span>
	<span style="color: #808080; font-style: italic;">--create the flickr object and perform a search</span>
	a = Flickr<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>	
	a:SearchUser<span style="color: #66cc66;">&#40;</span>'craigomatic', 'vietnam,saigon'<span style="color: #66cc66;">&#41;</span>	
	i = <span style="color: #cc66cc;">1</span>	
&nbsp;
	<span style="color: #808080; font-style: italic;">--generate an entity for each search result using the MoveNext command</span>
	<span style="color: #b1b100;">while</span> i &lt; <span style="color: #cc66cc;">6</span> <span style="color: #b1b100;">do</span>
		item = a:MoveNext<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		_GenerateEntity<span style="color: #66cc66;">&#40;</span>item, i, entity.Position<span style="color: #66cc66;">&#41;</span>
		i = i<span style="color: #cc66cc;">+1</span>	
	<span style="color: #b1b100;">end</span>
<span style="color: #b1b100;">end</span>
&nbsp;
<span style="color: #808080; font-style: italic;">--Create the function to generate an entity for each item</span>
<span style="color: #b1b100;">function</span> _GenerateEntity<span style="color: #66cc66;">&#40;</span>item, count,pos<span style="color: #66cc66;">&#41;</span>
	<span style="color: #808080; font-style: italic;">--dimensions of the entity</span>
	dim = Vector<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0.2</span>, <span style="color: #cc66cc;">0.2</span>, <span style="color: #cc66cc;">0.01</span><span style="color: #66cc66;">&#41;</span>	
	entity = GenerateBoxEntity<span style="color: #66cc66;">&#40;</span>dim, pos<span style="color: #66cc66;">&#41;</span>
	
	<span style="color: #808080; font-style: italic;">--add the OnClick events so each entity when clicked will go to the correct page</span>
	entity.Script.ScriptDictionary<span style="color: #66cc66;">&#91;</span>EventType.OnClick<span style="color: #66cc66;">&#93;</span>.Enabled = <span style="color: #b1b100;">true</span>;	
	<span style="color: #808080; font-style: italic;">--entity.Script.ScriptDictionary[EventType.OnClick].Payload = &quot;function OnClick(sender, entity)\r\ndest = GetEntity('PicDest')\r\ninFocus = dest:GetCustom('focused')\r\nif(inFocus ~= nil and inFocus.Name ~= entity.Name) then\r\ninFocus:SetPosition(inFocus:GetCustom('basePos'), 250)\r\ninFocus:SetCustom('atBase', true)\r\nend\r\nif(entity:GetCustom('atBase') == true) then\r\npos = GetEntity('PicDest').Position\r\nentity:SetPosition(pos,125)\r\nentity:SetCustom('atBase',false)\r\ndest:SetCustom('focused', entity)\r\nelse\r\nDebug(entity:GetCustom('basePos'):ToString())\r\npos = entity:GetCustom('basePos')\r\nentity:SetPosition(pos,125)\r\nentity:SetCustom('atBase',true)\r\nend\r\nend&quot;</span>
	entity.Script.ScriptDictionary<span style="color: #66cc66;">&#91;</span>EventType.OnClick<span style="color: #66cc66;">&#93;</span>.Payload = <span style="color: #ff0000;">&quot;function OnClick(sender, entity)<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>dest = GetEntity('PicDest')<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>inFocus = dest:GetCustom('focused')<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>if(inFocus ~= nil and inFocus.Name ~= entity.Name) then<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>inFocus:SetPosition(inFocus:GetCustom('basePos'), 250)<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>inFocus:SetRotation(inFocus:GetCustom('baseRot'), 250)<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>inFocus:SetCustom('atBase', true)<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>end<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>if(entity:GetCustom('atBase') == true) then<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>pos = GetEntity('PicDest').Position<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>entity:SetPosition(pos,125)<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>entity:SetRotation(Vector(0,0,0), 125)<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>entity:SetCustom('atBase',false)<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>dest:SetCustom('focused', entity)<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>else<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>pos = entity:GetCustom('basePos')<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>rot = entity:GetCustom('baseRot')<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>entity:SetPosition(pos,125)<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>entity:SetRotation(rot, 125)<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>entity:SetCustom('atBase',true)<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>end<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>end&quot;</span>
			
	e = GetEntity<span style="color: #66cc66;">&#40;</span>'frame'..count<span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#41;</span>
	destPos = Vector<span style="color: #66cc66;">&#40;</span>e.Position.x,e.Position.y,e.Position.z<span style="color: #66cc66;">&#41;</span>
	destRot = Vector<span style="color: #66cc66;">&#40;</span>e.Rotation.x, e.Rotation.y, e.Rotation.z<span style="color: #66cc66;">&#41;</span>
	
	<span style="color: #808080; font-style: italic;">--keep a record of where this entity first appeared at  </span>
	entity:SetCustom<span style="color: #66cc66;">&#40;</span>'basePos', Vector<span style="color: #66cc66;">&#40;</span>destPos.x, destPos.y, destPos.z<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #808080; font-style: italic;">--and its rotation</span>
	entity:SetCustom<span style="color: #66cc66;">&#40;</span>'baseRot', Vector<span style="color: #66cc66;">&#40;</span>destRot.x, destRot.y, destRot.z<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
	
	<span style="color: #808080; font-style: italic;">--tell it that its at the starting pos</span>
	entity:SetCustom<span style="color: #66cc66;">&#40;</span>'atBase', <span style="color: #b1b100;">true</span><span style="color: #66cc66;">&#41;</span>  
  	entity.RenderEnabled = <span style="color: #b1b100;">false</span>
	
  	<span style="color: #808080; font-style: italic;">--look for the image, and apply it to the entity</span>
  	<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>item.MediumUrl ~= nill<span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">then</span>
    	tex = LoadTextureURL<span style="color: #66cc66;">&#40;</span>count, item.MediumUrl<span style="color: #66cc66;">&#41;</span> 
    	SetTexture<span style="color: #66cc66;">&#40;</span>tex, entity<span style="color: #66cc66;">&#41;</span>
 	<span style="color: #b1b100;">end</span>  	
	
	entity.RenderEnabled = <span style="color: #b1b100;">true</span>
 	startpos = Vector<span style="color: #66cc66;">&#40;</span>pos.x,pos.y,pos.z<span style="color: #66cc66;">&#41;</span>
 	entity:SetPosition<span style="color: #66cc66;">&#40;</span>startpos,<span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>
	entity:SetScale<span style="color: #66cc66;">&#40;</span>Vector<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span>,<span style="color: #cc66cc;">2</span>,<span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>,<span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span> 
	Sleep<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>  
	entity:SetPosition<span style="color: #66cc66;">&#40;</span>destPos, <span style="color: #cc66cc;">500</span><span style="color: #66cc66;">&#41;</span>
	entity:SetScale<span style="color: #66cc66;">&#40;</span>Vector<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">7.5</span>,<span style="color: #cc66cc;">7.5</span>,<span style="color: #cc66cc;">7.5</span><span style="color: #66cc66;">&#41;</span>,<span style="color: #cc66cc;">500</span><span style="color: #66cc66;">&#41;</span>
	entity:SetRotation<span style="color: #66cc66;">&#40;</span>destRot, <span style="color: #cc66cc;">500</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #b1b100;">end</span></pre></p>
<p>To view this site in action, visit <a href="http://www.vastpark.com">www.vastpark.com</a> and sign up to get access to download the browser. Once you have downloaded the browser, the link to view VietPark is: <a href="vp://vastpark/craigomatic/vietpark">vp://vastpark/craigomatic/vietpark</a></p>
<p>Well thats it, version 1 of VietPark is up and running&#8230;so what do you think? Im already at work on version 2 which I&#8217;m pretty excited about. More details soon <img src='http://theparkisvast.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://theparkisvast.com/2007/03/04/vietpark-part-4-implementation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VietPark &#8211; Part 3: The Design</title>
		<link>http://theparkisvast.com/2007/02/28/vietpark-part-3-the-design/</link>
		<comments>http://theparkisvast.com/2007/02/28/vietpark-part-3-the-design/#comments</comments>
		<pubDate>Tue, 27 Feb 2007 21:37:01 +0000</pubDate>
		<dc:creator>craigomatic</dc:creator>
				<category><![CDATA[Entity Scripting v0.85.3]]></category>
		<category><![CDATA[Site Building v0.85.3]]></category>

	<!-- AutoMeta Start -->
	<category>design</category>
	<category>hand</category>
	<category>mockup</category>
	<category>sketches</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://craigomatic.jumbahost.com/2007/02/28/vietpark-part-3-the-design/</guid>
		<description><![CDATA[With the mockup sketches in hand, I can now look at how the scripting will come into play. My first design decision is to use Flickr as my photo storage area. The benefits of this are: VastPark supports Flickr natively through a plugin Flickr is free and nice to use I dont have to worry [...]]]></description>
			<content:encoded><![CDATA[<p>With the mockup sketches in hand, I can now look at how the scripting will come into play. </p>
<p>My first design decision is to use <a href="http://www.flickr.com">Flickr</a> as my photo storage area. The benefits of this are:</p>
<ol>
<li>VastPark supports Flickr natively through a plugin</li>
<li>Flickr is free and nice to use</li>
<li>I dont have to worry about the bandwith bill</li>
</ol>
<p>My second design decision is to use a managed control system for this site. Rather that letting the user walk around the site at will Im going to restrict the movement to certain regions so I can better control their experience.</p>
<p>With these design decisions in place, I can now think about the triggers and events I&#8217;m going to need for this site. I&#8217;ll take a look at this on an entity-by-entity basis:</p>
<p><strong>Flags</strong><br />
The flags are going to connect to Flickr and download a certain set of images according to my Flickr username and the tags I have applied to the pics. I want this to happen when the user clicks on the flag. I also want the flags to animate when the users mouse hovers over them.</p>
<p><em>Events</em><br />
OnClick: Connect to Flickr and generate entities for each search result<br />
OnHoverEnter: Play flag animation (looping) and apply the highlight shader<br />
OnHoverLeave: Stop flag animation and remove the highlight shader</p>
<p><strong>Movie clapper</strong><br />
When this is clicked on its going to cause the currently visible photos to begin a slideshow. Its animation will play while the mouse is over it and it will light up to show the user its clickable.</p>
<p><em>Events</em><br />
OnClick: Begin slideshow for currently visible photos<br />
OnHoverEnter: Play looping animation and apply highlight shader<br />
OnHoverLeave: Stop animation and remove highlight shader</p>
<p><strong>Notepad</strong><br />
Will allow the users to add a comment to my site.</p>
<p><em>Events</em><br />
OnClick: Open my blog to the comments section for Vietpark (alternatively use the comments section on the VastPark Commons)<br />
OnHoverEnter: Play looping animation and apply highlight shader<br />
OnHoverLeave: Stop animation and remove highlight shader</p>
<p>Finally I need to think about site events. When the site first loads I want it to connect to my chosen comments website and download all of the comments and the user&#8217;s avatar that posted the comment and generate entities for each one in the site. This can all happen asynchronously. So in the SiteLoadEnd event, I&#8217;ll write some code to accomplish this. </p>
<p>Its been fairly brief, but I now have a simple design that I can take to the implementation stage. </p>
]]></content:encoded>
			<wfw:commentRss>http://theparkisvast.com/2007/02/28/vietpark-part-3-the-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

