Thursday, April 11, 2013

The Art in a Game


Most of the software developers I know enjoy playing some kind of computer or card game, and they all gain some insight into good creative practices as a result. My muse is FreeCell and here are the lessons it has taught me:

Be aware of long-term problems
Sometimes a key color-number combination, such as both black 10's, can be near the bottom of separate piles. This inhibits your ability to complete long strings of builds in any column. Avoid making the problem worse by burying the color-number combination deeper. You can also end up with two of the same color card in the same pile. Don't just focus on one of the long-term problems: be aware of both of the long-term problems.

Take advantage of short-term opportunities
It is probably a good idea to face an ace (or one of the next cards for the home pile) by just moving one card up to a FreeCell, as long as you have other moves afterward.

Use mid-term strategies
Don't focus on the long-term problems (although be aware of them) and don't focus on recklessly moving cards up to the home pile. Rather, take the mid-term strategy and capitalize on long builds and emptying columns. Keep variety in your hold cards.

Maximize flexibility
Given the choice between moving cards home and gaining the flexibility of an empty column, choose greater flexibility. Think twice before leaving yourself only one open FreeCell. Patience is a virtue.

Think ahead
Plan ahead for what a move might enable -- does it allow you to open up another FreeCell or mitigate your long-term problems?

Use the hidden force
Sometimes the answer lies with forcing cards home biasing a single suit. This might be alright if it increases your flexibility elsewhere.

Be persistent
When you are stuck, take a break and do something else so that you can return later with a fresh outlook.

Know when to bail out
Sometimes a deal is just too difficult. Know when you are "in over your head" and bail out so that you don't waste your time.

I'm sure that these are all metaphors for certain things you encounter during the development cycle, but find your own metaphors in your own games. You don't have to be good at any game in order to learn its lessons, but you do have to play at it occasionally.