【游戏制作知识杂烩】

关于战旗游戏中的六边形网格

Posted by LudoArt on August 12, 2020

【游戏制作知识杂烩】关于战旗游戏中的六边形网格

六边形网格有多种不同的存储形式,各有特点,对比结果见下表:

  Offset Doubled Axial Cube
Pointy rotation evenr, oddr doublewidth axial cube
Flat rotation evenq, oddq doubleheight axial cube
Other rotations no no yes yes
Vector operations (add, subtract, scale) no yes yes yes
Array storage rectangular no rhombus no
Hash storage any shape any shape    
Hexagonal symmetry no no no yes
Easy algorithms few some most all

参考文献: https://www.redblobgames.com/grids/hexagons/