Board Game

Adding remote control navigation to a non-grid based interface

This article explores some techniques for using the remote control to move focus around between elements of different shapes and sizes in a two-dimensional space. These elements are not neatly arranged into a grid configuration, so we need to do a little work to figure out which element to select when using the arrow keys.

In this case, we’ll use a world map from iConquer , one of the first games designed for Mac OS X in 2002, itself based on the Risk game for the original Mac, which was based in turn on the famous board game !

The map includes 42 “countries”, each of which is connected to several neighboring countries in a cross-linked object graph. Lines on the map connect countries across water, and the map wraps around so Alaska connects to Kamchatka. You first heard of Kamchatka from playing Risk, right?

For this tutorial we’re not going to build a working game, we’re just going to use some image resources from the native Mac application as a demonstration of how we can move the selection around using the arrow keys.