API, development

Introducing the escapeFactory API

31 Jan 2010 | balord |

Things have been quiet on the blog here, but there is plenty going on — 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 work Ben and I did to give Snowferno online leaderboards. Snowferno.com was both our promotional site for the game and also the online home of users’ leaderboard scores. I wrote a custom API that allowed Ben and I to securely transmit information between Snowferno and our webserver.

Why write a custom API when so many leaderboards existed already? Well, being our first iPhone app, we didn’t want to commit to any 3rd-party leaderboard frameworks yet. I’m pretty sure a bunch weren’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.

After Snowferno launched, Ben and the Lycette Bros. started on a few follow-up ‘Dude companions to Snow Dude. The original didn’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 — Ben, FatLab Music, the Lycette Bros., and 3000 Words — were starting this site, so it made sense that our new multi-app Snowferno API should also become a part of the escapeFactory.

Design Goals

  • Cross-platform: 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.
  • Backward-compatibile: The API must always receive API calls from and send responses to apps once they are released, translating if needed as the API matures.
  • Autonomous: 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 “wrapper” plugin. Whenever possible, the API should recognize and behave properly on all app release platforms rather than impose compatibility requirements on any specific platform.
  • Secure: Only authorized apps may communicate with the API. All incoming data must be securely signed.
  • Modular: The default front-facing pages must be customizable per-app. Scoring metrics must be extensible per-app to allow multiple dimensions.
  • Promotional: API and Core should serve to encourage visibility across the whole escapeFactory family of apps.

Features (as of current release v0.6)

  • Site-wide app settings:
    • Toggle site-wide visibility of an app with public/private switch
    • Date-sensitive app releases
    • Toggle visibility of leaderboard pages per-app with on/off switch
    • Centralized fields to store current app price, icon image source, screenshot image sources, and iTunes App Store ID
  • Statistics:
    • Total app launches and total unique devices by version per day
    • Total user install base
    • Aggregate average & median scoring trends by level
    • Aggregate achievement progress
  • Leaderboard template system:
    • MVC-style modular views to allow per-app customization of leaderboard pages
  • WordPress-specific shortcodes:
    • Gives site editors access to output custom data within the site-building features of WordPress without having to expose PHP functions
    • Output an app store URL w/optional affiliate encoding
    • Output a uniform product page block of HTML displaying app icon, screenshots, price, and app store links — for use in a WordPress Page
    • Output a Unity Web Player to enable play of an online version of an app
  • m.escfactory.com:
    • lightweight, touch-friendly directory of the escapeFactory family of apps. Intended to be displayed in-app as cross-promotional tool
  • API calls:
    • App Launch: register an app launch and update the app with current online data relevant to that user
    • Scores: record online scores and other gameplay metrics and provide the app with realtime high-score updates
    • Achievements: record online when pre-defined tasks are achieved
    • Twitter: post tweets to a user’s account, with app hashtags and custom shortened url to user’s leaderboard pages
    • Account Management: associate a user’s device with the WordPress user registration system, manage Twitter OAuth tokens and other account settings

Tools

Web Frameworks & Services
WordPressVibrantCMS by WooThemesjQuerygalleriajQTouchRandom.org HTTP InterfaceTwitter-async

Promotion & Marketing
ShareThisYOURLs URL shortenerGoogle Analytics

Coding & Project Management
BasecampNetBeans/TextMate/TransmitBeanstalk

Going Forward

The Lycette Bros.’ upcoming ‘Dudes and the soon-to-be-released Mole 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 — some you’ll see and some only we’ll notice.

Mole introduced our first online, “Play Now” 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’ll be bringing its leaderboard pages over to this site as well.

And of course, more great new games. Stay tuned.


Leave a Reply

Spam Protection by WP-SpamFree

About escapeFactory

escapeFactory is an international alliance of creative geeks here to help you mentally escape from daily stress, long lines, boring meetings, your cube, cramped airplanes, and weird strangers.

It is a collaboration between a developer: Ben Britten, some composers: FatLab Music, a writer: 3000 Words, and some artists: the Lycette Bros. We make games.

Contact Us

If you have technical questions about the specific games, contact Ben: support@benbritten.com

If you have questions about the website, contact Brent: brent@fatlabmusic.com