Jul 27

Markus Nigrin wrote a great follow-up to my previous post on managing one’s burn rate when going independent. His post touches on some really important information that I completely left out of mine, namely, being educated about investing and not ignoring it. I’m guilty of this as well, but only since “cutting the chord” have I become much more concerned about my lack of education about investing, and it’s something I’m currently working to improve.

It’s a great read, and some good book recommendations from him in that post. I would add to that “The Black Swan: The Impact of the Highly Improbable” as another book to read for those that are in a very “unpredictable” and hit-driven industry such as games, books, etc. It echoed a lot of sentiments I had felt at the time, but didn’t know how to articulate it and the book does a good job of explaining that.

Jul 26

While I was working at a day job for the past couple of years I was gobbling up any info I could find on going fully independent and the what it takes not only from a business perspective, but what you have to change about your personal life, ideals, and expectations in order to make it sustainable. One of things that stuck out a lot was managing my burn rate. Minimizing the amount of money leaving my account wasn’t just a matter of not buying a Starbucks coffee (I don’t even drink coffee, but you get the idea). It required some fundamental changes in the way I thought about money and how it related to my daily life. Jeff Tunnell I think articulated it very well in his article, where he talks about “Right Sizing Your Life“:

The bottom line is that you cannot live downtown San Francisco, drive a Porsche, have three kids, eat out every night, have Starbucks two times per day, charge up the credit cards, and live the way most of society tells you to. If you want this stuff, start coding in Java and go to work for IBM. But if you want to enjoy your work, feel creative every day, and make games for a living, you will have to pay a price.

Adjusting Your Daily Life

It sounds pretty obvious and seems straightforward. But it’s definitely easier said than done. The biggest problem being that if you are working a day job, if a decent one at that, you can afford a lot of extra expenses. Having a “steady paycheck” at a day job numbs that feeling of loss when I spent money. I would always spend within my means, but when my means don’t match up with what my “means” will be by the time I’m independent, I imagined I’de be in for a tough transition.

I tried all the obvious things: Stop eating out. Stop buying food/drinks at bars every weekend. Start cooking at home. Start watching less TV (canceling cable). Doing any of these cold turkey was a difficult feat. But like any sensible diet/exercise plan you should do it in moderation until you’ve achieved your goal. One of the things I noticed is when I find myself hanging around friends and socializing a lot, spending went up. It’s an obvious and natural occurrence, but I would think most people believe they are in control of how they spend their money. But in fact, at least in my case, where and how I spend my money is heavily influenced by what I am doing and with whom. You go to bars, movies, play games, eat out with friends. That’s not to say you should become an anti-social either. You just need to plan accordingly and figure out a way to fit your new goals in with your current social circle. For me, it became less of a spontaneous thing and more scheduled. If I knew I had plans later in the week to go out, I spent/saved accordingly to make it happen if it was possible.

Technology to the…rescue?

I also tried a lot of money management software with mixed success. Mint was a popular choice and one I had used initially. It’s great for tracking where you’re money is going. But it’s biggest strength may be the weakest link in trying to change your spending habits. It’s a passive way of keeping track of your money. You have to be vigilante in looking back on what you spent after the fact to see why the numbers worked out the way they are. I decided to try a different approach by creating a habit of logging expenses as I went throughout the day spending money. Since I had my iPhone with me everywhere I went, it seemed natural that there’d be an app for that.

I  used Spend [iTunes] to keep track of my spending but also try to enforce some sort of budgeting. When I think about it, the idea here isn’t so much as to just “keep a log” of what I’ve spent, but to encourage a habit where the act of spending money requires me to reflect on it for at least the briefest moment. Spending with a debit/credit card is easy, but when I have to pull out my phone, load up the app, type in a description and price, the entire time I’m thinking about the act of spending money. It becomes a bit more painful, similar to spending real cash. This had a much better impact on my spending habits than Mint did. I could more visibly see in real-time where my spending was heading and how much room I had left in my budget. I become much more aware of all the “small things” I would spend money on throughout the day like vending machines, snacks, sports drinks while working out, etc. The specific app I use isn’t important, it’s more about developing a habit to be conscious at all times of where your money is going.

Keeping At It

Having friends and family that support your goals goes a long way as well, not only in your spending habits but also in what you consider good ways to spend your free time. Fast forward a few years later, my day job is making indie games, my views on what I feel is important financially and personally has changed a lot and I feel a lot less stressed out about money in general. Just by trying to reduce my burn rate for several years I have a very clear picture of what I need in terms of finances in order to make this indie business sustainable. So in essence, I have a very good gauge as to whether I’m in trouble or not relative to how much I’m taking in. Also in an effort to reduce my costs even further, I moved back down to the deep south (Alabama). Living near DC is pretty expensive. It’s a pretty big move leaving DC behind because I loved that city. But in the end, being closer to family and life long friends in the south was a great bonus to saving a lot of money on living costs. I consider myself pretty mobile at this point in my life being single with no kids or spouse to look out for; so up and moving may not be an option for everyone.

Stepping outside the “rat race” is more than just becoming independent. You have to be willing to fight the pressure from those around you to change your thinking. Managing and minimizing your burn rate is one of many aspects of making the transition from “employee” to “self-employed”. Not the most detailed post, but hopefully will give those working-by-day-indie-by-night a few ideas to step a little closer to full-time.

Jul 19

When your profession empowers you to design literally just about anything, it’s easy to rationalize just about any game design decision. Hell, I somehow managed to rationalize that our new power up for Tilt to Live have a screeching hawk sound effect. Bad idea? You’ll have to wait and see.

When Adam and I are working on design details for how a particular system or game mechanic will work, we bring a lot of assumptions to the table of how we think people think. And those assumptions are sometimes rooted pretty deeply so it’s hard to get on the same page. What do we do then? We get into an all out brawl. Ok, not really. We usually turn to our ‘beta testing’ group to do some observation of how they play and react to our design decisions. Our group isn’t very expansive at the moment as most of them are local friends so we can bring them in and have them play our latest builds. Keep in mind I use the term ‘tester’ for anyone that seriously runs the game through it’s paces and those that play it really quickly to see how the game works. Now all this is the easy part. You have a conflict or issue figuring out some detail of a design you go to play testing to try to gather some data. Simply enough. If you aren’t doing at least this, then you’re crazy awesome at game design and you should stop reading. Now. Really.

Doing it honestly.

Like I said before, it’s easy to rationalize any creative decision. It sometimes becomes even easier to rationalize a creative decision in the light of data.  ”See? He did notice that you can only have pick up at a time active!” or “See? He didn’t even notice the limitations of the pick ups because he just runs through them blindly!” You have to try to stay objective as possible. You have to try to get in the shoes of the player and see what they see. Ideally, they are talking to you the entire time as they play giving you verification that your hypothesis is either incorrect or correct. Having worked on a single project a long time, the decisions you make on it almost take on a personal weight. When you find that your idea doesn’t work, you can take it personally if you’re not careful. This can become dangerous not just for your own mental well being, but testers/friends can pick up on it and not tell you what you need to hear.

One tip I found helpful in reading my data and separating myself from my idea is: Don’t think of why your idea will work. Think of why your idea won’t work. It can be seen as a negative way of going about things, but only listing the positive doesn’t help you analyze your decisions. You become blinded by the ‘happy path’ of when your idea is executed inside a narrow scenario, ignoring a sometimes large problem in the shadows. Uncovering the weaknesses in your design is far more telling than a huge list of positives. Save the positives for the “back of the box” :) .

Doing it early.

One of the things that still gets me today is trying to send out builds of our game as early as possible. I always keep saying “just one more day and I’ll have feature X completed or bug Y squashed”. I have to remind myself that our testers aren’t our ‘true’ audience. Yes we want to make them happy and have fun. But better to have your helping hands tell you your game idea is utter crap than to find out it is utter crap 3 weeks after release. This one can be rather painful because you’re fully aware of all the gaping flaws in the code, art, and mechanics and you don’t want to show your work in an incomplete state. Not to mention, it’s hard to explain to your testers why the player sprite is flickering about as if it’s having a seizure whenever they press ‘jump’. Well do it anyway. And get use to it.

We’ve been getting better at this through all the game mode additions we’ve been doing to TTL. With our latest mode, Frostbite, we’ve had play testers in very early in the iteration of the game mechanic phase. They’ve seen the game grow and each step of the way have provided extremely good feedback on helping us balance the game. The actual game mode wasn’t even fully functional when we started playtesting. So what did we get out of it? We focused on the feel of the movement, controls, enemy placement. All minor things that I would spend tedious time tweaking on my own. With each new iteration we tell themwhat was new in that build and have the testers focus on it instead of being overwhelmed by “play this whole game mode and tell me what you think.” One thing to keep in mind is beta testers are there for feedback. Try not to let it turn into a ‘designed-by-committee’ ordeal. Or maybe you want to…but I’m a control freak so that’ll never happen ;) .

Doing it often.

This can be a double edged sword. From my limited experience, testers can sometimes be seen as a limited, nonrenewable resource. You may have a completely different group of testers by the end of the project than when you started. I had this idea of being gung-ho about testing early so I would send out weekly builds to everyone very early in the development process. The problem? Tester fatigue. When the deltas between versions is very minimal, testers may not be interested in a weekly build. As a result, I spaced out the test builds in early development to be a little more rare so that testers had time to recover and were excited to give a new build a try. As release  day got closer, this feedback loop shortened as we approached daily, sometimes hourly test buids.

In the end, no matter how you approach getting feedback for your game, it is almost always is beneficial to your game.

This post is part of iDevBlogADay, a group of indie iPhone development blogs featuring two posts per day. You can keep up with iDevBlogADay through the web siteRSS feed, or Twitter.

Jul 12

Ahh, my first idevblogaday post! For those that don't know, idevblogaday is a group of indie dev bloggers started by Miguel Á. Friginal of @mysterycoconut games to get developers blogging more regularly. So we'll see how that goes :]. After finishing the initial release of Tilt to Live I had been wanting to gather up my thoughts on what I had learned about making a game that is heavily dependent on accelerometer controls. Sadly, this was on the back burner for the longest time. I eventually got contacted by Noel Llopis of Snappytouch and through some e-mail conversations with him I was able to get some of my ideas finally in writing. So now, I figured I'd take that and present it to everyone to see, learn, and laugh at my horribly awesome code.

Some Background

I want to give a quick and dirty history of Tilt to Live (TtL). This is not a post-mortem quality account (That will come later), but something so readers have a context of how TtL evolved and where it came from code-wise. TtL was the first app I wrote for an iDevice platform, ever. First time using a mac regularly, first time using XCode, first time using Objective-C. There were a lot of firsts. Typically when I'm learning something I don't bother with style or best practices, or platform specific conventions. I learn all that as I go. TtL has come a very long way from the first iteration of it.

Then

The first signs of things to come! The green dots are what are considered the 'nukes' in today's TtL.

..and now:

 

While the game is pretty, thanks to Adam's Awesome Art (AAA quality!!!), the code at times can feel like one giant ugly beast. Usually  when I'm in an environment I know well, I write a prototype, then start over and write the game 'correctly' so the code can be maintainable throughout. Not so with TtL, this game evolved straight from prototype hack-a-thon to full on production code. The code base went through lots of rewrites, refactoring, and dubious 'fixes' to keep things somewhat on the side of sane. On the bright side, I now have a much clearer idea of what 'maintainable' code shouldn't look like and a lot of design decisions I know to make earlier on in the coding process to avoid some clunkiness in the future. There's certainly something to be said though for making it 'just work' because in the end, no one gives a damn (except the author) how it's written as long as the game is fun :].

With that said, I'd like to talk about some of the design issues we came across while developing TtL's tilt controls.

Design issues with tilt controls

Our main area of focus on 'controls design' was how to present calibration to the user. Overall, we had a very minimalistic approach to the game's user experience. We wanted minimal taps to get into the game, and once in the game, all you did was tilt to interact. Naturally, having calibration be automated seems like the ultimate in minimalist user-experience. The user doesn't even experience it. It's supposed to "just work". So how did our calibration work initially? Well, when the game counts down on '3,2,1' and the '1' disappears the game calibrates at that point in time as the neutral position. Also, when the player unpaused the game, it would recalibrate. Sounded great, and it worked great...if you understood how it worked. From playtesting we found:

  • Users would get confused as soon as they change their play position (from say, in lap to on top of a table) without pausing the game. It was a cause of frustration for them.
  • The more savvy players immediately looked for options to calibrate because the terminology was engrained in them from previous iPhone games. Without options to calibrate they felt frustrated that they could not control the way they'd like to play.
  • In more social settings rather than isolated playtesting, the game would be played haphazardly. This caused all sorts of havoc on our auto-calibration scheme. The player would either lay the phone down, swing it down to their side as they're talking to their friend while the count down is going on and then when they'd swing it back up again to play the calibration is royally screwed up. This didn't make for a good first impression either. Ouch.

So what happens when we decided to tell users that pausing and unpausing the game would recalibrate the game before they played? We did that as a quick way to emulate 'custom calibration'.

  • For the group of users who understood the technical need of calibration instantly got it.
  • Everyone else pretty much said "What ees des calibration meen?". Yes, in bad fake accent and all.

Well, since we wanted to appeal to more than "hardcore" (I use that word very loosely here) iPhone gamers we had some take aways from the testing:

  1. On auto calibration: Without proper feedback, the user can set the calibration very wrong, making them think the game is broken.
  2. On custom calibration: Some users get it, but with a near infinite number of choices to the user, it's hard to expect a non-gamer to know what the best setup/calibration would be.
  3. On choices in general: Experienced users like it, nay, demand more options. The fewer decisions a user has to make on how to "play" your game, generally the more accessible it is. A powerful concept in the mobile space, especially with non-precise/noisy physical inputs like accelerometers.
  4. In respect to TtL's design specifically: TtL's gameplay requires accurate tilting controls or the game falls flat. Other games that require less precision can certainly get away with auto calibration.

So after brainstorming a few ways to present a new calibration screen, Adam had a pretty unique idea compared to most tilt-based games at the time:

While we thought it was a good idea and it playtested well, we didn't think the preset choices would resonate with users as much as it did.

"The game has some of the best options I have found for customizing the tilt controls." -Nate Adcock, iphonelife.com

"For those of you worrying about manual calibration, don’t." -nodpad.com

"Unique to this game is a calibration option that provides three default control schemes that should satisfy most positions that you’d like to hold your device in." -Ben Briggs, gamesuncovered.com

 

Players and reviewers alike seemed to respond positively to our approach of essentially what is just a common preset list. The regular setting works for the vast majority of play cases and top-down works great for the purists. Sleepy was a rather experimental one that has mixed results. It works for me, but if you ask a group of players to play in a "sleepy" position you'll most likely get a higher variance of orientations than what "regular" and "top-down" imply. I don't think our technical implementation of tilt controls was any more accurate than the next game's, but I feel because the user was able to more accurately set the game up successfully with a reduced number of choices their experience was much more positive.

Technical issues with tilt controls

Design issues aside, the technical side of my approach to tilt controls had a few issues I had to overcome as well. The first and biggest issue was a limitation of how I went about calculating the tilt offset. As the calibration of the iPhone approached a purely vertical orientation, detecting horizontal motion reduced to zero pretty much. To counteract this, I added an additional control scheme for when the device was in such a position and require the player to move the ship by "steering" the iPhone instead of tilting. Not the most ideal situation, and with the advent of the iPhone 4's gyroscope this could probably be mitigated. There are certainly ways to implement tilt controls on the 3G/3GS where this isn't an issue, but I haven't had much time to experiment with them yet. I'll certainly post an update on my findings as I get to them.

The 2nd issue was noisy accelerometer data. I had experimented with filtering the raw input, as per Apple doc recommendation, but in the end I let the input through unfiltered and just altered the rendering of the ship. Rendering the ship's orientation based on the raw data caused the ship to shake uncontrollably as if it was hyped up on speed. Also this would make it impossible to use any weapons that required aiming. Solving it was pretty basic as I just added an interpolation function that would ease the ship to the current desired orientation over a couple of frames and adding a dead zone so that players can sit still without spinning wildly. I've played a few tilt-based games where the players' avatar had an orientation and no dead zone was implemented. Be nice to your players, add a dead zone at the very least damnit.

A 3rd but minor issue was with sampling rates. I sample the accelerometer at 30hz and TtL runs at 30FPS. When (not if) the FPS start dipping the accelerometer data seems to get a bit out of sync and you start seeing small jolts of movements from the accelerometer data that came in between some of the frames. TtL doesn't do much in managing varying frame times (shame on me), but this problem hasn't brought much pain so I'm not looking at it worth fixing yet.

Well how does it REALLY work?

For those that are still reading this and are curious to see how it's implemented I've attached a sample XCode project with the implementation that TtL uses. I took a GLSprite sample project and mutilated it until it resembled a sufficient "tilt controls sample". The approach I had in mind was to make the iphone function as a "reverse" joystick. I'm not even going to try to explain WTF that means in text so here's a poorly drawn illustration:

I  interpreted the accelerometer data in a way that would project a vector that always pointed away from the screen of the device. I would use this to find the difference vector between it and the 'neutral' position (blue) and finally project this onto the 2D plane of the screen to give me a velocity. The green arrow is what the player's velocity was set to. So when the neutral position and inverted accel data are very close to each other, the player's velocity is clamped to zero (deadzone).

 

You'll find in the sample project that all the relevant accelerometer logic is implemented inside the TiltPlayer class in the 'accelerometer:didAccelerate" method. Inside the TiltPlayer's 'update' method it handles the smoothing of the icon's rotation to reduce jitter. The rest are just supporting classes for rendering and other boilerplate code. So for those that wish to just see the pertinent code without firing up XCode, here it is:

- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration
{
/* while not ideal, most of the relevant code is stuffed in this method for clarity. A lot can be computed once
and saved in instance variables, preferences, etc instead of re-calculating each frame
*/

// hard coding our 'neutral' orientation. By default this is the orientation of
// having the device tilted slightly towards your face.
// if you wanted strictly a 'top down' orientation then a (0,0,-1) vector would be put here.
// to create a new 'neutral' position you can sample the UIAcceleration parameter for a single
// frame and set that to be the new nx,ny,nz for the remainder of the app (aka calibrating).
const float nx = -0.63f;
const float ny = 0;
const float nz = -0.92f;

// this quaternion represents an orientation (I like to think of it as a 3D vector with 0 rotation in this case)
// that points straight out from the device's back away from the user's face.
Quaternion neutral(0,nx, ny, nz);
// take a straight up vector and rotate it by our 'neutral' orientation
// to give us a vector that points straight out from the device's screen (at the user's face)
Quaternion neutralPosition = neutral * Quaternion(0,0,0,1);

/* now with our 'neutral' quaternion setup we:
1. take the incoming accelerometer data
2. convert it to a 2D velocity projected onto the plane of the device's screen
3. and rotate it by 90 degrees (since we are landscape oriented) and feed it to our player's
velocity directly.
*/

// convert our accel data to a Quaternion
Quaternion accelQuat(0, acceleration.x, acceleration.y, acceleration.z);

// now rotate our accel data BY the neutral orientation. effectively transforming it
// into our local space.
Vec3 accelVector = (accelQuat * neutralPosition).v; // we only want the 3D vector at this point

// now with our accel vector we wish to transform it into our standard (1,1,1) coordinate space
Vec3 planeXAxis(1,0,0);
Vec3 planeYAxis(0,1,0);
Vec3 normal(0,0,1); // the normal of the plane we wish to transform our data into.

//project this movement onto our X/Y plane by removing
// the accel part that is along our normal
// note: Vec3 * Vec3 = dot product of the 2 vectors.
Vec3 projection = accelVector - normal *(accelVector * normal);

// now decompose that projection along our X and Y axis that represents our 2D plane
Vec2 accel2D(0,0);
accel2D.x = planeXAxis * projection;
accel2D.y = planeYAxis * projection;

const float xSensitivity = 2.8f;
const float ySensitivity = 2.8f; // yay magic numbers!
const float tiltAmplifier = 8; // w0ot more magic numbers

// now apply it to our player's velocity data.
// we also rotate the 2D vector by 90 degrees by switching the components and negating one
// since we are in a landscape orientation.
vx += (-accel2D.y) * tiltAmplifier * xSensitivity;
vy -= accel2D.x * tiltAmplifier * ySensitivity; // we do a (-) here because the accel y axis is inverted.
}

if you want to download the XCode project, you can grab it here. [note: updated with Mikko's more concise version below]

That's it for now. As always, feedback is welcome and if anyone takes that code and improves it, it'd be nice to know :].

*Update*

Thanks to Mikko Mononen for making the code much more concise! Below is the altered method with Mikko's contribution:

- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration
{
// A much more concise version courtesy of Mikko Mononen http://digestingduck.blogspot.com/
Vec2 accel2D(0,0);
Vec3 ax(1, 0, 0);
Vec3 ay(-.63f, 0,-.92f);
Vec3 az(Vec3::Cross(ay,ax).normalize());
ax = Vec3::Cross(az,ay).normalize();

accel2D.x = -Vec3::Dot(Vec3(acceleration.x, acceleration.y, acceleration.z), ax);
accel2D.y = -Vec3::Dot(Vec3(acceleration.x, acceleration.y, acceleration.z), az);

const float xSensitivity = 2.8f;
const float ySensitivity = 2.8f; // yay magic numbers!
const float tiltAmplifier = 8; // w0ot more magic numbers

// since we are in a landscape orientation.
// now apply it to our player's velocity data.
// we also rotate the 2D vector by 90 degrees by switching the components and negating one
vx += -(accel2D.y) * tiltAmplifier * xSensitivity;
vy += accel2D.x * tiltAmplifier * ySensitivity;

}

Jul 10

Looking back at some of my old blog posts where I contemplate and muse about long term career goals; I would have never guessed 9 months later I would sitting here having accomplished one of my 'loftier' ones: Become a full time independent game developer. It's been 23 days since I cut the chord and went full time indie. And the range of emotions are wild and varied as I flail about trying to get settled into a new and super exciting lifestyle. Having been laser focused on such a goal for what seems like forever, it's a bit jarring at times to think that challenge of "going indie" is over and done with. I now have to come to terms with my new found freedom, and stay focused while trying to switch gears to newer long term goals.

It feels like a weight has been lifted as I haven't had to make some decisions for the past few weeks as I did for the past several years: Do I hang out with friends, or work on that feature for game X? Do I call person Y back to catch up on things or keep working for the next hour before I have to sleep and get up to go to my day job? Do I skip working out today to squeeze in an extra hour to finish up this last build? Do I work through the weekend to catch up on lost dev time or take the time to get to know person Y better?

From all the indie devs I've talked to, doing this type of work is a 24/7 job. And it certainly feels that way, but less 'compressed' so to speak. I'm constantly thinking of what needs to be done next, whether it's send out press e-mails, catch up on support e-mails, bug hunting, developing, prototyping, yadda yadda yadda. But having those extra 8-12 hours in the day now certainly helps keep me sane. And I'm aware I'm probably feeling a bit more relaxed right now because we're at the tail-end of development of Tilt to Live, instead of in a 'crunch time' period for another game. So I'm enjoying it while it lasts. But I can't shake the feeling that the last 5 years of my life has felt like crunch time, and I'm only now returning to some semblance of normalcy. That's if you can consider a career in making indie games normal.