Case study: LetterMeister
In case you haven't come across it,
LetterMeister is a word puzzle game for iPhone.
Before exploring various of the programming techniques
that went into making the game, let me summarise the game from a player's perspective:
- the game centres around a (British-style) "crossword" grid, consisting of
a number of interlocking English words;
- on each level, letters initially appear in random order and the player's task is
to rearrange them, pairs at a time, to reconstruct the original grid of words;
- players are given coloured clues to help determine which letter should go where;
- the game's overall difficulty is configurable;
- within a game, each level gets progressively harder;
- new features are introduced to the player when they reach certain levels;
- each level is created on the fly at random: each time the game is played,
it will be completely different but respect the overall level and game difficulty;
- the game features animation and graphical effects including gravity effects;
- the game is operated via the touch screen: the player taps one letter followed
by another to swap that pair of letters.
From the programmer's perspective, this functionality implies the following
key implementational requirements:
- we need some kind of database of English words, organised by some kind of
"difficulty" assessment of those words (since we want to control the overall
difficulty of the game);
- we need a method to choose and lay out a random selection of those words in a grid,
again respecting some measure of overall "difficulty" of the resulting grid;
- we will need a random number generator suitable for constructing a good range
of grids (if you're not familiar with the issues here,
you may wish to see this site's tutorial on random number generation);
- we will need to implement basic animation and gravity behaviour;
- on a relatively small screen, we need our grid to have enough letter positions
so that we can create interesting grids, yet at the same time it must be
feasible to tap on individual letters.
On the following pages, we will examine how these and other requirements were
implemented.