Saturday, July 23, 2016

Going Back to the Voronoi Well


I like hex maps. There's something pretty about them, and one of the first "serious games" I played - by which, I suppose I mean a game involving thinking, made for grown-ups - was on a hex grid. (That game was Outdoor Survival, derided as one of the worse Avalon Hill games, made on a bet, or a dare, or some other poor form of boardgame design inspiration).

I also dig maps with irregular spaces. Look at the spaces on the Risk board. OK, those are countries. How about the spaces on a Gammarauders board: https://boardgamegeek.com/image/118956/gammarauders?size=medium (still not a terrific game, but relevant to this discussion. Oh, and they're within larger hex tiles, to make layout interesting).

A while ago, I was doing some fiddling with using Voronoi Diagrams to make irregular polygonal tilings, with an itch to see if a computer RPG might use those as an interesting "grid" for a map.

Let's say your unit has a move of 8 spaces. And maybe the spaces are of different sizes, smaller on rough terrain, larger where it's smoother / flatter / clearer / easier. You can count out an 8 space path on the grid, and it's all easy. My barbarian guy only has a move of 6 spaces, and so he's not going to catch up to you, so long as you're trying to escape.

Irregular grids feel a little more natural - like something that'd be created by some natural process. Regular grids of squares or hexagons are obvious abstractions, lines laid down by some divine geometer.

One reservation I have with an irregular grid is that it assumes a single mode of travel - let's say walking. But what if your birdman unit wants to fly across the map? Seems like he would disregard surface terrain considerations (but he might have his own wind current issues to consider).

The above image is a Voronoi diagram of a bunch of vertices laid out in concentric circles. I've rotated each circle a random amount, to keep things from getting too regular, but you can still see regions where the spaces are nearly a square grid and others that look pretty close to a regular hexagon grid.

I'm considering implementing Lloyd's Relaxation algorithm to try to smooth out some of this, but it requires computing a centroid per tile, which is more work than I really care to do right now. I could do Laplacian relaxation, which is simpler, and might be just about as good.

I really just wanted to post the pretty picture.

No comments:

Post a Comment