Notifications
Hex Map Tutorials
Showcase
1.8 K
26
Written C# tutorial series about hexagon maps.

Jasper Flick
Independent Developer & Writer - Owner
6
Comments
Bruno Fargnoli
a year ago
Programmer / Manager - Owner
Hi Jasper. I'm trying to connect the left side of the world with the right side. I created just a method to link the neighbors, but I don't figure how to triangulate correctly the vertices. So at the end of your CreateMap method, I'm calling this method: private void WeldWorldLeftRightBorders() { int index = 0; HexCell cell = null; HexCell opposite = null; for (int z = 0; z < cellCountZ; z++) { cell = cells[index]; opposite = cells[(index + cellCountX) - 1]; cell.SetNeighbor(HexDirection.W, opposite); if(z % 2 == 0) { if (z > 0) { opposite = cells[index - 1]; cell.SetNeighbor(HexDirection.SW, opposite); } if (z < cellCountZ - 1) { opposite = cells[(index + (cellCountX * 2)) - 1]; cell.SetNeighbor(HexDirection.NW, opposite); } } index += cellCountX; } } Any idea how to make the triangulation to work ? Best Regards Bruno
0
Bruno Fargnoli
a year ago
Programmer / Manager - Owner
Hi Jasper.
0
FreeGameDev
a year ago
Game Developer - Programmer
Excellent Work
0
Jasper Flick
a year ago
Independent Developer & Writer - Owner
@Alex Nabokov Good to hear you enjoy them! More are to come.
0