O'Reilly logo

Chris Crawford on Game Design by Chris Crawford

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Map

The first sub-problem was the map representation. This problem had two components: terrain representation and hexgrid computation. A hexgrid is commonly used in wargames because it allows more precise directional alignment of units and doesn't have the problems with corners that a rectgrid (such as is used on a chessboard) imposes. A hexgrid looks like what's shown in Figure 13.1.

Figure 13.1. A hexgrid.

Each hex in the hexgrid can contain terrain of some type: trees, hills, depressions, rivers, lakes, open ground, etc. After much wasted effort trying to computationally define all these terrain elements, I realized my error, an error that is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required