Aug 24 2011

Fight Camp and 6 Waves

toxikman

After much hard work, we’ve completed a major step in the life of Fight Camp (Electrolab’s first Facebook social game). Our recent publishing partnership with 6 Waves will finally begin. Tomorrow we will be transitioning to powerful new servers with 16 cores each and 24GB of RAM. The game can now scale up to support more than a million monthly users and probably more.

6 Waves will help us bring the game to many new locales, including China and Europe. They will also be helping to market and advertise the game so we can grow, which is necessary to support our ongoing development work. We look forward to working together over the life of Fight Camp!


Dec 12 2010

Motion capture session for our upcoming title

wayne


Nov 28 2010

Web 2.0 Summit 2010: Mark Zuckerberg, “A Conversation with Mark Zuckerberg”

wayne


Oct 3 2010

Where Good Ideas Come From

wayne


Sep 17 2010

Lab Food

tom

Working at home has its perks but certainly a great deal of oddities.  I find myself frequently eating like a raccoon (or hobo, depending on whether you come from an urban or rural background).

For lunch today, I mixed:  left over tuna salad, left over baked glazed salmon, and one boiled egg.  I put it all in a tupper wear container, and crushed it with a fork.  Basically anything in the fridge that isn’t covered in fuzzy green or white spores is game.  When in doubt, nuke it for an extra 2 minutes.

raccoon_on_snow

-Tom


Aug 29 2010

Interview with Jason Fried of 37signals

wayne

An old interview but still worth a viewing. Keep it simple… be you!


Aug 9 2010

Silent multi-user login for FBML flash development

tom

Building flash facebook apps the naive way has an annoying side effect. Every time you run the app locally through CS4/CS5, it will open a browser window. You may or may not have to log in. Then, typically you must go back to your app and tell it via some dialog that you’ve logged in and it’s ok to continue to login process.

If you’re doing development that requires multiple user accounts (such as cooperative gameplay), this gets even more tedious because now you have to log users in and out for basic testing. This is a significant time sink.

Fortunately, there’s a straight forward solution this. It’s possible to run multiple simultaneous user accounts that log in silently.  In my solution, the NUM_LOCK key toggles between account 0 and account 1 but a launcher-menu could also be used to select accounts.

This silent-login solution is poorly documented by Adobe, but the AS3 Facebook API already saves a cookie each time a user authenticates themselves with facebook.

The function getStoredSession() in FacebookSessionUtil.as uses the SharedObject::getLocal AS3 API to write and read a cookie. It’s based off the api_key and supports one user only by its current implementation. These are called ‘shared local objects’ by Adobe (.sol files), but are very similar to web browser cookies.

To take advantage of the ‘silent login’ you must do a number of things:

  1. Detect the condition where the app is running independent of the canvas:
  2. if( !loaderInfo.parameters.fb_sig_session_key )

  3. Detect when a cookie is present and skip login, calling verify directly instead:
    else if( session.activeSession.session_key != null )
    {
         session.verifySession();
    }

You must ensure the user has offline_access permissions for any of this to work. Beware that the cookies are saved whether or not offline_access permission is granted!

fbook.grantExtendedPermission("offline_access");

Offline_access essentially allows you to use the session_key, which is generated uniquely during each login, infinitely (like an inifinite cookie). 

Finally, you must handle the case where the cookie exists, but login fails due to lack of permissions or some other problem.

Multiple Accounts

This solution works great for a single account. But what if you need to quickly switch between 2 accounts?  My solution was to add support for a pair of cookies instead of a single cookie. I simply override the FacebookSessionUtil class and implement a smarter cookie function. This could easily be extended to support an unlimited number of users, but for my testing, I only need 2 accounts.

The constructor allows you to specify using the alternate user. I use the NUM_LOCK keyboard state to determine which user to use. This could easily become an integer, or uid, for unlimited user accounts.

public class ElectrolabFacebookSessionUtil extends FacebookSessionUtil
{
    protected var m_altUser:Boolean;
    // when alternateUser is true, a different cookie will be used. Used for easily toggling between 2 accounts for testing.
    public function ElectrolabFacebookSessionUtil(api_key:String, secret:String, loaderInfo:LoaderInfo, alternateUser:Boolean = false )
    {
        m_altUser = alternateUser;
        super( api_key, secret, loaderInfo );
    }

    /**
     * get the stored session for the set api
     */
    protected override function getStoredSession() : SharedObject
    {
        var cookie:String = api_key + "_stored_session";
        if( m_altUser == true )
            cookie += "_0";
        return SharedObject.getLocal( cookie );
    }
};

Below is a screenshot of running 2 copies of the game simultaneously. I’m debugging one in CS5, and another is running independently through Chrome.  In theory you could run multiple copies of CS5 and debug simultaneously.

multipleaccounts


Aug 6 2010

Rework Me

toxikman

I love startups. Being on the ground floor of something new and innovative. Even though the risks may be high, the feeling of getting to the goal is powerful on the soul.

So why then, after starting a reasonably successful game development studio back in the mid-90′s was I stuck? Really stuck in a place where I had forgotten about this feeling, but so desperately wanted it. I’ve been in the game industry at my first company for 15 years!  After being sold a couple of times, it was now a large corporate entity, overrun by producers and executives. If I jumped ship, how could I afford my current lifestyle – jumping into another startup with a family to support?  Somewhere along the line I had become scared. I had lost that “startup confidence.”

I agonized about startup costs and startup risks. Then one day, I was pretty much forced into it – there I was again without a “real job.” Then I read Rework.

Rework is a new book by the guys at 37signals who run an interesting business blog Signal vs. Noise. The book is a rebuild of the blog by taking the best of their non-conventional business ideas and putting it together into a compelling book. It encourages you to get out there and ditch the meetings, detailed planning, rush-rush-rush, workaholism, outside funding, and just do something great.

So that’s what we’re doing. Something totally great!  If you’re smart and have mad skills that companies need, then in the worst case, if the startup fails you could always go work with “them.”  There are so many opportunities out there that if we can’t end up doing exactly what we want, then working “with” them is still better than working “for” them.

You don’t need office furniture, rent-to-pay, or a sign to start a business. Whatever you’re thinking of doing, figure out a way to do it with the lowest overhead possible. But just do it.

Rework aligned perfectly with my post-cubicle, post-meeting, post-corporate thinking and it helped pushed me and my Lab Partners pretty far in the direction we were already going. Electrolab is a new kind of company. A better kind.

-toxikman


Aug 4 2010

Welcome to Challenge-World

tom

Sneak preview of a never-before-seen feature coming to the next private beta. Here’s a super quick rendering…(a.k.a. rough photoshop mock-up)…

image

image

-Tommy V


Aug 4 2010

Microsoft Ergonomic Keyboard 4000 + Play Next Song Hack

tom

I now own a Microsoft Ergonomic Keyboard 4000. Great keyboard with one major flaw: There are no Play Next Song / Play Previous Song shortcut buttons in Media Player or ITunes. The keyboard does carry a hefty load of ridiculous buttons I will never use (Zoom?  Mail?), but these critical ones are missing.  These keys may be small and appear inconsequential, but are mission critical for maintaining sanity when pulling an all nighter in the Lab and that irritating Juelz Santana – There It Go (The Whistle Song) song sneaks its way into your playlist.

I chose to map my 4 and 5 Favorites keys (marked in red below) at the top of the keyboard for the Previous Track and Next Track actions.  This should work with ITunes as well (someone please verify).

How did I do this?  I figured out a registry hack. I involves adding 2 DWORD32 keys.   First, install the keyboard software (Intellitype Pro) from Microsoft’s website:

http://www.microsoft.com/hardware/download/download.aspx?category=MK&type=Keyboard&sku=B2M-00012

After you install the software, you can either hack the registry yourself (Look in HEKY_CURRENT_USER\Software\Microsoft\Intellitype Pro\Event Mapping path):

or:

  1. download my attached registry file to your desktop (right click/save as): MSKeyboard4000MediaKeys.reg
  2. rename it to MSKeyboard4000MediaKeys.reg
  3. right click/ import registry file
  4. reboot
  5. now your "4" and "5" favorites buttons on top will act as play next/previous song!

To avoid rebooting, just kill the itype.exe process and start it again from C:\Program Files\Microsoft IntelliType Pro.

Play on, player.

*Me nor the Lab are not responsible for death, bodily harm, or any other malicious action caused by the advice in this article..

-Tommy V