by Aendis in
PolyCycles

Hex map / grids in games

Hex maps, hexagonal tiles, and hexagon game pieces have been part of gaming, for a long time. A search on your favorite search engine suggests the first game to use hexagon tiles is a strategy game called Agon. Slightly later chess variants adopted hexagonal tiles such as Gliński’s Hexagonal Chess, circa 1949 or a John Jaques and Son hexagonal chess game, Hexagonia, circa 1864.

Of course, we can’t forget Sternhalma, 1892, better known as Chinese checkers in the western countries.

See Hex map, Agon, Hexagonal chess, Hexagonia, and Chinese checkers.

Generator

From my own experience, hex maps or a hex map grid seem to be popular in RTS games and certain RPG games. Sometimes the game world terrain is less hexagonal than the movement indicators, but it’s still utilized in some fashion.

For the PolyCycles project, I want a terrain that is unique, provides synergy with polygon style artwork, has some editing ability and can be extended or modified. As a hobbyist developer, I need tools that help support my creativity, and allow me to jump start a process.

Several years ago, I found a tutorial on catlikecoding.com for generating a hex map. There are 27 sections in the hex map tutorial series. Each section is well documented, basically hand holding you through the coding process. I recommend completing the tutorial first and look at the updated code later.

Recently, Jasper Flick, the creator/owner of catlikecoding.com has begun updating the project to run on newer versions of Unity. Including shader updates and switching to URP. Jasper has generously licensed the code with a MIT-0 license. The tutorials and project can be found at Catlike Coding. Thank you, Jasper, for providing an amazing tutorial and project code to the community.

Quick map generation

Hex map generator produces a unique and low polygon looking terrain. In the image, you see rivers, foliage, and several different texture maps on the terrain. The hex editor allows you to further customize the map by adding roads and walled cities/towns.

project polycycles

For the project, I’ve modified the code to import the map into the editor to add assets. I’ve also added additional terrain textures. Notice the dark green texture and blue rock texture.

In a follow-up post, I’ll describe my work flow.

Thanks for reading!!

Site owner. In my spare time, I'm a very indie game dev. Maybe one day I'll have a great game to share with the world. Professional, I work in IT. Who would have guessed that!!
Share Post:

Related Posts