<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Quinn Blogs</title>
	
	<link>http://quinnstephens.com/blog</link>
	<description>The online ramblings of an aspiring author</description>
	<lastBuildDate>Mon, 10 Oct 2011 03:18:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/QuinnBlogs" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="quinnblogs" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>ALPACA Help Open Thread</title>
		<link>http://quinnstephens.com/blog/2011/09/alpaca-help-open-thread/</link>
		<comments>http://quinnstephens.com/blog/2011/09/alpaca-help-open-thread/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 15:22:24 +0000</pubDate>
		<dc:creator>Quinn</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[alpaca]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[first alpaca game]]></category>
		<category><![CDATA[open thread]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://quinnstephens.com/blog/?p=598</guid>
		<description><![CDATA[<p>Hi everyone, I&#8217;m going to leave this post up as an open thread for any questions, comments or issues you have using ALPACA. I can&#8217;t always answer questions immediately but I&#8217;ll do my best to respond promptly. Have at it!</p> ]]></description>
			<content:encoded><![CDATA[<p>Hi everyone, I&#8217;m going to leave this post up as an open thread for any questions, comments or issues you have using <a href="http://alpacaengine.com">ALPACA.</a> I can&#8217;t always answer questions immediately but I&#8217;ll do my best to respond promptly. Have at it!</p>
]]></content:encoded>
			<wfw:commentRss>http://quinnstephens.com/blog/2011/09/alpaca-help-open-thread/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>My Little Matrix</title>
		<link>http://quinnstephens.com/blog/2011/08/my-little-matrix/</link>
		<comments>http://quinnstephens.com/blog/2011/08/my-little-matrix/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 22:38:16 +0000</pubDate>
		<dc:creator>Quinn</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://quinnstephens.com/blog/?p=594</guid>
		<description><![CDATA[<p>To the Internet Dieities, I humbly bestow this offering of The Matrix Reloaded and My Little Pony, mashed up.</p> <p></p> ]]></description>
			<content:encoded><![CDATA[<p>To the Internet Dieities, I humbly bestow this offering of The Matrix Reloaded and My Little Pony, mashed up.</p>
<p><iframe src="http://www.youtube.com/embed/tReXtRiW7dI" frameborder="0" width="560" height="345"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://quinnstephens.com/blog/2011/08/my-little-matrix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ALPACA Tutorial: Exporting to a Single .swf File</title>
		<link>http://quinnstephens.com/blog/2011/07/alpaca-tutorial-exporting-to-a-single-swf-file/</link>
		<comments>http://quinnstephens.com/blog/2011/07/alpaca-tutorial-exporting-to-a-single-swf-file/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 18:40:55 +0000</pubDate>
		<dc:creator>Quinn</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[alpaca]]></category>
		<category><![CDATA[first alpaca game]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://quinnstephens.com/blog/?p=571</guid>
		<description><![CDATA[<p>A few people have asked about exporting ALPACA projects into a single .swf file &#8211; that is, without the data folder and the external music files. This could be a good option for any designers who want their games to be downloadable, or otherwise expect to move them around a bit and don&#8217;t want to deal with keeping multiple files in the right places. You won&#8217;t be able to easily change your settings, subtitles, or music after you&#8217;ve exported your game from Flash, but if that&#8217;s not a problem, this is a quick fix.</p> <p></p> <p>I&#8217;ll outline a quick-and-dirty method below. Look for the next ALPACA release to include a cleaner way to do this.</p> Create your ALPACA game as you normally would &#8211; use external files for your config settings, dialog, and background music. Check out my earlier [...]]]></description>
			<content:encoded><![CDATA[<p>A few people have asked about exporting ALPACA projects into a single .swf file &#8211; that is, without the data folder and the external music files. This could be a good option for any designers who want their games to be downloadable, or otherwise expect to move them around a bit and don&#8217;t want to deal with keeping multiple files in the right places. You won&#8217;t be able to easily change your settings, subtitles, or music after you&#8217;ve exported your game from Flash, but if that&#8217;s not a problem, this is a quick fix.</p>
<p><span id="more-571"></span></p>
<p>I&#8217;ll outline a quick-and-dirty method below. Look for the next ALPACA release to include a cleaner way to do this.</p>
<ol>
<li>Create your ALPACA game as you normally would &#8211; use external files for your config settings, dialog, and background music. Check out <a href="http://quinnstephens.com/blog/tag/first-alpaca-game/" target="_blank">my earlier tutorials</a> if you&#8217;re new to this part.</li>
<li>Once your game is ready to be published, import your background music (if you&#8217;re using it) into your Flash project. Open its properties, export it for Actionscript, and give it the Class name <strong>bgMusic</strong>. If you&#8217;re not using music, skip to step 6.</li>
<li>Open<strong> Muzak.as</strong>. At the top of the file, under all the import commands, add this new one:<br />
<code>import flash.utils.getDefinitionByName;</code></li>
<li>Replace the following line in public function Muzak:<br />
<code>music = new Sound(new URLRequest(musicURL));</code><br />
With these lines:<br />
<code>var musicID = getDefinitionByName("bgMusic");<br />
music = new musicID;</code></li>
<li>Test your project and make sure the music still works. If it sounds funny, you may want to play with Flash&#8217;s audio export settings, since Flash is now compressing it.</li>
<li>Now open up <strong>Engine.as</strong>.</li>
<li>In the<strong> startGame</strong> function, replace the following lines:<br />
<code>// Load external configuration data<br />
var jsURL = new URLRequest("data/config.js");<br />
configLoader = new URLLoader(jsURL);<br />
configLoader.addEventListener("complete", configLoaded);</p>
<p>// Load all spoken lines<br />
jsURL = new URLRequest("data/speechlines.js");<br />
speechLoader = new URLLoader(jsURL);<br />
speechLoader.addEventListener("complete", linesLoaded);</code><br />
With these ones:<br />
<code>configLoaded(new Event("filler"));<br />
linesLoaded(new Event("filler"));</code></li>
<li>Just below this function is the <strong>linesLoaded</strong> function. Replace the one line inside the brackets with these two:<code><br />
var jsonLines:String = '';<br />
linesData = JSON.decode(jsonLines);<br />
</code></li>
<li>Now open up <strong>speechlines.js</strong>. You&#8217;re going to need to put the entire contents of this file between those two empty quotes in <code>var jsonLines:String = ''</code>. But first, we need to eliminate the line breaks and escape the punctuation. <a href="http://alpacaengine.com/jsonconverter.html" target="_blank">I put together a simple web tool that will do this for you</a>. Copy the entire file, paste its contents into the input box, and hit the Convert button. Copy the result, and then paste it between the empty quotes. Make sure the whole thing is one solid string, with no breaks in it.</li>
<li>Finally, let&#8217;s fix the <strong>configLoaded </strong>function. You can copy your external file into a string, like we just did, if you want. However, you might find it easier to simply delete the line that reads<br />
<code>configData = JSON.decode(configLoader.data);</code><br />
and then replace the value for each of the following lines with their data from your config file.  Just remember to use Actionscript syntax now. Here&#8217;s a sample:<br />
<code>useAudio = true;<br />
playerScale=1;<br />
walkRate=15;<br />
targetBuffer = 20;<br />
playerName = "Player";<br />
firstLocation="firstroom";<br />
saveID = "alpacasample";</code><br />
You can ignore the <em>gameURL, musicURL, endMusicURL, saveURL,</em> and <em>thisVersion</em> variables, since they no longer apply.</li>
<li>One last thing, if you are using an external music file for your ending screen: scroll all the way down to the <strong>endGame </strong>function. Delete this line:<br />
<code>options.changeMusic(endMusicURL);</code><br />
You can import the music into the Flash project and put it in your ending movie clip manually.</li>
</ol>
<p>And that&#8217;s our (relatively) quick method. Like I said, the next ALPACA release will include a better way to do this, by making the config and speechlines data into their own classes. Feel free to report any issues or ask questions in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://quinnstephens.com/blog/2011/07/alpaca-tutorial-exporting-to-a-single-swf-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This Might Be A Thing: Retro HTML5 Animation</title>
		<link>http://quinnstephens.com/blog/2011/06/this-might-be-a-thing-retro-html5-animation/</link>
		<comments>http://quinnstephens.com/blog/2011/06/this-might-be-a-thing-retro-html5-animation/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 16:57:11 +0000</pubDate>
		<dc:creator>Quinn</dc:creator>
				<category><![CDATA[This Might Be A Thing]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[hype]]></category>
		<category><![CDATA[this might be a thing]]></category>

		<guid isPermaLink="false">http://quinnstephens.com/blog/?p=566</guid>
		<description><![CDATA[<p></p> <p>A little test I put together using Hype, a new app for creating animations entirely in CSS3 and Javascript. It was surprisingly quick and easy. The interface is still a little rough around the edges but there&#8217;s great potential here. Expect to see some more of this soon.</p> ]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://quinnstephens.com/testbed/hype/test1/anim.html" width="600" height="400" scrolling="no" frameborder="0"></iframe></p>
<p>A little test I put together using <a href="http://tumultco.com/hype" target="_blank">Hype</a>, a new app for creating animations entirely in CSS3 and Javascript. It was surprisingly quick and easy. The interface is still a little rough around the edges but there&#8217;s great potential here. Expect to see some more of this soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://quinnstephens.com/blog/2011/06/this-might-be-a-thing-retro-html5-animation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Your First ALPACA Game, Part 4: Inventory Items and Puzzles</title>
		<link>http://quinnstephens.com/blog/2011/05/creating-your-first-alpaca-game-part-4-inventory-items-and-puzzles/</link>
		<comments>http://quinnstephens.com/blog/2011/05/creating-your-first-alpaca-game-part-4-inventory-items-and-puzzles/#comments</comments>
		<pubDate>Sat, 28 May 2011 04:18:19 +0000</pubDate>
		<dc:creator>Quinn</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[alpaca]]></category>
		<category><![CDATA[first alpaca game]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://quinnstephens.com/blog/?p=514</guid>
		<description><![CDATA[<p>Click here for part 1 of the Create your First ALPACA Tutorial</p> <p>We&#8217;ve got our character, our environment, and our primary goal. Now we just need to add a simple puzzle and we&#8217;ll have a complete (albeit super bare-bones) game. The player needs to get a keycard in order to use the teleporter. We could just make a keycard and put it on the floor; this would be the same process as making the teleporter, except we&#8217;d have to give the keycard a &#8220;_G&#8221; tag in order to add it to the inventory (in other words, its instance name would be keycard_O_G, making it an obstacle and a Gettable object). But let&#8217;s make the first room a little more interactive instead. This will also give us an opportunity to create a Usable object.</p> <p>Open up the room1 clip and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://quinnstephens.com/blog/2011/05/creating-your-first-alpaca-game-part-1-the-player-character/">Click here for part 1 of the Create your First ALPACA Tutorial</a></p>
<p>We&#8217;ve got our character, our environment, and our primary goal. Now we just need to add a simple puzzle and we&#8217;ll have a complete (albeit super bare-bones) game. The player needs to get a keycard in order to use the teleporter. We could just make a keycard and put it on the floor; this would be the same process as making the teleporter, except we&#8217;d have to give the keycard a &#8220;_G&#8221; tag in order to add it to the inventory (in other words, its instance name would be keycard_O_G, making it an obstacle and a Gettable object). But let&#8217;s make the first room a little more interactive instead. This will also give us an opportunity to create a Usable object.</p>
<p><span id="more-514"></span>Open up the room1 clip and add a new symbol to it. Design a keyframe dispenser within the symbol and give it the instance name <strong>dispenser_U </strong>within room1.</p>
<p><img class="aligncenter size-medium wp-image-547" title="alpacaGrabs4_0019_Layer-2" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs4_0019_Layer-2-525x358.png" alt="" width="525" height="358" /></p>
<p>Up in the timeline, add two frames with the labels &#8220;closed&#8221; and &#8220;open.&#8221; Make sure to put the stop(); action on each frame as well. This will allow us to change the movie clip slightly once the player has used the dispenser. In my case I lit up on of the display lights on the dispenser to show that it had dispensed a keycard.</p>
<p><img class="aligncenter size-full wp-image-546" title="alpacaGrabs4_0018_Layer-3" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs4_0018_Layer-3.png" alt="" width="413" height="408" /></p>
<p>Add a usePoint at floor level in front of the dispenser. This is all you need to add, since the dispenser is not an obstacle.</p>
<p><img class="aligncenter size-medium wp-image-545" title="alpacaGrabs4_0017_Layer-4" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs4_0017_Layer-4-451x358.png" alt="" width="451" height="358" /></p>
<p>Open up speechlines.js and add some lines about the dispenser so the player can interact with it.</p>
<p><img class="aligncenter size-medium wp-image-548" title="speech1" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/speech1-600x167.jpg" alt="" width="600" height="167" /></p>
<p>Test your movie. Notice that, when you choose to use the dispenser, JaNET automatically moves to it and uses her grab animation. But nothing actually happens beyond this &#8211; and her &#8220;use&#8217; line from the speechlines file doesn&#8217;t play. That&#8217;s because we need to add this special functionality within the Puzzle class. This will the be first real coding we have to do in our ALPACA project.</p>
<p>In your com/laserdragonuniversity/alpaca folder, open up <strong>Puzzle.as</strong>. Scroll down to the bottom of the main Puzzle function and add these two lines after <code>allPuzzles = new Object;</code><br />
<code><br />
allPuzzles.room1 = new Object;<br />
allPuzzles.room1.usedDispenser = false;<br />
</code></p>
<p>This will give us a property we can use to tell ALPACA whether or not the player has used the dispenser. You&#8217;ll see how this plays out in a moment. Next, scroll down to the usedItem function. This will be called whenever the player uses any item with the _U tag in its instance name. In the switch statement, above the line that reads <code>default:</code>, add the following code:<br />
<code><br />
case "DISPENSER":<br />
var dispenser;<br />
for (var i in Engine.usableItems){<br />
if (Engine.usableItems[i].displayName == "DISPENSER")<br />
dispenser = Engine.usableItems[i];<br />
}<br />
dispenser.gotoAndStop("open");<br />
speech = new Speech(stageRef, dispenser, "use");<br />
allPuzzles.room1.usedDispenser = true;<br />
break;<br />
</code></p>
<p>What we&#8217;re doing here is locating the dispenser movie clip in order to control it (I was never able to find a more elegant way to do so than by scanning all the usable items for it, which is clunky, but it works). Then we&#8217;re switching it over to the &#8220;open&#8221; frame that we created earlier. After that, we set JaNET to speak the appropriate line, and we change the puzzle property we created earlier to reflect that the player has used the dispenser.</p>
<p>Test your movie. Now the dispenser changes when the player uses it, and we get the appropriate line.</p>
<p><img class="aligncenter size-medium wp-image-544" title="alpacaGrabs4_0016_Layer-5" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs4_0016_Layer-5-503x358.png" alt="" width="503" height="358" /></p>
<p><strong>EDIT: </strong>I totally forgot one thing &#8211; the keycard dispenser needs to become unusable once we get the keycard (since multiple keycards are of no use in this example). So add a couple lines of code to the block we&#8217;ve just edited, right before the break:</p>
<p><code>dispenser.usable = false;<br />
dispenser.lookTag = "2";</code></p>
<p>The &#8220;lookTag&#8221; means that when we try to use the dispenser again, the engine will use the line &#8220;use2&#8243; instead of &#8220;use&#8221; within speechlines.js. So add a line in the speechlines file under the &#8220;DISPENSER&#8221; block:</p>
<p><code>"use2":"I already got the keycard."</code></p>
<p>OK, there&#8217;s just one thing we&#8217;re missing &#8211; the keycard itself. First we have to make one.</p>
<p>Draw a keycard in a new symbol. Name it keycardProper and make sure to export it for Actionscript. Next, create a new blank symbol, call it keycardInv, and place keycardProper in it. This second symbol is the one that will appear in the player&#8217;s inventory &#8211; it&#8217;s a separate symbol in case you want to change the appearance of something after the player picks it up.</p>
<p><img class="aligncenter size-full wp-image-543" title="alpacaGrabs4_0015_Layer-6" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs4_0015_Layer-6.png" alt="" width="224" height="207" /></p>
<p>Now go back to Puzzle.as and add these lines to the switch statement we just edited, between the lines <code>allPuzzles.room1.usedDispenser = true;</code> and <code>break;</code><br />
<code><br />
var keycard = new keycardInv;<br />
keycard.displayName = "KEYCARD";<br />
inv.addInvItem(keycard.displayName);<br />
</code><br />
This will create a new instance of the keycard and place it in the inventory when the player uses the dispenser. Test your movie. Now it works!</p>
<p><img class="aligncenter size-medium wp-image-542" title="alpacaGrabs4_0014_Layer-7" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs4_0014_Layer-7-503x358.png" alt="" width="503" height="358" /></p>
<p>You&#8217;ll get errors if you try to use or look at the keycard in your inventory, because we haven&#8217;t set up any speechlines for it. Open up speechlines.js and add some.</p>
<p><img class="aligncenter size-medium wp-image-550" title="speech2" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/speech21-600x167.jpg" alt="" width="600" height="167" /></p>
<p>Note the lines &#8220;useDISPENSER&#8221; and &#8220;useWINDOW&#8221; &#8211; those will tell ALPACA what to have JaNET say when we try to use the keycard with the dispenser and window, respectively. Right now you can&#8217;t use inventory items with each other, but it wouldn&#8217;t be too hard to add that functionality.</p>
<p>You&#8217;ll also note that if you leave the room and come back, the keycard dispenser goes back to its default (&#8220;closed&#8221;) state. We can fix this by adding the following code within Puzzle.as, in the <code>newBackground</code> function:<br />
<code><br />
switch (thisBack){</code></p>
<p><code> case "room1":<br />
if(allPuzzles.room1.usedDispenser){<br />
var dispenser;<br />
for (var i in Engine.usableItems){<br />
if (Engine.usableItems[i].displayName == "DISPENSER")<br />
dispenser = Engine.usableItems[i];<br />
}<br />
dispenser.gotoAndStop("open");<br />
dispenser.usable = false;<br />
dispenser.lookTag = "2";<br />
</code><br />
<code> }<br />
break;<br />
</code></p>
<p>This method gets called whenever the player enters a new room. We&#8217;re making use of the usedDispenser property to maintain the change to the dispenser. You&#8217;ll want to do this for anything you change in a background as a result of player actions.</p>
<p>OK, now for the final step: creating a custom movie clip for when JaNET uses the keycard on the teleporter. Right now, nothing will happen if you try this. When you try to use an item on another item, ALPACA will check to see if there is a movie clip in the library pertaining to that action. Once we create it and name it properly, it will show up automatically when we play the game.</p>
<p>Create a new movie clip and name it <strong>action_KEYCARD_TELEPORTER</strong> (export for Actionscript, you know the drill).</p>
<p><img class="aligncenter size-full wp-image-540" title="alpacaGrabs4_0012_Layer-9" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs4_0012_Layer-9.png" alt="" width="479" height="611" /></p>
<p>Drag <strong>teleporterProper </strong>from the library into the clip. Now here&#8217;s the important thing: ALPACA will remove the player and the teleporter from the stage when this clip is activated, and replace it with the movie clip for the clip&#8217;s duration. That means that you need to make sure that the items in the movie clip are properly lined up, so the user doesn&#8217;t see a sudden jump when the movie clip starts.  To do this, open up <strong>teleporter </strong>(the version with the obstacle nodes in <strong>room2</strong>) and check the properties of the<strong>proper </strong>movie clip. Note its x and y value. Open up action_KEYCARD_TELEPORTER, select the teleporterProper instance, and set its x and y to those same values. This will keep it properly lined up with the teleporter in room2.</p>
<p>Test your movie. Now you can use the keycard, but JaNET just disappears and nothing happens.</p>
<p><img class="aligncenter size-medium wp-image-538" title="alpacaGrabs4_0010_Layer-11" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs4_0010_Layer-11-503x358.png" alt="" width="503" height="358" /></p>
<p>That&#8217;s because ALPACA is replacing JaNET and the obstacle with our new movie clip, which only contains the teleporter. ALPACA is waiting for the movie clip to report back that the clip is finished with the &#8221;clipFinished&#8221; event, and since the movie clip never sends that message, it will stay on the stage indefinitely. Let&#8217;s fix that.</p>
<p>First, let&#8217;s put JaNET in the clip. In teleporter, make note of the x and y values of the usePoint. Drag <strong>Player</strong> from the library into our new clip and set it to those x and y values. You&#8217;ll also need to apply a flip horizontal transform so she faces the right way. Put JaNET on a separate layer within the movie clip and use Modify-&gt;Break Apart to turn it from a symbol into a graphic (this is important &#8211; otherwise there will be more than one Player object in the scene and that will create a conflict). JaNET&#8217;s shadow will still be a movie clip, which is fine &#8211; place that on another layer behind her.</p>
<p><img class="aligncenter size-full wp-image-535" title="alpacaGrabs4_0007_Layer-14" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs4_0007_Layer-14.png" alt="" width="479" height="339" /></p>
<p>Break Apart the teleporter as well. Add a keyframe at frame 30 (two seconds, since the project is set to 15fps by default). Change the gradient in the middle to something brighter and glowy. Select the space on the layer between the keyframes and add a Shape Tween, so we get a nice fade from gray to glow.</p>
<p><img class="aligncenter size-full wp-image-533" title="alpacaGrabs4_0005_Layer-16" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs4_0005_Layer-16.png" alt="" width="479" height="339" /></p>
<p>On a new layer, add a glowy rectangle. Use shape tweens to make it expand outward and upward over the course of a few seconds.</p>
<p><img class="aligncenter size-full wp-image-532" title="alpacaGrabs4_0004_Layer-17" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs4_0004_Layer-17.png" alt="" width="540" height="516" /></p>
<p>Create a keyframe for JaNET in which she has floated up and rotated a bit into the glowy portal, then apply a Classic Tween in between the keyframes.</p>
<p><img class="aligncenter size-medium wp-image-531" title="alpacaGrabs4_0003_Layer-18" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs4_0003_Layer-18-452x358.png" alt="" width="452" height="358" /></p>
<p>On the frame where she reaches the portal, make a big flash. Use shape tweens to make it start small and expand quickly, like an explosion. Play round with this animation (press Enter to preview it) until it looks like JaNET being drawn into the portal to your standards.</p>
<p><img class="aligncenter size-medium wp-image-530" title="alpacaGrabs4_0002_Layer-21" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs4_0002_Layer-21-600x125.png" alt="" width="600" height="125" /></p>
<p>Now we need to add an <strong>actionPlayerspot </strong>instance from the library. Name the instance <strong>playerspot. </strong>This indicates where the player will be placed after the movie clip has ended. Since we&#8217;re ending the game after this clip, it doesn&#8217;t matter where we put it, but you should get in the habit of using it.</p>
<p><img class="aligncenter size-medium wp-image-529" title="alpacaGrabs4_0001_Layer-19" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs4_0001_Layer-19-382x358.png" alt="" width="382" height="358" /></p>
<p>Our final step is to create an action layer, add a keyframe on the final frame, and then add the following lines of code on that keyframe:</p>
<p><code>stop();<br />
dispatchEvent(new Event("clipFinished"));<br />
</code></p>
<p>Test your movie. It works, but JaNET just reappears at the position of our playerspot. We still need to add the code that ends the game here; back to Puzzle.as! In the performedAction functon, add the following within the switch statement:<br />
<code><br />
case "[object action_KEYCARD_TELEPORTER]":<br />
stageRef.dispatchEvent(new Event("endGame"));<br />
break;<br />
</code><br />
Once again, test your movie and solve the puzzle. Now we get a generic ending! Woohoo!</p>
<p><img class="aligncenter size-medium wp-image-528" title="alpacaGrabs4_0000_Layer-20" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs4_0000_Layer-20-503x358.png" alt="" width="503" height="358" /></p>
<p>All you have to do now is spice up your opening and closing titles and you know have a (barely) functional game!</p>
<p><a href="http://alpacaengine.com/samples/tutorial1">Play our sample game here. </a>(The whole thing breaks mysteriously when I try to embed it here in WordPress. Something to look into, no doubt).</p>
<p><a href="http://alpacaengine.com/samples/tutorial1/my_first_alpaca.zip">Download the full project files here.</a></p>
<p>All right, this concludes the basic ALPACA tutorial. At some point soon I&#8217;ll post some supplementary tutorials dealing with the other aspects of the engine, like the conversation system, and using audio for the speech lines.</p>
]]></content:encoded>
			<wfw:commentRss>http://quinnstephens.com/blog/2011/05/creating-your-first-alpaca-game-part-4-inventory-items-and-puzzles/feed/</wfw:commentRss>
		<slash:comments>47</slash:comments>
		</item>
		<item>
		<title>Creating Your First ALPACA Game, Part 3: Connecting Rooms and Adding Obstacles</title>
		<link>http://quinnstephens.com/blog/2011/05/creating-your-first-alpaca-game-part-3-connecting-rooms-and-adding-obstacles/</link>
		<comments>http://quinnstephens.com/blog/2011/05/creating-your-first-alpaca-game-part-3-connecting-rooms-and-adding-obstacles/#comments</comments>
		<pubDate>Mon, 16 May 2011 20:47:11 +0000</pubDate>
		<dc:creator>Quinn</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[alpaca]]></category>
		<category><![CDATA[first alpaca game]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://quinnstephens.com/blog/?p=481</guid>
		<description><![CDATA[<p>Click here for part 1 of the Create your First ALPACA Tutorial</p> <p>Now that we&#8217;ve created our first room, let&#8217;s add a second one. Really, this will be the other side of the same room, but since ALPACA doesn&#8217;t allow for scrolling backgrounds yet, this is our best way to make the environment feel a bit more expansive.</p> <p></p> <p>Since this is an extension of the first room and will share a lot of the same details, like the floor, we&#8217;ll just duplicate the room1 symbol to save time. Select it in the library, Duplicate it, and name the new version room2. Remember to export it for Actionscript.</p> <p></p> <p>Now play around a bit with the details &#8211; we can remove the left wall and the window, extend the detail on the walls, and add a new curved wall [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://quinnstephens.com/blog/2011/05/creating-your-first-alpaca-game-part-1-the-player-character/">Click here for part 1 of the Create your First ALPACA Tutorial</a></p>
<p>Now that we&#8217;ve created our first room, let&#8217;s add a second one. Really, this will be the other side of the same room, but since ALPACA doesn&#8217;t allow for scrolling backgrounds yet, this is our best way to make the environment feel a bit more expansive.</p>
<p><span id="more-481"></span></p>
<p>Since this is an extension of the first room and will share a lot of the same details, like the floor, we&#8217;ll just duplicate the room1 symbol to save time. Select it in the library, Duplicate it, and name the new version <strong>room2.</strong> Remember to export it for Actionscript.</p>
<p><img class="aligncenter size-full wp-image-504" title="alpacaGrabs3_0021_Layer-1" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs3_0021_Layer-1.png" alt="" width="506" height="365" /></p>
<p>Now play around a bit with the details &#8211; we can remove the left wall and the window, extend the detail on the walls, and add a new curved wall on the far side (don&#8217;t forget to make that wall a symbol so the player can&#8217;t walk past it).</p>
<p><img class="aligncenter size-medium wp-image-502" title="alpacaGrabs3_0017_Layer-5" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs3_0017_Layer-5-560x358.png" alt="" width="560" height="358" /></p>
<p>&nbsp;</p>
<p>Move the startPoint over to the left, where the player will be entering the room, and change its instance name to <strong>startPoint_room1. </strong>Now ALPACA will know to place the player here when they&#8217;ve entered from room1.</p>
<p><img class="aligncenter size-medium wp-image-501" title="alpacaGrabs3_0016_Layer-6" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs3_0016_Layer-6-554x358.png" alt="" width="554" height="358" /></p>
<p>In the userInterface folder in the library you&#8217;ll find a symbol called <strong>exitArrow. </strong>Drag that onto the stage, rotate it so it points left and scale it up a bit. Give it an instance name of <strong>EXIT_room1 </strong>and place it over startPoint_room1.</p>
<p><img class="aligncenter size-medium wp-image-500" title="alpacaGrabs3_0015_Layer-7" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs3_0015_Layer-7-554x358.png" alt="" width="554" height="358" /></p>
<p>We&#8217;ve almost connected our two rooms now; we just need to add the connection points to our original room. Open up room1 again and place another startPoint and an exitArrow on the right side. Name these <strong>startPoint_room2 </strong>and <strong>EXIT_room2</strong>, respectively.</p>
<p><img class="aligncenter size-medium wp-image-499" title="alpacaGrabs3_0012_Layer-10" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs3_0012_Layer-10-538x358.png" alt="" width="538" height="358" /></p>
<p>Go ahead and test the project, and you should be able to move from room to room. That&#8217;s all there is to it! You can add as many rooms as you like in this fashion, as long as you have exits and startpoints on either side.</p>
<p>We still don&#8217;t have much of anything in either room, of course. Let&#8217;s add our &#8220;door,&#8221; the one the player will need to find a &#8220;key&#8221; for. Since we have a sci-fi theme going, we&#8217;ll make it a teleporter instead of a standard door. Open up room2 again and create a new layer. On this layer, draw a circle with a metallic radial gradient. Make it large enough to fit JaNET on top, but not so big that she can&#8217;t maneuver around it.</p>
<p><img class="aligncenter size-medium wp-image-498" title="alpacaGrabs3_0011_Layer-11" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs3_0011_Layer-11-517x358.png" alt="" width="517" height="358" /></p>
<p>Convert this drawing to a movieclip and name it <strong>teleporter. </strong>Go ahead and add some details to it to spice it up, and let&#8217;s add a button next to it for good measure. Once you&#8217;re done drawing, select everything and convert it to a movieclip within this movieclip. Name it <strong>teleporterProper </strong>in the library, and give it an instance name of <strong>proper. </strong>This will distinguish the actual visible part of the teleporter from all the other stuff we&#8217;re about to add to it.</p>
<p><img class="aligncenter size-full wp-image-496" title="alpacaGrabs3_0008_Layer-14" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs3_0008_Layer-14.png" alt="" width="361" height="173" /></p>
<p>If you run the project now, JaNET will be able to roll directly over the teleporter, since we haven&#8217;t set it up as an obstacle yet. To tell ALPACA this is an obstacle, simply open up the room2 movieclip, select the teleporter and change its instance name to <strong>teleporter_O. </strong>Go ahead and test the movie&#8230;</p>
<p><img class="aligncenter size-full wp-image-495" title="alpacaGrabs3_0007_Layer-15" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs3_0007_Layer-15.png" alt="" width="541" height="154" /></p>
<p>Oops, the game breaks. This is because we haven&#8217;t laid down the symbols we need in order for ALPACA to define the boundaries of the obstacle. We&#8217;re going to need to add four corner nodes, a depthSplit line, and a usePoint. If you get this error message in the future, it might be because you forgot to add one or more of these things to your obstacles.</p>
<p>Let&#8217;s open up <strong>teleporter </strong>again (not teleporterProper, mind you). Drag the <strong>depthSplit</strong> from the library and place it about halfway up the height of the drawing. Give it the instance name of &#8220;depthSplit.&#8221; This line is used to determine when the player should appear in front of the obstacle and when they should appear behind it. You might need to tweak its location if it doesn&#8217;t look right during gameplay.</p>
<p><img class="aligncenter size-medium wp-image-494" title="alpacaGrabs3_0006_Layer-16" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs3_0006_Layer-16-588x358.png" alt="" width="588" height="358" /></p>
<p>Next, drag one of the black nodes from the library and duplicate it until you have four. Arrange them into a rough box shape around the teleporter. Try to take perspective into account here, but don&#8217;t worry about being too exact. Name their instances, clockwise from the upper left, <strong>nodeUL</strong>, <strong>nodeUR</strong>, <strong>nodeLR</strong>, and <strong>nodeLL </strong>(you probably noticed that&#8217;s Upper Left, Upper Right, Lower Right, and Lower Left).</p>
<p><img class="aligncenter size-medium wp-image-493" title="alpacaGrabs3_0005_Layer-17" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs3_0005_Layer-17-588x358.png" alt="" width="588" height="358" /></p>
<p>Finally, drag the red <strong>usePoint </strong>out of the library and place it in front of the button. Give a little space, because JaNET is going to center her shadow over this, so it shouldn&#8217;t be too close to the obstacle itself.</p>
<p><img class="aligncenter size-medium wp-image-492" title="alpacaGrabs3_0004_Layer-18" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs3_0004_Layer-18-588x358.png" alt="" width="588" height="358" /></p>
<p>Test your movie again. Not only should you no longer get an error message, but JaNET will maneuver around the obstacle on her way across the room and back. If the movement looks weird, try changing the location of the nodes or the depthSplit until it suits you.</p>
<p>So we&#8217;ve created an obstacle, but we can&#8217;t do anything with it yet. Change its instance name to <strong>teleporter_O_L. </strong>Just like with the window, adding the _L to the name will make it interactive. Before you test this, open up <strong>speechlines.js</strong> and add some lines about the teleporter.</p>
<p><img class="aligncenter size-full wp-image-490" title="alpacaGrabs3_0001_Layer-21" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs3_0001_Layer-21.png" alt="" width="575" height="197" /></p>
<p>Go ahead and run your game again, and you should be able to look at the teleporter and attempt to use it. Of course, you can&#8217;t use the door until you have the key, so in the next part of this tutorial I&#8217;ll cover how to add an inventory item and make a very basic puzzle.</p>
<p><img class="aligncenter size-medium wp-image-489" title="alpacaGrabs3_0000_Layer-23" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs3_0000_Layer-23-569x358.png" alt="" width="569" height="358" /></p>
]]></content:encoded>
			<wfw:commentRss>http://quinnstephens.com/blog/2011/05/creating-your-first-alpaca-game-part-3-connecting-rooms-and-adding-obstacles/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Creating your First ALPACA Game, Part 2: Making a Room</title>
		<link>http://quinnstephens.com/blog/2011/05/creating-your-first-alpaca-game-part-2-making-a-room/</link>
		<comments>http://quinnstephens.com/blog/2011/05/creating-your-first-alpaca-game-part-2-making-a-room/#comments</comments>
		<pubDate>Fri, 06 May 2011 04:27:38 +0000</pubDate>
		<dc:creator>Quinn</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[alpaca]]></category>
		<category><![CDATA[first alpaca game]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://quinnstephens.com/blog/?p=441</guid>
		<description><![CDATA[<p>Click here for part 1 of the Create your First ALPACA Tutorial</p> <p>OK, we&#8217;ve created a new player character, so a big chunk of our work is already done. Now we need an appropriate environment for the game, something a little nicer than the default orange plain of nothingness. How about a futuristic-looking space station? We&#8217;ll go with the clean white THX-1138 look, because it&#8217;s cool, and more importantly, it&#8217;s easy to draw.</p> <p></p> <p>First, go to Insert-&#62;New Symbol (or hit Cmd/Ctrl+F8) and create a new movieclip called &#8220;room1.&#8221; Make sure to expand the advanced settings and check &#8220;export for Actionscript.&#8221; This will allow ALPACA to find this background in the library. You may get a warning message saying that Flash will automatically create a class definition upon export, but you can ignore this.</p> <p></p> <p>Now we have a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://quinnstephens.com/blog/2011/05/creating-your-first-alpaca-game-part-1-the-player-character/">Click here for part 1 of the Create your First ALPACA Tutorial</a></p>
<p>OK, we&#8217;ve created a new player character, so a big chunk of our work is already done. Now we need an appropriate environment for the game, something a little nicer than the default orange plain of nothingness. How about a futuristic-looking space station? We&#8217;ll go with the clean white THX-1138 look, because it&#8217;s cool, and more importantly, it&#8217;s easy to draw.</p>
<p><span id="more-441"></span></p>
<p>First, go to Insert-&gt;New Symbol (or hit Cmd/Ctrl+F8) and create a new movieclip called &#8220;room1.&#8221; Make sure to expand the advanced settings and check &#8220;export for Actionscript.&#8221; This will allow ALPACA to find this background in the library. You may get a warning message saying that Flash will automatically create a class definition upon export, but you can ignore this.</p>
<p><img class="aligncenter size-medium wp-image-471" title="alpacaGrabs2_0020_Layer-1" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs2_0020_Layer-1-537x358.png" alt="" width="537" height="358" /></p>
<p>Now we have a movieclip that will contain our new background, the first room of a two-room space station. Let&#8217;s start by bringing in some outside graphics to use for our space view background. You can actually do all of your graphics this way, and avoid doing any drawing in Flash at all, if you prefer. It&#8217;ll generally make your game file larger (depending on your image compression settings), but it gives you more freedom in terms of your look. It also lets you save time by grabbing <a href="http://www.jpl.nasa.gov/spaceimages/">public domain images off the web</a>, which is where I got <a href="http://alpacaengine.com/downloads/spaceview.png">this space scene.</a> Download that image and grab it with File-&gt;Import-&gt;Import to Stage. This should place the image with the top left corner at 0,0 (right where the little crosshair is). If not, set its X and Y values to 0 in the properties window so it will line up properly with the screen. This image is 700&#215;450 pixels, which is the same as the screen size of our project, so while you can place things outside the image area if you want, they won&#8217;t show up when you run the game.</p>
<p><img class="aligncenter size-medium wp-image-470" title="alpacaGrabs2_0019_Layer-2" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs2_0019_Layer-2-537x358.png" alt="" width="537" height="358" /></p>
<p>Let&#8217;s create the walls and floor next. Draw a big rectangle over the top of the image like so, and give it a very light gray-white gradient and a dark gray stroke. You might want to put this on a new layer; splitting your composition across multiple layers makes it a lot easier to edit later.</p>
<p><img class="aligncenter size-medium wp-image-469" title="alpacaGrabs2_0018_Layer-3" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs2_0018_Layer-3-537x358.png" alt="" width="537" height="358" /></p>
<p>Next, set the rectangle tool&#8217;s color to black and give it some rounded edges. Draw a black rounded rectangle over the wall (make sure this is on the same layer as the wall rectangle).</p>
<p><img class="aligncenter size-medium wp-image-468" title="alpacaGrabs2_0017_Layer-4" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs2_0017_Layer-4-537x358.png" alt="" width="537" height="358" /></p>
<p>Select the rectangle and delete it, and now we have a window! Let&#8217;s make it look a little nicer by selecting the stroke around it and setting it to something around 4 pixels. Then make a new layer behind the wall layer and draw some dark gray rectangles to make a frame &#8211; this will give the window some appearance of depth.</p>
<p><img class="aligncenter size-medium wp-image-466" title="alpacaGrabs2_0015_Layer-6" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs2_0015_Layer-6-537x358.png" alt="" width="537" height="358" /></p>
<p>Our last step on the window will be to give it some shine so it doesn&#8217;t just look like a hole in the wall. Put another rounded rectangle over most of the window&#8217;s surface.</p>
<p><img class="aligncenter size-medium wp-image-465" title="alpacaGrabs2_0014_Layer-7" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs2_0014_Layer-7-537x358.png" alt="" width="537" height="358" /></p>
<p>Now set it to a gradient from white, alpha 100%, to white, alpha 0%. There &#8211; a nice glassy shine.</p>
<p><img class="aligncenter size-medium wp-image-464" title="alpacaGrabs2_0013_Layer-8" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs2_0013_Layer-8-537x358.png" alt="" width="537" height="358" /></p>
<p>Go ahead and add some more graphical details to the wall as you see fit. Creating a wall on the left is a good idea, too, since it will make it clear that there&#8217;s nothing to explore in that direction.</p>
<p><img class="aligncenter size-medium wp-image-463" title="alpacaGrabs2_0012_Layer-9" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs2_0012_Layer-9-537x358.png" alt="" width="537" height="358" /></p>
<p>Next comes the important part: the floor, which the user will actually interact with. Make a new layer just above the space image and draw a simple rectangle across it. Then select it and convert it to a movieclip called <strong>room1Ground</strong>. You don&#8217;t need to export this for Actionscript&#8230;</p>
<p><img class="aligncenter size-medium wp-image-462" title="alpacaGrabs2_0011_Layer-10" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs2_0011_Layer-10-537x358.png" alt="" width="537" height="358" /></p>
<p>&#8230;but you <em>do </em>need to select it and make sure its instance name is &#8220;ground.&#8221; That&#8217;s how ALPACA knows that the user can move across it.</p>
<p><img class="aligncenter size-full wp-image-461" title="alpacaGrabs2_0010_Layer-11" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs2_0010_Layer-11.png" alt="" width="282" height="114" /></p>
<p>We just have a couple more steps before we&#8217;re ready to test out our new background. Create a new layer called &#8220;startPoint.&#8221; Then go to the Library, expand the userInterface folder, and drag the blue <strong>startPoint</strong> symbol to the stage. Put it somewhere in the middle of the room. Then set its instance name to &#8220;startPoint.&#8221;</p>
<p><img class="aligncenter size-medium wp-image-460" title="alpacaGrabs2_0009_Layer-12" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs2_0009_Layer-12-537x358.png" alt="" width="537" height="358" /></p>
<p>Now we&#8217;ll need to duck out of Flash for a second to change the starting location to our new room. Open up the data folder within the blank_project folder and open up <em>config.js</em>. Locate the line that reads:</p>
<p><code>"firstLocation":"default",</code></p>
<p>and replace it with:</p>
<p><code>"firstLocation":"room1",</code></p>
<p>Now return to Flash, Test your Movie, and voila! JaNET is now freely wandering our new room!</p>
<p><img class="aligncenter size-medium wp-image-458" title="alpacaGrabs2_0007_Layer-14" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs2_0007_Layer-14-557x358.png" alt="" width="557" height="358" /></p>
<p>While our game is now technically functional, we&#8217;ve got a couple of problems to deal with. The first one you may have noticed was this error message in your Output window:</p>
<p><img class="aligncenter size-full wp-image-457" title="alpacaGrabs2_0006_Layer-15" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs2_0006_Layer-15.png" alt="" width="600" height="400" /></p>
<p>What&#8217;s that mean? Well, ALPACA is looking for something that&#8217;s not there; in this case, it&#8217;s the UseBox, that little two-option window that appears when you click on an interactive item. The UseBox isn&#8217;t there because we don&#8217;t have any interactive items. So let&#8217;s remedy that by making the window a Look-at-able item.</p>
<p>Select the shiny effect we put over the window and convert it to a movieclip called <strong>room1Window. </strong>Now comes the critical ALPACAfied part: give it the instance name of &#8220;window_L.&#8221; That underscore-L means that this is a Look-at-able item, and the &#8220;window&#8221; part will be its name onscreen.</p>
<p><img class="aligncenter size-full wp-image-456" title="alpacaGrabs2_0005_Layer-16" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs2_0005_Layer-16.png" alt="" width="283" height="114" /></p>
<p>Since it&#8217;s Look-at-able, ALPACA expects there to be a line for when the player looks at the window, and all those lines are stored in the <em>speechlines.js </em>file in our data folder. Open that up and place the following right after the line <code>"observations":{</code></p>
<p><code><br />
"WINDOW":{</code><code><br />
"look": "Space, the glowy frontier!"<br />
},</code></p>
<p>Now test the movie again, and not only should you be error-free, you can look at the window.</p>
<p><img class="aligncenter size-medium wp-image-454" title="alpacaGrabs2_0003_Layer-21" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs2_0003_Layer-21-537x358.png" alt="" width="537" height="358" /></p>
<p>If you try to use the window, you&#8217;ll get the default &#8220;I can&#8217;t use that&#8221; line:</p>
<p><img class="aligncenter size-medium wp-image-453" title="alpacaGrabs2_0002_Layer-20" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs2_0002_Layer-20-537x358.png" alt="" width="537" height="358" /></p>
<p>In order to get around this, you&#8217;ll need to put another line in the speechlines file:</p>
<p><code><br />
"WINDOW":{<br />
"look":"Space, the glowy frontier!",<br />
"use":"I don't think opening the window is a good idea."<br />
},</code></p>
<p>Awesome, our room is part of the game! Go ahead and add other things to the background if you want the player to interact with them. Just make sure they&#8217;re movie clips with the proper ALAPCA-style instance names, and make sure you create dialog lines in the speechlines file to go along with them. Now we just have one more problem to deal with:</p>
<p><img class="aligncenter size-medium wp-image-452" title="alpacaGrabs2_0001_Layer-19" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs2_0001_Layer-19-537x358.png" alt="" width="537" height="358" /></p>
<p>If you click too far to the left, JaNET can wheel right past the edge of the wall. This is a quick fix &#8211; we just need to make the back wall into a movie clip, so we can&#8217;t click on the floor through it. This won&#8217;t be perfect &#8211; JaNET can still wheel a little too far toward it and overlap the wall &#8211; but it&#8217;s better than it was before.</p>
<p>And just like that, we have our first room and our first bit of interactivity. You can go ahead and delete the default room now if you want to keep your library clean*.</p>
<p>Next, in Part 3, <a title="Creating Your First ALPACA Game, Part 3: Connecting Rooms and Adding Obstacles" href="http://quinnstephens.com/blog/2011/05/creating-your-first-alpaca-game-part-3-connecting-rooms-and-adding-obstacles/">we&#8217;ll build a second room and link them together, and lay the groundwork for our first puzzle</a>. Stay tuned!</p>
<p><em>*If you saved your game while running the original blank project, and then deleted the default background, you may get an error called &#8220;ReferenceError: Error #1065&#8243;, and your save/restore menu will not appear when you click on the icon. This is because ALPACA is trying to create a fake screenshot from a movieclip that no longer exists. In order to get around this problem, open <strong>SaveRestore.as</strong> in your com/laserdragonuniversity/alpaca folder. Scroll down to line 46 and uncomment the code that clears the save data:</em><br />
<code><br />
// Un-comment this if you want save data to be cleared each time the SWF is opened<br />
// Probably only necessary for testing purposes<br />
shared = SharedObject.getLocal("alpaca");<br />
shared.clear();<br />
</code><br />
<em>Test your movie once, and you should no longer get the error message. Then comment these lines out again. Any time you need to clear your local memory, this will do the trick.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://quinnstephens.com/blog/2011/05/creating-your-first-alpaca-game-part-2-making-a-room/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Creating your First ALPACA Game, Part 1: The Player Character</title>
		<link>http://quinnstephens.com/blog/2011/05/creating-your-first-alpaca-game-part-1-the-player-character/</link>
		<comments>http://quinnstephens.com/blog/2011/05/creating-your-first-alpaca-game-part-1-the-player-character/#comments</comments>
		<pubDate>Tue, 03 May 2011 16:20:36 +0000</pubDate>
		<dc:creator>Quinn</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[alpaca]]></category>
		<category><![CDATA[first alpaca game]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://quinnstephens.com/blog/?p=410</guid>
		<description><![CDATA[<p>Since my wall-o&#8217;-text documentation for ALPACA is probably not the friendliest introduction to the engine, I figured I would do a quick tutorial series showing how you can make a simple one-puzzle game using the engine. I&#8217;ll try to incorporate as many of ALPACA&#8217;s features as I can while still keeping things easy and accessible.</p> <p>We&#8217;ll base this game around that adventure game puzzle you may remember as &#8220;basically every adventure game puzzle ever&#8221; &#8211; finding a key and using it to open a door.</p> <p></p> <p>To follow this tutorial you&#8217;ll need the latest (2.0) version of ALPACA, available here. Download and extract the ZIP file, then navigate to source-&#62;blank_project and open up alpaca_blank_2-0.fla.</p> <p>This is a barebones project that contains just enough code and graphic elements to make an ALPACA game that actually loads. Go ahead and hit [...]]]></description>
			<content:encoded><![CDATA[<p>Since my wall-o&#8217;-text <a title="ALPACA Documentation" href="http://alpacaengine.com/docs" target="_blank">documentation</a> for ALPACA is probably not the friendliest introduction to the engine, I figured I would do a quick tutorial series showing how you can make a simple one-puzzle game using the engine. I&#8217;ll try to incorporate as many of ALPACA&#8217;s features as I can while still keeping things easy and accessible.</p>
<p>We&#8217;ll base this game around that adventure game puzzle you may remember as &#8220;basically every adventure game puzzle ever&#8221; &#8211; finding a key and using it to open a door.</p>
<p><span id="more-410"></span></p>
<p>To follow this tutorial you&#8217;ll need the latest (2.0) version of ALPACA, available <a href="http://alpacaengine.com/downloads/alpaca_source_2-0.zip" target="_blank">here</a>. Download and extract the ZIP file, then navigate to source-&gt;blank_project and open up <strong>alpaca_blank_2-0.fla.</strong></p>
<p>This is a barebones project that contains just enough code and graphic elements to make an ALPACA game that actually loads. Go ahead and hit Cmd/Ctrl + Enter to Test Movie. You&#8217;ll find a not-very-exciting game with a bouncing ball for a main character and a single obstacle that you can pick up. But it works!</p>
<p><img class="aligncenter size-full wp-image-433" title="alpacaGrabs1_0014_Layer-1" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs1_0014_Layer-1.png" alt="" width="600" height="427" /></p>
<p>So let&#8217;s take this project and make it our own. First, go ahead and save it as an alternate filename, <strong>my_first_alpaca.fla </strong>or whatever you like.</p>
<p>Let&#8217;s start by creating a new, more interesting player character. Since animating a walk cycle is a lot of work, we&#8217;ll make our character a robot with wheels instead of legs. And since the Internet never gets tired of <em>Portal </em>references, let&#8217;s call her JaNET and base her off those wonderful turret designs from Valve&#8217;s magnum opus.</p>
<p><img class="aligncenter size-full wp-image-434" title="Turret-portal" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/Turret-portal.jpg" alt="" width="250" height="561" /></p>
<p>In the library, expand the playerElements folder and open up<strong> Player</strong>. The four required frames for the Player movieclip, labeled <em>default, walk, talk</em>, and <em>grab</em>, are already here, so we&#8217;ll just edit the movie clips contained in each frame. Right now we&#8217;re in the <em>default</em> frame, which contains the movie clip called &#8220;playerSide.&#8221; This is just a non-animated clip of the player character. Right now each frame contains a nested movie clip, which is a good way to embed more complex animations, but since we&#8217;re trying to keep things simple we can just build our whole player character right here.</p>
<p><img class="aligncenter size-full wp-image-432" title="alpacaGrabs1_0013_Layer-2" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs1_0013_Layer-2.png" alt="" width="501" height="427" /></p>
<p>Go ahead and delete the &#8220;player&#8221; layer and create a new one called &#8220;head.&#8221; Select the Oval tool from the tools menu and set the fill to white and the stroke to black. Put the stroke width value at about 2.00, and create a simple egg shape.</p>
<p><img class="aligncenter size-medium wp-image-431" title="alpacaGrabs1_0012_Layer-4" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs1_0012_Layer-4-324x358.png" alt="" width="324" height="358" /></p>
<p>Click the middle of the egg shape once to select the fill. Then, in the Color window, change the setting from &#8220;solid color&#8221; to &#8220;linear gradient.&#8221; We&#8217;re going to give it a slightly more three-dimensional look. The default gradient should come up as black to white, so change the black to a slightly off-white gray value. Then use the Gradient Transform Tool to rotate the gradient so we have white at the top and off-white on the bottom, scaled to the size of the egg.</p>
<p><img class="aligncenter size-medium wp-image-430" title="alpacaGrabs1_0011_Layer-3" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs1_0011_Layer-3-324x358.png" alt="" width="324" height="358" /></p>
<p>Next, use the line tool to draw a gray line down the length of the egg. Use the Free Transform Tool to drag the line into a curve, like so.</p>
<p><img class="aligncenter size-medium wp-image-429" title="alpacaGrabs1_0010_Layer-5" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs1_0010_Layer-5-324x358.png" alt="" width="324" height="358" /></p>
<p>Now create a new layer above &#8220;head&#8221; and name it &#8220;mouth.&#8221; This is going to look more like an eye, but since it will glow when the player speaks, it&#8217;s a mouth as far as we&#8217;re concerned. Make a small circle in the middle of the egg, and set its fill to a dull blue gradient.</p>
<p><img class="aligncenter size-medium wp-image-428" title="alpacaGrabs1_0009_Layer-6" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs1_0009_Layer-6-324x358.png" alt="" width="324" height="358" /></p>
<p>If you run Test Movie again, you&#8217;ll find that the demo is still functional. Now you play as a weird floating egg thing that doesn&#8217;t actually animate, but all the movement still works, and since you retained the &#8220;hitspot&#8221; shadow underneath the new design, you can still maneuver around the box. The only thing that doesn&#8217;t work is picking up the box, because the engine is listening for a sign that the &#8220;grab&#8221; animation is finished, and we don&#8217;t have that animation any more. We&#8217;ll add that shortly, but first let&#8217;s get the walking and talking animations looking prettier.</p>
<p>Navigate to the <em>talk </em>(third) frame and create a keyframe on the &#8220;mouth&#8221; layer. Make sure to create a keyframe on the last frame (<em>grab</em>) too, so the mouth change is restricted to this one action. Next, select the mouth&#8217;s fill and change the gradient colors to something brighter. You can add some glow around it as well if you&#8217;re feeling fancy.</p>
<p><img class="aligncenter size-full wp-image-427" title="alpacaGrabs1_0008_Layer-7" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs1_0008_Layer-7.png" alt="" width="600" height="427" /></p>
<p>Test your movie again and when you look at the box, JaNET&#8217;s eye/mouth will glow as she speaks. It&#8217;s not much, but a little visual cue that someone is speaking is always helpful, and this saves us from having to do lip sync.</p>
<p>Let&#8217;s add the wheels and their movement. Add a new layer between &#8220;mouth&#8221; and &#8220;labels&#8221; and name it &#8220;wheels.&#8221;</p>
<p>Next, draw an ellipse with a nice radial gradient. Add as many details as you want, but make sure you add something small along the rims that we can move around later to give the illusion of rotation, like these little circles.</p>
<p><img class="aligncenter size-full wp-image-425" title="alpacaGrabs1_0006_Layer-9" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs1_0006_Layer-9.png" alt="" width="600" height="427" /></p>
<p>You&#8217;ll have to cheat a bit to add the second wheel, since given this perspective it should really be behind the head &#8211; but that would require doing a second layer, and we&#8217;re trying to keep things simple. Just arrange it so that the incorrect stacking isn&#8217;t noticeable.</p>
<p><img class="aligncenter size-medium wp-image-424" title="alpacaGrabs1_0005_Layer-10" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs1_0005_Layer-10-523x358.png" alt="" width="523" height="358" /></p>
<p>OK, now we need to make the wheels appear to spin. In order to do this we&#8217;re going to nest a movie clip within our timeline. Any animation we put within that clip will continue to loop automatically as long as the <em>walk </em>frame is active. Create a keyframe on the &#8220;wheels&#8221; layer at the <em>walk </em>frame (and don&#8217;t forget to put another one right after it on the <em>talk </em>frame). Click on the keyframe to select everything on the layer, then hit F8 and convert the wheels to a movie clip with the name <strong>playerWheelsMoving.</strong></p>
<p><strong><img class="aligncenter size-full wp-image-423" title="alpacaGrabs1_0004_Layer-11" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs1_0004_Layer-11.png" alt="" width="518" height="426" /><br />
</strong></p>
<p>Now double-click on the new movie clip and we can start animating. Copy the dots, or whatever details you&#8217;re going to be animating, to their own layer on the top (you might need to fill in some gaps in the drawings that they leave behind). Create at least two more keyframes for the dots layer and move the dots in each keyframe as though they&#8217;re rotating around the edge of the wheel. Since this is going to be a quick animation loop, you don&#8217;t have to be too exact. Watch the animation in action by Testing Movie and moving your new character around the screen. You may have to play with it a bit before it looks right.</p>
<p><img class="aligncenter size-full wp-image-422" title="alpacaGrabs1_0003_Layer-12" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs1_0003_Layer-12.png" alt="" width="550" height="427" /></p>
<p>Once you&#8217;re satisfied with your spinning wheel loop, head back to the Player movie clip and we&#8217;ll add our final action, <em>grab. </em>Since JaNET is a robot, we can avoid having to do any complicated arm animations by giving her a robotic alternative; say, a tractor beam. Add a new layer above &#8220;wheels&#8221; and name it &#8220;beam.&#8221; Create a keyframe on the final frame.</p>
<p>Let&#8217;s give this action a distinct color so it doesn&#8217;t look too much like our &#8220;talk&#8221; non-animation. Change the color of the eye/mouth to a bright orange (there should already be a keyframe on this frame). Then, on the beam layer, make a rectangle with a gradient of roughly the same color, going from 75% to 0% opacity.</p>
<p><img class="aligncenter size-medium wp-image-421" title="alpacaGrabs1_0002_Layer-13" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs1_0002_Layer-13-483x358.png" alt="" width="483" height="358" /></p>
<p>Using the Free Transform tool, adjust the vertices of the rectangle and curve the small end so it looks like it&#8217;s being projected from the eye.</p>
<p><img class="aligncenter size-medium wp-image-420" title="alpacaGrabs1_0001_Layer-14" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs1_0001_Layer-14-483x358.png" alt="" width="483" height="358" /></p>
<p>Now we just need a nice sound effect to really sell this. I&#8217;ve created one you can use <a href="http://alpacaengine.com/downloads/tractorbeam.mp3">here</a>, or just find/create your own if you prefer. Since we also need to nest a movie clip here in order to tell ALPACA when the grabbing motion is finished, we can solve both problems at once by selecting this frame of the &#8220;beam&#8221; layer and converting it to a movie clip called <strong>playerGrabBeam. </strong></p>
<p>Open the clip and create a new layer called &#8220;audio.&#8221; Import the audio clip you&#8217;re using to your library, and then with the audio layer selected, drag it onto the stage. You&#8217;ll see a small piece of the waveform appear on your first frame. We&#8217;ll need to extend the clip in order to accomodate the audio&#8217;s length, so if you&#8217;re using the sample clip, set a frame on the audio layer and the beam layer at frame 9. Otherwise, play with the length until you find the point where your own audio clip ends.</p>
<p><img class="aligncenter size-full wp-image-419" title="alpacaGrabs1_0000_Layer-16" src="http://quinnstephens.com/blog/wp-content/uploads/2011/05/alpacaGrabs1_0000_Layer-16.png" alt="" width="275" height="122" /></p>
<p>Now for the important bit: create a new layer called &#8220;actions&#8221; and place a keyframe on your final frame. With that frame selected, open the Actions panel and place the following line of code:</p>
<p><code>parent.dispatchEvent(new Event("clipFinished"));</code></p>
<p>This is how we alert ALPACA that the grab animation is finished. You&#8217;ll need to do this in any custom animations you create.</p>
<p>One last thing: in the Properties window, you&#8217;ll note a line that says &#8220;Profile: Default.&#8221; Click on the Edit button next to it, and next to &#8220;Audio Event,&#8221; click &#8220;Set.&#8221; Change the compression to &#8220;Speech&#8221; and hit OK. This is going to make your audio higher quality; at the default quality, my custom sound effect becomes a static mess.</p>
<p>Now go ahead and Test Movie. You should be able to move JaNET around the screen and pick up the obstacle with all our new animations. Success! We&#8217;ve created our own player character. You can now delete all the original player elements from the library if you&#8217;d like; just make sure not to delete Player and playerHitSpot, which are the only movie clips we&#8217;re still using.</p>
<p>So we&#8217;ve got our new character, now we need to create an environment worthy of our little robot friend!</p>
<p>Next, in Part 2: <a href="http://quinnstephens.com/blog/2011/05/creating-your-first-alpaca-game-part-2-making-a-room/">creating a new room.</a></p>
<p>Feel free to leave any questions or issues in the comments.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://quinnstephens.com/blog/2011/05/creating-your-first-alpaca-game-part-1-the-player-character/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
<enclosure url="http://alpacaengine.com/downloads/tractorbeam.mp3" length="24018" type="audio/mpeg" />
		</item>
		<item>
		<title>This Might Be A Thing: Captain Fiona McAvoy</title>
		<link>http://quinnstephens.com/blog/2011/03/this-might-be-a-thing-captain-fiona-mcavoy/</link>
		<comments>http://quinnstephens.com/blog/2011/03/this-might-be-a-thing-captain-fiona-mcavoy/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 22:14:35 +0000</pubDate>
		<dc:creator>Quinn</dc:creator>
				<category><![CDATA[This Might Be A Thing]]></category>
		<category><![CDATA[captain mcavoy]]></category>
		<category><![CDATA[morningstar]]></category>
		<category><![CDATA[steampunk]]></category>
		<category><![CDATA[this might be a thing]]></category>

		<guid isPermaLink="false">http://quinnstephens.com/blog/?p=400</guid>
		<description><![CDATA[<p>Welcome to This Might Be A Thing, my new series in which I post small snippets of my more grandiose project ideas. I feel like getting at least one element of them out in the world will help me actually complete one of the damn things sometime. This thing that might be a thing is from a steampunk graphic novel I&#8217;m developing.</p> <p></p> ]]></description>
			<content:encoded><![CDATA[<p>Welcome to This Might Be A Thing, my new series in which I post small snippets of my more grandiose project ideas. I feel like getting at least one element of them out in the world will help me actually complete one of the damn things sometime. This thing that might be a thing is from a steampunk graphic novel I&#8217;m developing.</p>
<p><img class="aligncenter size-full wp-image-401" title="McAvoy_vintage" src="http://quinnstephens.com/blog/wp-content/uploads/2011/03/McAvoy_vintage.jpg" alt="Captain McAvoy" width="500" height="833" /></p>
]]></content:encoded>
			<wfw:commentRss>http://quinnstephens.com/blog/2011/03/this-might-be-a-thing-captain-fiona-mcavoy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Minecraft Diary: Underwater Arboretum</title>
		<link>http://quinnstephens.com/blog/2011/02/minecraft-diary-underwater-arboretum/</link>
		<comments>http://quinnstephens.com/blog/2011/02/minecraft-diary-underwater-arboretum/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 01:18:11 +0000</pubDate>
		<dc:creator>Quinn</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[minecraft]]></category>
		<category><![CDATA[videogames]]></category>

		<guid isPermaLink="false">http://quinnstephens.com/blog/?p=377</guid>
		<description><![CDATA[<p>As I explained in my last Minecraft diary entry, trying to keep a day-by-day account of my adventures in blockyland didn&#8217;t really pan out. Now I&#8217;ve spent so much time in my game world that I&#8217;ve started thinking of it more as a series of projects than as a simulated day-to-day existence. My latest project is a Rapture-style underwater arboretum that I&#8217;ve cleverly named &#8220;Atlantis Arboretum.&#8221;</p> <p class="wp-caption-text">If the Flintstones designed a boat...</p> <p></p> <p>I&#8217;ve already built my first underwater reverse-fishbowl, but this is much too small to host an entire tree farm, so it&#8217;ll have to be expanded. I&#8217;ve learned that there&#8217;s no real easy way to do this; you basically have to build your whole structure out of dirt , coat the oustide in glass, and then dig out the dirt piece by piece.</p> <p class="wp-caption-text">The best [...]]]></description>
			<content:encoded><![CDATA[<p>As I explained in<a href="http://quinnstephens.com/blog/2011/02/minecraft-diary-day-957/"> my last Minecraft diary entry</a>, trying to keep a day-by-day account of my adventures in blockyland didn&#8217;t really pan out. Now I&#8217;ve spent so much time in my game world that I&#8217;ve started thinking of it more as a series of projects than as a simulated day-to-day existence. My latest project is a Rapture-style underwater arboretum that I&#8217;ve cleverly named &#8220;Atlantis Arboretum.&#8221;</p>
<div id="attachment_378" class="wp-caption aligncenter" style="width: 610px"><img class="size-medium wp-image-378" title="Boat Survey" src="http://quinnstephens.com/blog/wp-content/uploads/2011/02/2011-02-17_17.55.56-600x358.png" alt="Surveying by Boat" width="600" height="358" /><p class="wp-caption-text">If the Flintstones designed a boat...</p></div>
<p><span id="more-377"></span></p>
<p>I&#8217;ve already built my first underwater reverse-fishbowl, but this is much too small to host an entire tree farm, so it&#8217;ll have to be expanded. I&#8217;ve learned that there&#8217;s no real easy way to do this; you basically have to build your whole structure out of dirt , coat the oustide in glass, and then dig out the dirt piece by piece.</p>
<div id="attachment_379" class="wp-caption aligncenter" style="width: 610px"><img class="size-medium wp-image-379" title="Welcome to Rapture" src="http://quinnstephens.com/blog/wp-content/uploads/2011/02/2011-02-17_16.53.55-600x358.png" alt="Reverse fishbowl" width="600" height="358" /><p class="wp-caption-text">The best part is using jack-o-lanterns for underwater light sources. Just like in real life!</p></div>
<p><a href="http://minecraftwiki.net">Minepedia</a> tells me that I need at least 8 empty spaces above a planted sapling to ensure that my trees can grow to full height. Surveying the bay in which I&#8217;m building, I decide on a plot of around 20 by 10 blocks. I&#8217;ll stack maybe 5 layers of glass at the top and then just dig out the rest to save some time. But that&#8217;s still 1000 blocks of dirt I have to place in order to create a base. I try to figure out if there&#8217;s some clever way to avoid this, but in Minecraft there&#8217;s no way to actually drain water from a structure &#8211; water blocks will just stay where they are forever unless you fill the space with something solid, or carry it away in a bucket (and I&#8217;m definitely not trying to do that with 1000 blocks). So my only option is to gather up a mighty dirt supply, hold my breath, and get to work.</p>
<p><img class="aligncenter size-medium wp-image-380" title="Posts" src="http://quinnstephens.com/blog/wp-content/uploads/2011/02/2011-02-19_00.07.56-600x358.png" alt="Posts" width="600" height="358" /></p>
<p>I start out by building four posts to mark the borders of the structure (now scaled down a bit), and also to give me something to stand on, since you sink unless you hold down on the spacebar constantly. The water here is pretty deep and it doesn&#8217;t take long to figure out that diving down, placing a couple of dirt blocks, and then having to swim right back to the surface is not exactly a very efficient method. I don&#8217;t know if Notch is planning to add scuba gear to the game (although he&#8217;s a PADI certified diver, so I wouldn&#8217;t put it past him). So I try to think of an alternate method. Then I remember that sand and gravel don&#8217;t have the antigravity properties that effect things like dirt and cobblestone in this world; if you place them without a supporting block below them, they&#8217;ll fall until they hit one, right through air, lava or water. Now I have a new plan.</p>
<p><img class="aligncenter size-medium wp-image-381" title="Frame" src="http://quinnstephens.com/blog/wp-content/uploads/2011/02/2011-02-19_11.36.21-600x358.png" alt="Frame" width="600" height="358" /></p>
<p>I use the posts I built to create an entire frame around my planned base. Then, I walk along it and place gravel and sand blocks against it, which keep falling until they&#8217;ve filled all the space below. It&#8217;s a lot quicker and I get to stay in the sweet, sweet air while I do it. But when I experimentally start chipping away at the parts of the frame I&#8217;ve already used, I end up punching a hole in the ocean.</p>
<div id="attachment_382" class="wp-caption aligncenter" style="width: 610px"><img class="size-medium wp-image-382" title="Hole in the Ocean" src="http://quinnstephens.com/blog/wp-content/uploads/2011/02/2011-02-19_12.05.29-600x358.png" alt="Hole in the Ocean" width="600" height="358" /><p class="wp-caption-text">That&#39;s a sheep swimming in there.</p></div>
<p>Minecraft&#8217;s water physics are mysterious to me, so it takes a lot of placing dirt, removing dirt, placing water in buckets, and praying for rain before I&#8217;m able to fix this craziness. In the process I do manage to fill up my entire arboretum frame, but so much of that involves just diving down and placing blocks manually that I&#8217;m forced to declare my brilliant gravity-assisted plan a failure.</p>
<div id="attachment_383" class="wp-caption aligncenter" style="width: 610px"><img class="size-medium wp-image-383" title="Finally" src="http://quinnstephens.com/blog/wp-content/uploads/2011/02/2011-02-19_12.30.12-600x358.png" alt="Finally!" width="600" height="358" /><p class="wp-caption-text">Finally.</p></div>
<p>So now I just need about a million blocks of glass to coat this thing with. There&#8217;s an island nearby that I don&#8217;t care about very much, so I head over and plunder it of its precious sand until all my shovels break. Take that, natural resources!</p>
<p><img class="aligncenter size-medium wp-image-384" title="Beach" src="http://quinnstephens.com/blog/wp-content/uploads/2011/02/2011-02-19_12.48.21-600x358.png" alt="Beach" width="600" height="358" /></p>
<p><img class="aligncenter size-medium wp-image-385" title="Placing glass" src="http://quinnstephens.com/blog/wp-content/uploads/2011/02/2011-02-19_12.31.50-600x358.png" alt="Placing glass" width="600" height="358" /></p>
<p>Placing the glass is slow going. I end up working well into the night. Monsters don&#8217;t seem to spawn on the ice, which is helpful, but I need a way to get into my underwater passage without having to swim to shore and risk arrows and creepers on the way to an entrance. So I build this little underwater airlock. Or waterlock. Or something. Whatever it is, it&#8217;s cool and useful.</p>
<p><img class="aligncenter size-medium wp-image-386" title="Waterlock" src="http://quinnstephens.com/blog/wp-content/uploads/2011/02/2011-02-19_10.43.55-600x358.png" alt="Waterlock" width="600" height="358" /></p>
<p>A few in-game days pass as I place glass blocks as fast as my furnaces can produce them from the sand. Eventually I have a nice, solid glass coating and a whole bunch of dirt to dig back out. Plus some water blocks here and there that I somehow missed, which put out all my torches a few times. Fighting a current in pitch blackness really makes you regret a rush job.</p>
<p><img class="aligncenter size-medium wp-image-388" title="Hidden water" src="http://quinnstephens.com/blog/wp-content/uploads/2011/02/2011-02-19_12.40.43-600x358.png" alt="Hidden water" width="600" height="358" /></p>
<p>Once I&#8217;ve dealt with those few surprise floods, though, I&#8217;m able to cruise through the digging and I finally have something that looks like a greenhouse!</p>
<div id="attachment_389" class="wp-caption aligncenter" style="width: 610px"><img class="size-medium wp-image-389" title="It begins" src="http://quinnstephens.com/blog/wp-content/uploads/2011/02/2011-02-19_13.13.05-600x358.png" alt="Beginnings of an arboretum" width="600" height="358" /><p class="wp-caption-text">Woohoo!</p></div>
<p>I do wish that Minecraft&#8217;s engine did a slightly better job with underwater glass. For some reason the water is constantly running down the glass, even if the blocks around it are stationary, so you always have the sound of a flowing stream when you&#8217;re down here. Also, it just doesn&#8217;t look like you&#8217;re underwater; the whole blurry blue look that you get when you swim underwater doesn&#8217;t affect a view through glass, and the shoreline appears so clearly that it might as well just be raining outside. Oh well, it looks cool from the surface.</p>
<p><img class="aligncenter size-medium wp-image-390" title="Arboretum from above" src="http://quinnstephens.com/blog/wp-content/uploads/2011/02/2011-02-19_15.54.23-600x358.png" alt="Arboretum from above" width="600" height="358" /></p>
<div id="attachment_398" class="wp-caption aligncenter" style="width: 610px"><img class="size-medium wp-image-398" title="Bouyant cow" src="http://quinnstephens.com/blog/wp-content/uploads/2011/02/2011-02-19_16.06.37-600x358.png" alt="Bouyant cow" width="600" height="358" /><p class="wp-caption-text">Hovercow!</p></div>
<p>I finish my digging and start planting. I don&#8217;t need wood that desperately, so I don&#8217;t plant in a fully efficient pattern. I figure I&#8217;ll be using this arboretum as much for the coolness of a stroll through an underwater forest as I will for the actual wood blocks.</p>
<p><img class="aligncenter size-medium wp-image-391" title="First planting" src="http://quinnstephens.com/blog/wp-content/uploads/2011/02/2011-02-19_18.12.48-600x358.png" alt="First planting" width="600" height="358" /></p>
<p>And it doesn&#8217;t take very long for the trees to start growing. A few of them spring up literally while my back is turned. Just like in real life!</p>
<p><img class="aligncenter size-medium wp-image-392" title="First trees" src="http://quinnstephens.com/blog/wp-content/uploads/2011/02/2011-02-19_18.18.51-600x358.png" alt="First trees" width="600" height="358" /></p>
<p>I quickly discover that the trees grow so densely that a stroll isn&#8217;t as easy as it sounds. But I&#8217;m pleased with my work and I decide it&#8217;s time to declare Atlantis Arboretum officially open for business. I celebrate by hacking down all the trees and replanting the saplings they drop. I end up with tons of wood &#8211; getting wood blocks, especially if I need them at night, should no longer be a problem.<img class="aligncenter size-medium wp-image-393" title="Atlantis at night" src="http://quinnstephens.com/blog/wp-content/uploads/2011/02/2011-02-19_18.20.54-600x358.png" alt="Atlantis at night" width="600" height="358" /></p>
<p><img class="aligncenter size-medium wp-image-394" title="Atlantis underwater" src="http://quinnstephens.com/blog/wp-content/uploads/2011/02/2011-02-19_18.21.03-600x358.png" alt="Atlantis underwater" width="600" height="358" /></p>
<p>So where do I go from here? Intoxicated by success, I briefly consider expanding Atlantis into a full underwater city (or a big underwater house, at least), but then I remember how annoying it is to place all those dirt blocks. I decide to approach a more practical issue: Atlantis is located in a bay about halfway between Castle Quinn and my mountaintop villa. It&#8217;s connected to the castle through a long series of tunnels, but not the villa. If I want to get here from the villa quickly &#8211; and you should always have a plan for emergency midnight arboretum visits &#8211; I&#8217;ll need to build the route. Next time: I start laying down some rails.</p>
]]></content:encoded>
			<wfw:commentRss>http://quinnstephens.com/blog/2011/02/minecraft-diary-underwater-arboretum/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

