<?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>Turing tarpit &#187; game balance</title>
	<atom:link href="http://www.turingtarpit.com/tag/game-balance/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.turingtarpit.com</link>
	<description>Where everything is possible but nothing of interest is easy –Alan Perlis</description>
	<lastBuildDate>Thu, 11 Mar 2010 02:01:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The tweetcoding learning experience</title>
		<link>http://www.turingtarpit.com/2009/03/the-tweetcoding-learning-experience/</link>
		<comments>http://www.turingtarpit.com/2009/03/the-tweetcoding-learning-experience/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 06:48:48 +0000</pubDate>
		<dc:creator>Chandima Cumaranatunge</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[game balance]]></category>
		<category><![CDATA[gameplay]]></category>
		<category><![CDATA[micro blogging]]></category>
		<category><![CDATA[social networks]]></category>
		<category><![CDATA[tweetcoding]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.turingtarpit.com/?p=65</guid>
		<description><![CDATA[I quickly became <span style="text-decoration: line-through;">interested in</span> addicted to Grant Skinner's genius idea: <em>tweetcoding</em>. What is it? It's a programming challenge where you try to develop "something cool" using Actionscript in 140 characters. What can you learn form 140 chars? Quite a bit actually. When the compiler strict mode is off, some very interesting shortcuts are possible. There was a different group learning dynamic that was quite interesting.]]></description>
			<content:encoded><![CDATA[<p>I quickly became <span style="text-decoration: line-through;">interested in</span> <ins>addicted to</ins> Grant Skinner&#8217;s genius idea: <em>tweetcoding</em>. What is it? It&#8217;s a programming challenge where you try to develop &#8220;something cool&#8221; using Actionscript in 140 characters. The 140 chars are a hard limit as you have to submit your code via a tweet.</p>
<p>The &#8220;something cool&#8221; should be taken literally. In this first go-around, the judging criteria was decided after the submission deadline. This reminded me of Seth Godin&#8217;s <a href="http://www.amazon.com/gp/product/1591842336/103-5805607-3547849?ie=UTF8&amp;tag=chandimcumara-20&amp;linkCode=xm2&amp;camp=1789&amp;creativeASIN=1591842336" target="_blank">Tribes</a> where a tribe leader doesn&#8217;t need to have every detail ironed out. Grant just threw out the idea with some &#8220;gimme&#8221; code,  got the heck out of the way and watched wonderful things happen.</p>
<p>The initial <a href="http://gskinner.com/playpen/tweetcoding.html" target="_blank">rules</a> were all we had to begin with. However, things got really interesting after Robert Cadena developed the tweetcoding integrator at <a href="http://tweetcoding.machine501.com" target="_blank">http://tweetcoding.machine501.com</a>. This page lists all the #tweetcoding tweets with the code submissions compiled into SWFs.  Now we could look at everyone&#8217;s submissions, run the apps on the browser ( as opposed to copying and pasting each into a .fla ) and learn some new tricks ( as well as some bad programming habits ).</p>
<a name="wptoc_0_0_0"></a><h4>What can you learn form 140 chars?</h4>
<p>Quite a bit actually. When the compiler <em>strict mode</em> is off, some very interesting shortcuts are possible. For me, the big ideas were the most interesting as opposed to the little coding efficiencies discovered during the process. Don&#8217;t get me wrong, trying to figure out the best way to implement a loop in the smallest number of characters is a very interesting challenge. However, there was a different group learning dynamic that was more interesting.</p>
<p>I think we spent as much time looking at each others&#8217; submissions and learning new ways of doing things as we did coding our own submissions. Now that submissions have closed, it was cool to take a step back and see how the applications evolved over time as folks learned new techniques from each other.</p>
<a name="wptoc_0_0_1"></a><h4><strong>Learning happened in big leaps</strong></h4>
<p>When you start from the <a href="http://tweetcoding.machine501.com" target="_blank">early entries</a> at the bottom of the page and work your way up it provides an insight into the <em><strong>evolution of collective thought of a learning community</strong></em>. Learning happened, not in incremental steps, but in sudden leaps as  innovative implementations were submitted.</p>
<p>For example, the first few submissions were non-interactive circles and line drawings built on top of Grant&#8217;s first example. Then <a href="http://twitter.com/mikeysee" target="_blank">@mikeysee</a> (Michael Cann) started to use the mouse coordinates. There were a couple of submissions that used mouse coordinates after that. Then there was a stage where folks started to experiment with color. And so it went, with each new innovation or technique adopted by subsequent submissions.</p>
<p>Some of the big learning leaps that come to mind are: Using the Flash 10 3D parameters (cheap motion), using Bitmaps to draw display objects (less code). using Fill interference (cheap visual complexity) ,  cheap particle motion,  using perlin noise, generating audio etc. When I say cheap, I mean an efficient minimalist way of doing something in as few characters as possible.</p>
<a name="wptoc_0_0_2"></a><h4>Settling into comfort zones</h4>
<p>After a while. the episodic learning leaps were not as visible as more and more developers joined in and settled into their comfort zones. Most developers settled on an idea or technique and churned out a few submissions based on that. They then moved onto another technique.</p>
<p>However, there were exceptions like <a href="http://twitter.com/quasimondo" target="_blank">@quasimondo</a> (Mario Klingemann) who churned out an <a href="http://www.quasimondo.com/archives/000686.php" target="_blank">incredible array of eclectic stuff</a> in rapid sequence.</p>
<p>Now the community had more depth with novices and experts with good grasp of mathematics and trigonometry joining in and submitting some really fresh stuff.</p>
<a name="wptoc_0_0_3"></a><h4>My personal learning experience ( described in terms of comfort zones )</h4>
<p>I initially started by trying to create &#8220;something cool&#8221; as that was the only critera that was out there. I remembered a <a href="http://www.gotoandlearn.com/" target="_parent">screencast by Lee Brimelow</a> on some interesting visual effects created with repeated application of  Filters to a BitmapData object. I believe he repeatedly applied the blur and scroll filters to creat an effect like fire. It was an interesting technique in that you draw something on stage and then draw what is on stage onto a transparent BitmapData object with filters and matrix transformations.</p>
<a name="wptoc_0_0_4"></a><h4>Zone 1: Make it colorful and interesting using BitmapData scrolling</h4>
<p>During these early stages I was just trying to get my foot in the door. No great inspirational ideas, just try to make &#8220;something cool.&#8221; However much I tried, I just couldn&#8217;t keep anything that had a blur filter within 140 chars. So, it had to be something that just had scrolling and color. So that was my first comfort zone.</p>
<a name="wptoc_4_1_0"></a><h5>Line scroller</h5>
<p>My first submission was &#8220;Line Scroller&#8221;<strong> </strong>which was very leaky.  The following bug-free version was submitted later. Something I learned in this first submission was a minimalist way to choose a random color.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight: bold;">!</span>i<span style="color: #000000; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><span style="color: #004993;">b</span>=<span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">BitmapData</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">550</span>,<span style="color: #000000; font-weight:bold;">400</span>,<span style="color: #000000; font-weight:bold;">1</span>,<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span>;addChild<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Bitmap</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">b</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span>;
ls<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">5</span>,r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>1.67e7<span style="color: #000000;">&#41;</span>;lt<span style="color: #000000;">&#40;</span><span style="color: #004993;">mouseX</span>,<span style="color: #004993;">mouseY</span><span style="color: #000000;">&#41;</span>;b.<span style="color: #004993;">draw</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#41;</span>;b.<span style="color: #004993;">scroll</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span>,<span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">8</span><span style="color: #000000;">&#41;</span>;</pre></div></div>

<p><a title="Line Scroller" href="http://www.turingtarpit.com/wp-content/uploads/2009/03/scroll.swf" target="_blank"><img class="alignnone size-full wp-image-39" title="click_to_open_btn" src="http://www.turingtarpit.com/wp-content/uploads/2009/03/click_to_open_btn.jpg" alt="click_to_open_btn" width="101" height="34" /></a></p>
<a name="wptoc_4_1_1"></a><h5>Paint Spill</h5>
<p>Paint Spill is very similar to the line scroller in that it followed the same principle of scrolling. I experimented with bit shifting to choose a random set of  colors in this submission.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">!</span>i<span style="color: #000000; font-weight: bold;">?</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Bitmap</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">b</span>=<span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">BitmapData</span><span style="color: #000000;">&#40;</span>i=<span style="color: #000000; font-weight:bold;">550</span>,i<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span>ls<span style="color: #000000;">&#40;</span>r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">9</span>,r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>1e7<span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #000000; font-weight: bold;">&amp;</span>lt;mouseX<span style="color: #000000;">&#41;</span>;
mt<span style="color: #000000;">&#40;</span>o.<span style="color: #004993;">x</span>=r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>i,<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span>;lt<span style="color: #000000;">&#40;</span>o.<span style="color: #004993;">x</span>,<span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">b</span>.<span style="color: #004993;">draw</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#41;</span>;b.<span style="color: #004993;">scroll</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span>,<span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span>;</pre></div></div>

<p><a title="Paint Spill" href="http://www.turingtarpit.com/wp-content/uploads/2009/03/paintspill.swf" target="_blank"><img class="alignnone size-full wp-image-39" title="click_to_open_btn" src="http://www.turingtarpit.com/wp-content/uploads/2009/03/click_to_open_btn.jpg" alt="click_to_open_btn" width="101" height="34" /></a></p>
<a name="wptoc_0_0_5"></a><h4>Zone 2: Make it interactive using mouse input</h4>
<p>I tried to have some user interaction in all my submissions. I really liked some of the self-running submissions that drew some amazing recursive shapes with 3D transformations. However, that wasn&#8217;t my comfort zone. I decided to concentrate on giving the user some control to draw &#8220;something cool.&#8221;</p>
<p>The mouse was the cheapest way to record user input and make things interactive. Recording mouse coordinates were very cheap as you can directly access the MouseX and MouseY globals. Intercepting mouse clicks, mouse downs and mouse up were very expensive as they require event handlers.</p>
<p>I was awestruck when the first submission that recorded microphone input came along. Here was another input method that we don&#8217;t usually think about.</p>
<p>My next submission was a painting program. The first &#8220;painting&#8221; type submission was by <a href="http://twitter.com/Scarybug" target="_blank">@scarybug</a>. I went a little further by allowing the user to choose from a set of 10 colors by repeated mouse clicks. This includes something I learned from another submission: You can call a function by  using only its function name ( without the parentheses ) if you just want the default values for its arguments.</p>
<a name="wptoc_5_1_0"></a><h5>Circle Paint</h5>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">t=<span style="color: #990000;">'mouse'</span>;l=<span style="color: #004993;">stage</span>.<span style="color: #004993;">addEventListener</span>;
l<span style="color: #000000;">&#40;</span>t<span style="color: #000000; font-weight: bold;">+</span><span style="color: #990000;">'Down'</span>,<span style="color: #339966; font-weight: bold;">function</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>ls<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">9</span>,1.67e7<span style="color: #000000; font-weight: bold;">*</span>s<span style="color: #000000;">&#40;</span>m.<span style="color: #004993;">PI</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">&#40;</span>i<span style="color: #000000; font-weight: bold;">++%</span>10<span style="color: #000000; font-weight: bold;">+</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
g.<span style="color: #004993;">drawCircle</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">mouseX</span>,<span style="color: #004993;">mouseY</span>,<span style="color: #000000; font-weight:bold;">5</span><span style="color: #000000;">&#41;</span>;l<span style="color: #000000;">&#40;</span>t<span style="color: #000000; font-weight: bold;">+</span><span style="color: #990000;">'Up'</span>,ls<span style="color: #000000;">&#41;</span>;</pre></div></div>

<p><a title="Circle Paint" href="http://www.turingtarpit.com/wp-content/uploads/2009/03/paint.swf" target="_blank"><img class="alignnone size-full wp-image-39" title="click_to_open_btn" src="http://www.turingtarpit.com/wp-content/uploads/2009/03/click_to_open_btn.jpg" alt="click_to_open_btn" width="101" height="34" /></a></p>
<p>I couldn&#8217;t resist including a little masterpiece drawn with a 140 char paint program.</p>
<p><img class="alignnone size-medium wp-image-87" title="Drawn with Circle Paint" src="http://www.turingtarpit.com/wp-content/uploads/2009/03/2645760-300x218.jpg" alt="Drawn with Circle Paint" width="300" height="218" /></p>
<a name="wptoc_0_0_6"></a><h4>Zone 3: Make it play worthy using casual gaming concepts</h4>
<p>Building on my effort to make things interactive, I decided to concentrate exclusively on games. In 140 characters you can only do so much in terms of gameplay.</p>
<p>The first issue was what can be sacrificed without harming the overall experience. The first to go was the winning condition. I couldn&#8217;t waste precious characters in a game loop that checks to see if the player has won. Winning had to be visual and obvious to the player. For example, if you kill all the aliens, you win. If you drop the ball, you lose.</p>
<p>The next issue was the instructions. These had to go on a separate tweet. The other aspect was to develop 140 char backstory to develop motivation to play. If you thought coding a game in 140 chars was hard, try to write a backstory or game instructions in 140 chars.</p>
<p>Developing games in 140 chars is hard! The key is to figure out quickly if an idea is going to work or not. If not, go onto something else or try a variation. For example, the Juggle submission initially started out as a &#8220;Bubble Wrap&#8221; game. It then moved into a balloon popping game before finally settling into the ball juggler.</p>
<p>Most of the unique features were encountered by pure chance and included. For example, the ball disappearing off the top of the stage when volleyed just happened while I was balancing game parameters. I could see that it added to the gameplay by introducing an additional challenge of predicting where the ball would appear next.</p>
<p>My final three submissions were all games.</p>
<a name="wptoc_6_1_0"></a><h5>The Horde</h5>
<p>Lame backstory:</p>
<p style="padding-left: 30px;">Kill one and another takes its place. The only option is to give up and let em through. Or you will go insane!!!</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #0033ff; font-weight: bold;">each</span><span style="color: #000000;">&#40;</span>a <span style="color: #0033ff; font-weight: bold;">in</span> o<span style="color: #000000;">&#41;</span>a.<span style="color: #004993;">y</span><span style="color: #000000; font-weight: bold;">+</span>=s<span style="color: #000000;">&#40;</span>a.<span style="color: #004993;">x</span><span style="color: #000000;">&#41;</span>,a.<span style="color: #004993;">hitTestPoint</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">mouseX</span>,<span style="color: #004993;">mouseY</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">?</span>a.<span style="color: #004993;">y</span>=<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span>;
<span style="color: #000000; font-weight: bold;">++</span>i<span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #000000; font-weight:bold;">50</span><span style="color: #000000; font-weight: bold;">?</span><span style="color: #000000;">&#40;</span>o<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>=<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Bitmap</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">BitmapData</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">9</span>,<span style="color: #000000; font-weight:bold;">9</span>,<span style="color: #000000; font-weight:bold;">0</span>,<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>.<span style="color: #004993;">x</span>=r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">550</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0</span></pre></div></div>

<p><a title="The Horde" href="http://www.turingtarpit.com/wp-content/uploads/2009/03/horde.swf" target="_blank"><img class="alignnone size-full wp-image-39" title="click_to_open_btn" src="http://www.turingtarpit.com/wp-content/uploads/2009/03/click_to_open_btn.jpg" alt="click_to_open_btn" width="101" height="34" /></a></p>
<a name="wptoc_6_1_1"></a><h5>Juggle</h5>
<p>Instructions:</p>
<p style="padding-left: 30px;">Use mouse pointer to volley the ball. How many times can you volley before it falls?</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight: bold;">!</span>i<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>p=u=v=a=.1;q=<span style="color: #000000; font-weight:bold;">99</span>;i=m.<span style="color: #004993;">pow</span><span style="color: #000000;">&#125;</span>
<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#40;</span>q<span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000;">&#40;</span>m=<span style="color: #004993;">mouseX</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">+</span>i<span style="color: #000000;">&#40;</span>p<span style="color: #000000; font-weight: bold;">-</span><span style="color: #004993;">mouseY</span>,<span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">&amp;</span>lt;<span style="color: #000000; font-weight:bold;">400</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>v=<span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">9</span>;u=q<span style="color: #000000; font-weight: bold;">-</span>m<span style="color: #000000;">&#125;</span>
v<span style="color: #000000; font-weight: bold;">+</span>=a;p<span style="color: #000000; font-weight: bold;">+</span>=v;q<span style="color: #000000; font-weight: bold;">+</span>=u<span style="color: #000000; font-weight: bold;">*</span>.25;g.<span style="color: #004993;">clear</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;ls<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">3</span><span style="color: #000000;">&#41;</span>;g.<span style="color: #004993;">drawCircle</span><span style="color: #000000;">&#40;</span>q,p,<span style="color: #000000; font-weight:bold;">20</span><span style="color: #000000;">&#41;</span></pre></div></div>

<p><a title="Juggle" href="http://www.turingtarpit.com/wp-content/uploads/2009/03/juggle.swf" target="_blank"><img class="alignnone size-full wp-image-39" title="click_to_open_btn" src="http://www.turingtarpit.com/wp-content/uploads/2009/03/click_to_open_btn.jpg" alt="click_to_open_btn" width="101" height="34" /></a></p>
<a name="wptoc_6_1_2"></a><h5>Guess the Number</h5>
<p>Instructions:</p>
<p style="padding-left: 30px;">Guess the number between 0 and 99 inclusive. Move to mouseY=0 (off top of stage) to guess (2nd num). &gt; &lt; = shows if it&#8217;s too high, low or just right!</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight: bold;">!</span>i<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>t=<span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">TextField</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>.<span style="color: #004993;">y</span>=p=<span style="color: #000000; font-weight:bold;">99</span>;i=<span style="color: #004993;">int</span><span style="color: #000000;">&#40;</span>r<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span>p<span style="color: #000000;">&#41;</span>; g=<span style="color: #004993;">c</span>=<span style="color: #990000;">''</span><span style="color: #000000;">&#125;</span>
a=<span style="color: #004993;">int</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">mouseX</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">5</span><span style="color: #000000;">&#41;</span>;
<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight: bold;">!</span><span style="color: #004993;">mouseY</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>g=a;g<span style="color: #000000; font-weight: bold;">&amp;</span>gt;i<span style="color: #000000; font-weight: bold;">?</span><span style="color: #004993;">c</span>=<span style="color: #990000;">'&amp;gt;'</span><span style="color: #000000; font-weight: bold;">:</span>g<span style="color: #000000; font-weight: bold;">&amp;</span>lt;i<span style="color: #000000; font-weight: bold;">?</span><span style="color: #004993;">c</span>=<span style="color: #990000;">'&amp;lt;'</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">c</span>=<span style="color: #990000;">'='</span><span style="color: #000000;">&#125;</span>
t.<span style="color: #004993;">text</span>=a<span style="color: #000000; font-weight: bold;">+</span><span style="color: #990000;">' '</span><span style="color: #000000; font-weight: bold;">+</span>g<span style="color: #000000; font-weight: bold;">+</span><span style="color: #004993;">c</span></pre></div></div>

<p><a title="Guess the Number" href="http://www.turingtarpit.com/wp-content/uploads/2009/03/guess.swf" target="_blank"><img class="alignnone size-full wp-image-39" title="click_to_open_btn" src="http://www.turingtarpit.com/wp-content/uploads/2009/03/click_to_open_btn.jpg" alt="click_to_open_btn" width="101" height="34" /></a></p>
<a name="wptoc_0_0_7"></a><h4>Judging criteria</h4>
<p>Grant skinner sent this tweet yesterday:</p>
<blockquote><p>#tweetcoding will be judged on aesthetics, idea, interaction, uniqueness, &amp; code. Should have the results early next week.</p></blockquote>
<p>The criteria are pretty good with equal chance for interactive and non-interactive submissions to score well. What are my chances? I&#8217;ll probably score high on <em>idea</em> and <em>interaction</em>. Maybe in <em>uniqueness</em> as well. However, I&#8217;ve done nothing special in terms of <em>aesthetics</em> and <em>code</em>.</p>
<p>Overall it was a fun learning experience. Looking forward to the results.</p>
<a name="wptoc_0_0_8"></a><h4>Update: Results</h4>
<p><a href="http://gskinner.com/playpen/tweetcoding_0/" target="_blank">http://gskinner.com/playpen/tweetcoding_0/</a></p>
<p>&#8220;Juggle&#8221; got an honorable mention. The winning entry by <a href="http://twitter.com/tomee6" target="_blank">@tomee6 </a>was an exceptional <a href="http://gskinner.com/playpen/tweetcoding_0/tc_1267109791.swf" target="_blank">diagonal snake</a> game.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.turingtarpit.com/2009/03/the-tweetcoding-learning-experience/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
