• Rebuild: Porting to the PlayBook via Adobe AIR and FlashDevelop

    Pugs Luv Beats
    I helped demo IGF nominees Faraway and the very musical Pugs Luv Beats.
    Last week was my first GDC as an indie developer, and hoh boy were those goodtimes!

    I helped Colin present in a talk about failure (Incredipede was the happy ending), and co-demoed Steph Thirion’s game Faraway in the Independent Games Festival. During the awards ceremony they gave us all BlackBerry PlayBooks, so I now have little excuse not to port Rebuild to it.

    I sat down to get it running today and spent far too long stepping through RiM’s convoluted developer security setup, which took me even longer than Apple’s similarly obtuse system. There are several tutorials out there but some were out of date or assume you have Flash Builder (I use FlashDevelop). So as of March 2012, here’s what you do to get your SWF running as an app on your PlayBook:

    Step 1: Request a CSJ code signing key from BlackBerry.com (takes a couple hours).

    Step 2: Get the Flex SDK, AIR SDK, and BlackBerry AIR SDK. I had trouble with Flex4.6 + Air3.2 so I used Flex4.5 with Air 3.1.

    Step 3: Start dev mode on your PlayBook in Options > Security > Development Mode.

    Step 4: Edit & execute the following to install the debug token on your PlayBook (ten steps and five different passwords, seriously?):

    @echo off
    
    :: BlackBerry development token 
    :: More information:
    :: https://bdsc.webapps.blackberry.com/air/documentation/ww_air_testing/Create_a_debug_token_CMD_ms_1968147_11.html
    :: http://www.hsharma.com/tutorials/10-easy-steps-to-package-and-sign-air-apps-for-playbook/
    :: http://docs.blackberry.com/en/developers/deliverables/27280/Running_unsigned_apps_debug_tokens_1585072_11.jsp
    :: http://openbbnews.wordpress.com/2011/11/16/installing-a-debug-token/
    :: http://www.mellisdesigns.com/blog/?p=37
    
    :: Path to Blackberry SDK
    set PATH=%PATH%;C:\Program Files (x86)\Research in Motion\blackberry-tablet-sdk-2.0.0\bin
    
    :: Path to Java
    set PATH=%PATH%;C:\Program Files (x86)\Java\jre6\bin
    
    echo First get CSJ from https://bdsc.webapps.blackberry.com/air/signingkeys
    echo And start dev mode on PlayBook in Options > Security > Development Mode
    
    :: begin setup
    call blackberry-signer -csksetup -cskpass [YOUR_PASSWORD]
    
    :: register CSJ locally
    call blackberry-signer -register -csjpin [YOUR_PASSWORD] -cskpass [YOUR_PASSWORD] client-PBDT-[XXXXXXXXXX].csj
    
    :: create p12 file
    call blackberry-keytool -genkeypair -keystore author.p12 -storepass [YOUR_PASSWORD] -dname "cn=YOUR_NAME" -alias author
    
    :: register device against CSJ
    call blackberry-debugtokenrequest -register -csjpin [YOUR_DEVICE_ID] -storepass [YOUR_PASSWORD] client-PBDT-[XXXXXXXXXX].csj
    
    :: later calls expect the p12 here for some reason
    call copy author.p12 "C:\Users\USER_NAME\AppData\Local\Research In Motion\author.p12"
    
    :: create the debug token BAR
    call blackberry-debugtokenrequest -storepass [YOUR_PASSWORD] -devicepin [YOUR_DEVICE_ID] debug_token.bar
    
    :: sign bar with RIM (remote)
    call blackberry-signer -verbose -cskpass [YOUR_PASSWORD] -keystore author.p12 -storepass [YOUR_PASSWORD] debug_token.bar PBDT
    
    :: sign bar with developer (local)
    call blackberry-signer -keystore author.p12 -storepass [YOUR_PASSWORD] debug_token.bar author
    
    :: upload debug token to playbook (must be running in debug mode at this address & password)
    call blackberry-deploy -installDebugToken debug_token.bar -device [DEVICE_IP_ADDRESS] -password [YOUR_PASSWORD]
    
    :: echo important metadata
    echo Add the following authorId to bar-descriptor.xml
    call blackberry-airpackager -listManifest debug_token.bar
    
    pause
    

    Step 5: Download this FlashDevelop project adapted from Studio Chris’ BlackBerry template, and edit airplaybook.as3proj and airplaybookConfig.xml to point to your SDK locations.

    Step 6: From FlashDevelop, hit F5 to build your SWF and test it locally using ADL.

    Step 7: Edit & execute the following to package and install the app:

    @echo off
    :: AIR application packaging
    :: More information:
    :: http://livedocs.adobe.com/flex/3/html/help.html?content=CommandLineTools_5.html#1035959
    :: http://www.hsharma.com/tutorials/10-easy-steps-to-package-and-sign-air-apps-for-playbook/
    
    :: Path to Flex + AIR SDK
    set PATH=%PATH%;C:\Program Files (x86)\Adobe\Flex451AIR31\bin
    
    :: Path to Blackberry
    set PATH=%PATH%;C:\Program Files (x86)\Research in Motion\blackberry-tablet-sdk-2.0.0\bin
    
    :: Path to Java
    set PATH=%PATH%;C:\Program Files (x86)\Java\jre6\bin
    
    :: package swf and assets into a bar then install to device and run the app
    call blackberry-airpackager -package airplaybook.bar -installApp -launchApp application.xml bar-descriptor.xml airplaybook.swf blackberry-tablet-icon.png landscape-splash.png portrait-splash.png -devMode -device [YOUR_DEVICE_IP] -password [YOUR_PASSWORD]
    
    pause
    

    If all goes well, you should see Main.as (a red square on a black background) appear on your BlackBerry. Chances are good that some parts of the debug token installation aren’t necessary but it got the job done.

    Rebuild actually ran the first time, and quite well which was an unexpected surprise. Now I need to adjust the fonts and aspect ratio, then go through what promises to be another certification nightmare to package it for sale in the BlackBerry App World. It’ll probably take two or three days total, so no great loss if it bombs.

    Rebuild should be out for the PlayBook by the end of the month!

  • Apple is Gambling

    I personally don’t like to gamble. I don’t like slot machines or roulette. The decisions you make are too inconsequential.

    Have you ever looked at the payout odds for roulette? No matter how you bet your percentage return is always the same. On average you’re going to lose 5 cents for every dollar you bet. It’s true that there are a lot of options in roulette. A lot of choices to make. But none of them have any impact on the game. You’re always going to lose about 5 cents for every dollar you bet.

    Slot machines are the same. You can decide how much you want to bet and you can decide how many “lines” you want to bet but all your doing is deciding how quickly or slowly you lose your money. Even then, casinos tend to doctor the odds so that lower-cost slots have a worse payout in an attempt to even out the money-lost-per-hour of all slot machines.

    So in slots, roulette, and other casino games it’s impossible to make a choice that impacts the game.

    If you are a game author like me, shit like this makes you really curious. It’s hard to make a good video game, lots and lots of us have tried and failed. But here is a simple set of games where players literally make no decisions yet sit enraptured by them. The world wide gambling market is worth over 300 billion dollars while the videogame market is worth less than 70. Amazingly, the majority of that 300 billion dollars comes from people playing games where their decisions have no impact on the game.

    Pachinko Players by Miguel Michán

    But every pillar of game design that I respect is fundamentally rooted in player choice. So why the hell are all these people deciding to give money to casinos?

    So far my only answer has been cash payouts. Yeah, slot machines are pretty simple skinner boxes. But even in a skinner box you need to give the pigeon something they care about. If you awarded the pigeon “points” for hitting a button then it would lose interest pretty fast. The cost of hitting the bar dwarfs the potential gain of the payout.

    So it has been with slot machines. Downloadable slot machine games have been around for as long as games. They never really went anywhere because with no cash reward and no interesting choices the skinner box collapses. Until now. Ladies and gentlemen I would like to present to you, Slotomania:

    Slotomania and, ridiculously, Slotomania HD are both on the iPad top grossing apps chart. That means people are dropping a lot of money into a slot machine with no payout. The skinner box has no clothes but it doesn’t seem to matter.

    How did Slotomania manage to turn the Skinner Box back on? Well check out the bar at the top of that Screen shot. Can you guess what that is?

    That’s an xp bar. You can level this slot machine. When you level you get access to more games (well, the same game reskinned) and you raise your minimum bet. You gain xp purely by spending credits. The more credits you gamble the more you level. Of course you run out of credits about two and a half games in so the only way to unlock more is by paying real money.

    I also think they trade off the associations that casino gamblers already have with slot machines. By mimicking casino slots they can hijack the Pavlovian response people have already built up around traditional slots.

    This is genius, evil, and Slotomania has been making money off of it on iPad and facebook for two years. They had been refining their strategy and becoming more and more profitable until, shock, last year Ceaser’s bought them and they really started to make money.

    It’s these kind of brain hacks that make me really uncomfortable. Ceaser’s and Slotomania basically earn their money from failures in the human mind. They can compel us to play their shitty games and they can compel us to pay them money to do it. They don’t offer us a system to master or anything you might define as “fun” in return. They just reach into our brain and make us dance to their tune.

    Gambling and slot machines have historically, and sensibly, been deemed bad for society and often made illegal. Why Apple has decided to let them loose on its walled garden is beyond me. They’re gambling that the government isn’t going to step in and try to put things in order. If they lose that bet then the laws will be broad and ham fisted and we’re all going to wish they’d just stayed the fuck out of the casino.

  • Rebuild: iPhone, iPod touch & 99 cent sale

    I just released the version 2.0 update to Rebuild iOS, which adds support for iPhone 3GS/4/4S and iPod Touch 3&4. To celebrate, Rebuild is also on sale for 99 cents through the end of this weekend!

    I just got new business cards made up for GDC. This one is my favorite. :)

    I hope this update also addresses some of the stability issues that Rebuild has been having on the iPad 1. Did you realize an iPhone 4 has twice as much memory as the iPad 1? So it was easier than I’d expected to accommodate iPhones, and obviously I should have done this earlier. I can’t get enough of how nice the cartoony map graphics look on that double-density display.

  • Embrace the Chaos with Pineapple Smash Crew

    Today Richard Edwards’ game  Pineapple Smash Crew was launched on Steam and Desura and it’s totaly awesome! I was lucky enough to play it before its release and I’d like to review what I think makes it such a great game.

    At its heart Pineapple Smash Crew is about managing Chaos. It is a whirling, exploding, ballet where you are constantly trying to bring order in the face of total bedlam. I think as a species we value simplicity and order so it’s a strong theme.

    Bring Order to the Chaos!

    Managing chaos is also a powerful game mechanic because:

    1. pummeling it into order is fun
    2. while living in the chaos we are constantly being presented with new situations and small puzzles to solve

    Games are about making decisions. Every moment you play there are good moves to make and bad moves to make. You succeed by choosing the good moves. In this way every game is a puzzle game. Pineapple Smash Crew is a puzzle game with very quick turns.

    In all games the fun comes from improving. From learning to play the game better. We do this by recognising situations we’ve been in before and growing a catalog of good moves which fit that situation. In some games (especially old arcade games) we play the same level over and over. This makes it easy to recognise situations because we see them in the same order every time. Every enemy or jump is a small puzzle that it’s up to us to solve. Then we have to remember the solution and apply each one in order to beat the level. This is how you play a hard Mario or Mega Man level.

    These games have very little chaos in them. Because you can predict what’s coming you rarely have to improvise on the fly. Pineapple Smash Crew is different, it’s all about improvisation. In Pineapple you still have to build a catalog of situations, puzzles, and possible solutions to them. But in Pineapple you have to be more fluid in matching puzzles to solutions because you will never see exactly the same puzzle twice. Luckily our brains are really good at this. Just like we can recognise the letter “A” in many fonts we can recognise fundamentally simmilar gameplay situations.

    The more we play the more situations we can recognise and the more chaos we can endure. This is essentially what a difficulty curve is. It’s an attempt to present you with slight variations on puzzles you’ve already solved and require you to solve them more precisely and efficiently.

    Rich has done a great job of orchestrating this dance between order and chaos. You wont be thinking about cataloguing situations or slight variations, that all goes on in the subconscious. You’ll just be thinking “Oh god where is the next health pickup” and “Fuck Yeah!” when you blow the hell out of six guys with one well aimed rocket.

  • 2011 Was A Good Year for Zombies

    It was also a great year for us! Colin and I hopped around the world again with nothing but our laptops, meeting new friends and working on our respective games. I released Rebuild 1 in February from Costa Rica, Rebuild 2 in October from Japan, and Rebuild Mobile in November from the Philippines. The games have done well enough that we can afford to keep this travel thing up for another year.

    Best of 2011 AwardRebuild recently won the Best of 2011 award for Simulation/Strategy from JayIsGames, my favorite casual games review site. Between that, placing in the Kongregate top ten all year, and being called “unputdownable” by Touch Arcade, Rebuild has totally exceeded any expectations I had when I wrote the first version one weekend at my in-law’s house. Thanks to everyone who’s encouraged me to keep improving the series!

    Soon I’ll be releasing Rebuild for iPhone/iPod touch, to complete my domination of the iOS market. Then it’s finally time to take a break from the brain nomming cretins (god love ’em) and work on Incredipede with Colin. Which BTW is going to look amazing!