<?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>escapeFactory &#187; API</title>
	<atom:link href="http://escfactory.com/category/blog/api/feed/" rel="self" type="application/rss+xml" />
	<link>http://escfactory.com</link>
	<description>Planning your escape.</description>
	<lastBuildDate>Tue, 30 Nov 2010 12:02:38 +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>Our very first growing pain</title>
		<link>http://escfactory.com/2010/03/our-very-first-growing-pain/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=our-very-first-growing-pain</link>
		<comments>http://escfactory.com/2010/03/our-very-first-growing-pain/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 04:51:53 +0000</pubDate>
		<dc:creator>balord</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://escfactory.com/?p=479</guid>
		<description><![CDATA[The escapeFactory leaderboards and website were down from 5:56:07 PM EST until 8:20:50 PM EST tonight, which is pretty crap.
What Happened
At 5:58 EST, I got an email from our webhost telling me we were using too much CPU.  As they do on shared hosting, they immediately disabled (what they perceived to be) the offending [...]]]></description>
			<content:encoded><![CDATA[<p>The escapeFactory leaderboards and website were down from 5:56:07 PM EST until 8:20:50 PM EST tonight, which is pretty crap.</p>
<h3>What Happened</h3>
<p>At 5:58 EST, I got an email from our webhost telling me we were using too much CPU.  As they do on shared hosting, they immediately disabled (what they perceived to be) the offending script, which in our case was the entire API directory.  Turns out, doing that kinda breaks the entire site.</p>
<p>Ben got a tip an hour into the downtime and emailed me.  I missed both emails cuz I had just headed out to dinner and had my phone tucked away.  I got back around 8 and restored the API directory which put the site back online immediately and resumed recording scores.</p>
<p>To be clear, this only affected the web server &#8212; all escapeFactory games are designed to work regardless of the reachability of our Leaderboard API.  The apps themselves retain scores locally, but unfortunately all attempts to send scores up *to* our server during this time period failed and were not recorded.  (More than likely it exposed some dummy code LOLcat usernames, too.)</p>
<h3>Why Did It Break?</h3>
<p>As of today, <a href="/mole/">Mole</a> is free for <a href="/2010/03/mole-is-free-at-gdc/">the week of GDC</a>.  In Lunarpages&#8217; world, that made us a victim of a &#8220;<a href="http://wiki.lunarpages.com/Resource_Usage_Suspension#What_Causes_Your_Server_Resource_Over_Usage.3F">Sudden Burst of Popularity</a>&#8220;, which in turn exposed my (ahem) &#8220;Badly Written Script or Plugin&#8221;.</p>
<p>Every API call runs a SQL query that was only a little costly at 1000 records but an utter deal-breaker at 200,000 records.  It was a junior mistake on my part, and one hidden deep that would have stayed hidden except for the sudden popularity of &#8220;Mole&#8221; today.  An unnecessary subquery was causing our response time to slowly creep up over time.  By the time I got to it, we were averaging  over 5 seconds per API call.  No wonder our CPU was topping out our limit.  I refactored quickly and response time per call is happily back sailing under 0.03 seconds.</p>
<h3>Going Forward</h3>
<p>At this point, everything appears to be under control.  The API as a whole is really efficient, and I think we bought ourselves some time having smoked out that rude subquery.</p>
<p>We&#8217;re clearly on the verge of outgrowing our little experimental phase where shared hosting stops making sense, which is frankly a great problem to have.</p>
]]></content:encoded>
			<wfw:commentRss>http://escfactory.com/2010/03/our-very-first-growing-pain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New games on the factory horizon</title>
		<link>http://escfactory.com/2010/02/new-games-on-the-factory-horizon/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=new-games-on-the-factory-horizon</link>
		<comments>http://escfactory.com/2010/02/new-games-on-the-factory-horizon/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 07:54:32 +0000</pubDate>
		<dc:creator>john</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[BMX Dude]]></category>
		<category><![CDATA[Gooey]]></category>
		<category><![CDATA[Snow Dude]]></category>
		<category><![CDATA[Steam Pilot]]></category>

		<guid isPermaLink="false">http://escfactory.com/?p=453</guid>
		<description><![CDATA[It&#8217;s been a busy few months working on these new games, but they&#8217;re coming together nicely and will be ready to show off soon (maybe at GDC!).
Lycette Bros. secured some investment funding from Film Victoria&#8217;s Digital Media Fund, to produce some prototype games, and this is a sneak peak.
Mark and I came up with the [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a busy few months working on these new games, but they&#8217;re coming together nicely and will be ready to show off soon (maybe at <a href="http://www.gdconf.com/">GDC</a>!).</p>
<p>Lycette Bros. secured some investment funding from Film Victoria&#8217;s Digital Media Fund, to produce some prototype games, and this is a sneak peak.</p>
<p>Mark and I came up with the ideas and designed the gameplay and visual design, Ben developed the games and of course helped refine any  usability and gameplay issues. Brent and Ben have also implemented some of the aspects of the escapeFactory API along the way.</p>
<p>Skate Dude and BMX Dude are the big brothers of <a href="http://escfactory.com/snowdude/">Snow Dude</a>, but with more tricks, levels and global leaderboards &#8211; as requested.</p>
<p><img class="size-full wp-image-456" title="skate_dude2" src="http://escfactory.com/wp-content/uploads/2010/02/skate_dude22.jpg" alt="grinding up the points!" width="480" height="320" /></p>
<p>Steam Pilot is a game of skill where you navigate yourself above the rooftops in the fastest time possible, not  so easy when your craft is a steam powered balloon with mechanical feet!</p>
<p><img class="alignnone size-full wp-image-459" title="steampilot" src="http://escfactory.com/wp-content/uploads/2010/02/steampilot1.jpg" alt="steampilot" width="480" height="320" /></p>
<p>And Gooey &#8211; which is just a bit of gooey fun!</p>
<p><img class="alignnone size-full wp-image-460" title="gooey" src="http://escfactory.com/wp-content/uploads/2010/02/gooey.jpg" alt="gooey" width="320" height="480" /></p>
]]></content:encoded>
			<wfw:commentRss>http://escfactory.com/2010/02/new-games-on-the-factory-horizon/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Introducing the escapeFactory API</title>
		<link>http://escfactory.com/2010/01/introducing-the-escapefactory-api/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=introducing-the-escapefactory-api</link>
		<comments>http://escfactory.com/2010/01/introducing-the-escapefactory-api/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 19:53:07 +0000</pubDate>
		<dc:creator>balord</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://escfactory.com/?p=369</guid>
		<description><![CDATA[Things have been quiet on the blog here, but there is plenty going on &#8212; and a few announcements are imminent, too.  I thought I would get out ahead of those and give an update on the development of our website backend and custom leaderboard API.
History
The idea for this site grew out of the [...]]]></description>
			<content:encoded><![CDATA[<p>Things have been quiet on the blog here, but there is plenty going on &#8212; and a few announcements are imminent, too.  I thought I would get out ahead of those and give an update on the development of our website backend and custom leaderboard API.</p>
<h4>History</h4>
<p>The idea for this site grew out of the work Ben and I did to give <a href="/snowferno/">Snowferno</a> online leaderboards.  Snowferno.com was both our promotional site for the game and also the online home of users&#8217; leaderboard scores.  I wrote a custom API that allowed Ben and I to securely transmit information between Snowferno and our webserver.</p>
<p>Why write a custom API when so many leaderboards existed already?  Well, being our first iPhone app, we didn&#8217;t want to commit to any 3rd-party leaderboard frameworks yet.  I&#8217;m pretty sure a bunch weren&#8217;t even compatible with Unity3D for iPhone at the time.  So rather than complicate our development, we designed a system that required only simple Unity3D WWW calls.  With that, we were able to register an app launch and transmit scoring data to and from our online database.</p>
<p>After Snowferno launched, Ben and the Lycette Bros. started on a few follow-up &#8216;Dude companions to <a href="/snowdude/">Snow Dude</a>.  The original didn&#8217;t have an online leaderboard, but they wanted something implemented in the sequels.  Ben suggested we broaden the scope of our Snowferno API into one that multiple apps could use.  At the same time, all of us original escapeFactory devs &#8212; Ben, FatLab Music, the Lycette Bros., and 3000 Words &#8212; were starting this site, so it made sense that our new multi-app Snowferno API should also become a part of the escapeFactory.</p>
<h4>Design Goals</h4>
<ul>
<li><strong>Cross-platform</strong>: The API must integrate into any development platform without the inclusion of external frameworks.  The maximum requirement must be that it can call a web URL and receive a HTTP response.</li>
<li><strong>Backward-compatibile</strong>: The API must always receive API calls from and send responses to apps once they are released, translating if needed as the API matures.</li>
<li><strong>Autonomous</strong>: Front-facing pages may piggyback on a CMS/blog framework, but all ties between the API Core must be contained within a single host-compatible &#8220;wrapper&#8221; plugin.  Whenever possible, the API should recognize and behave properly on all app release platforms rather than impose compatibility requirements on any specific platform.</li>
<li><strong>Secure</strong>: Only authorized apps may communicate with the API.  All incoming data must be securely signed.</li>
<li><strong>Modular</strong>: The default front-facing pages must be customizable per-app.  Scoring metrics must be extensible per-app to allow multiple dimensions.</li>
<li><strong>Promotional</strong>: API and Core should serve to encourage visibility across the whole escapeFactory family of apps.</li>
</ul>
<h4>Features (as of current release v0.6)</h4>
<ul>
<li><strong>Site-wide app settings</strong>:
<ul>
<li>Toggle site-wide visibility of an app with public/private switch</li>
<li>Date-sensitive app releases</li>
<li>Toggle visibility of leaderboard pages per-app with on/off switch</li>
<li>Centralized fields to store current app price, icon image source, screenshot image sources, and iTunes App Store ID</li>
</ul>
</li>
<li><strong>Statistics</strong>:
<ul>
<li>Total app launches and total unique devices by version per day</li>
<li>Total user install base</li>
<li>Aggregate average &amp; median scoring trends by level</li>
<li>Aggregate achievement progress</li>
</ul>
</li>
<li><strong>Leaderboard template system</strong>:
<ul>
<li>MVC-style modular views to allow per-app customization of leaderboard pages</li>
</ul>
</li>
<li><strong>WordPress-specific shortcodes</strong>:
<ul>
<li>Gives site editors access to output custom data within the site-building features of WordPress without having to expose PHP functions</li>
<li>Output an app store URL w/optional affiliate encoding</li>
<li>Output a uniform product page block of HTML displaying app icon, screenshots, price, and app store links &#8212; for use in a WordPress Page</li>
<li>Output a Unity Web Player to enable play of an online version of an app</li>
</ul>
</li>
<li><strong><a href="http://m.escfactory.com" target="_blank">m.escfactory.com</a></strong>:
<ul>
<li>lightweight, touch-friendly directory of the escapeFactory family of apps.  Intended to be displayed in-app as cross-promotional tool</li>
</ul>
</li>
<li><strong>API calls</strong>:
<ul>
<li><strong>App Launch</strong>: register an app launch and update the app with current online data relevant to that user</li>
<li><strong>Scores</strong>: record online scores and other gameplay metrics and provide the app with realtime high-score updates</li>
<li><strong>Achievements</strong>: record online when pre-defined tasks are achieved</li>
<li><strong>Twitter</strong>: post tweets to a user&#8217;s account, with app hashtags and custom shortened url to user&#8217;s leaderboard pages</li>
<li><strong>Account Management</strong>: associate a user&#8217;s device with the WordPress user registration system, manage Twitter OAuth tokens and other account settings</li>
</ul>
</li>
</ul>
<h4>Tools</h4>
<p><strong>Web Frameworks &amp; Services</strong><br />
<a href="http://wordpress.org/">WordPress</a> &#8211; <a href="http://www.woothemes.com/amember/go.php?r=7235&#038;i=l35">VibrantCMS by WooThemes</a> &#8211; <a href="http://jquery.com/">jQuery</a> &#8211; <a href="http://code.google.com/p/galleria/">galleria</a> &#8211; <a href="http://www.jqtouch.com/">jQTouch</a> &#8211; <a href="http://www.random.org/clients/http/">Random.org HTTP Interface</a> &#8211; <a href="http://wiki.github.com/jmathai/twitter-async">Twitter-async</a></p>
<p><strong>Promotion &amp; Marketing</strong><br />
<a href="http://sharethis.com/">ShareThis</a> &#8211; <a href="http://yourls.org/">YOURLs URL shortener</a> &#8211; <a href="http://www.google.com/analytics/">Google Analytics</a></p>
<p><strong>Coding &amp; Project Management</strong><br />
<a href="http://basecamphq.com/?referrer=BRENTLORD">Basecamp</a> &#8211; <a href="http://netbeans.org/features/php/index.html">NetBeans</a>/<a href="http://macromates.com/">TextMate</a>/<a href="http://www.panic.com/TRANSMIT/">Transmit</a> &#8211; <a href="http://beanstalkapp.com/">Beanstalk</a></p>
<h4>Going Forward</h4>
<p>The Lycette Bros.&#8217; upcoming &#8216;Dudes and the soon-to-be-released <a href="/mole/">Mole</a> from Roo Games have been solely responsible for pushing me to get the escapeFactory API and Core this far.  Many more new features are already on my todo lists &#8212; some you&#8217;ll see and some only we&#8217;ll notice.</p>
<p>Mole introduced our first online, &#8220;Play Now&#8221; version of an app, and we have big plans for doing more with Unity Web Player.  Also, look for a Snowferno update that will utilize the new escapeFactory API features (ahem, tweets).  And when the time is right, we&#8217;ll be bringing its <a href="http://snowferno.com/leaderboard/">leaderboard</a> pages over to this site as well.</p>
<p>And of course, more great new games.  Stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://escfactory.com/2010/01/introducing-the-escapefactory-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

