Hexagonal Grids

The most relevant feature on a hexcrawl is the hex map. So if I want to develop a hexcrawl, the obvious first step is to create a hexagonal grid and understand the particularities of the hexagon maps.

Some time ago I programmed a simple hexagonal grid generator. The source is public, and accessible from this repository: Configurable Hex Grid Generator. At this moment I’m working on improving the code and updating the dependencies to maintain up to date the project. I think that it could be useful for other developers prototyping their own hexagonal maps that are testing their own hex map ideas.

Hexagonal maps are being used in lots of strategy games and there are lots of articles on the internet about hexagons, hexagonal grids and hex maps from great game developers. The most relevant resource about hexagonal grids can be found at Red Blob Games, from Amit Patel: Amit’s guide to hexagonal grid and Amit’s Thoughts on Grids.

At Amit’s Blog there are other articles that I will use during the prototyping and development phase of the Hextory game, like the procedural world building algorithms for the terrain and biomes generator.

Hextory Grid

A square grid or a hexagonal grid is a data structure chosen on many video games to represent a map. Obviously, for Hextory the grid used will be a hexagonal one. Also, the orientation will be flat (vertical columns). This is the same orientation that is used in hexcrawls, and in the war game The Battle for Wesnoth too.

This orientation selection is important because I want to maintain an old school feel using the same orientation of classic hexcrawls, and I need lots of pixel art tiles for the prototyping of the game. I’m not a graphic designer, only a developer so the art from the game The Battle for Wesnoth will be very handy.

The decision to use the Wesnoth tiles also sets the tile size to 72x72, with sides of 32 pixels. Wesnoth uses a perspective similar to isometric: Mesilliac’s Essay on Terrain Perspective.

Anyway, the plan is to create a grid and tile system for the game, that lets you change the tile size and be flexible enough to let you use different art tiles. The idea is also to use some classical hexcrawl tiles.

About the coordinates system, the game will use the offset coordinates with an “odd-q” vertical layout that shoves odd columns down.