Skip to main content

Questions tagged [hexagonal-grid]

A regular tesselation of a surface where regular hexagons are used for grid tiling.

Filter by
Sorted by
Tagged with
0 votes
3 answers
573 views

I have a hexagon sprite MainTex over which I want to render an outline texture SecondaryTex independent of the alpha value of the MainTex. Since I have a fairly large grid with many hexagons, two ...
Jachuc's user avatar
  • 45
0 votes
1 answer
131 views

I have a hexagon grid with cubic coordinates. I want to calculate clockwise all border hexagons for a given movement range. At the moment, I am iterating every neighbor that is not in the range and is ...
Jachuc's user avatar
  • 45
4 votes
1 answer
595 views

I have a hex grid of 10000 cells (100x100). The player can grab a cell next to one of his cells (borders). If the player has formed a ring after placing a cell, I want to get a list of cells that ...
ArtemiZ Studio's user avatar
1 vote
0 answers
148 views

I am trying to create a game similar to a board game on a hexagonal grid (also similar to Civilization game). I want the tiles to be able to display various textures and of course be able to detect ...
I_Keep_Trying's user avatar
0 votes
1 answer
994 views

Here are, it seems, two ways to draw a smaller grid of tiles from an initial hexagon: On the left, we halve the side length \$s\$ and create most of the new tiles centered at the midpoint of sides. ...
clwhisk's user avatar
  • 101
0 votes
1 answer
1k views

I'm prototyping a base-building game that uses a hex grid as the basic structure. Hex grids have benefits, but when humans want to build buildings or divide up space, they usually use square/...
JRandomHacker's user avatar
0 votes
2 answers
437 views

I am trying to make a hex grid based word game. Currently the words are placed from a list of pre-defined words(a list of animals in this case). All colored cells make a word that was placed, while ...
Daniyal Ibrahim's user avatar
0 votes
1 answer
432 views

I cant seem to get breadth first search right. Ive gone through redblobs implementation guides of hex grids and have that all figured out but pathfinding is proving to be difficult. So I have a search ...
cwahlfeldt's user avatar
2 votes
2 answers
602 views

I have generated a grid with hex tiles. I am using two different types of tiles and would like to at some points ask the tiles, how many tiles of each type they have as neighbours (or really, it would ...
Maree's user avatar
  • 21
0 votes
1 answer
453 views

Problem In my puzzle game, the player moves one step at a time on a hexagonal grid. (Not an action game.) The sequence of steps is important for the gameplay, so it is not only about getting from A ...
Close Call's user avatar
2 votes
1 answer
701 views

I need a little help with a formula to calculate the attack range for my turn-based strat game. Since it's a hexagon grid, I'm having trouble coming up with a formula that would pick the character ...
ガビ ユカチノ's user avatar
4 votes
3 answers
445 views

I find in general map creation that I prefer hex grids for natural environments, but square grids for interior and urban/constructed environments. Is there a smooth or elegant way to transition ...
Weckar E.'s user avatar
  • 842
0 votes
2 answers
258 views

I'm working on recreating the board game "Hex" as a mobile game. I'm working on implementing zoom and pan features using two fingers. I feel like I managed to get the zoom to work, but the ...
Cooper Rutan's user avatar
6 votes
3 answers
4k views

I am trying to sort the edge tiles of a region in my hexagon map. Once it is properly sorted, I can then try to walk through them and attempt at creating a Civ style border map, but I can't seem to ...
TyCobb's user avatar
  • 339
7 votes
1 answer
1k views

I'm attempting to create a tillable hex shaped terrain map using c++. As part of the process I'd like to use perlin noise, but it seems that in order to make it tillable I'll need to generate it 5 ...
Knackname's user avatar
  • 103
1 vote
1 answer
315 views

I'm creating a wrap around hexagonal map that will potentially render infinatly. With the method I'm using, I have an x-y coordinate I use to find it's equivalent axial coordinate with the equations: ...
Knackname's user avatar
  • 103
1 vote
1 answer
823 views

I made my own Hex Point Top Tile sprite sheet, ensuring it's pixel perfect and align well. Slicing in Sprite Editor has no problem too. However, when I drag the sprite sheet to a new Palette in the ...
Raptor's user avatar
  • 141
3 votes
4 answers
974 views

I have been using @amitp's excellent guide (and javascript library) to create a hexagonal grid system https://www.redblobgames.com/grids/hexagons/. I'm using flat-top, inverse-y cubic/axial system. ...
George of all trades's user avatar
0 votes
2 answers
479 views

I have a staggered hexagonal map created with "tiled" map editor and I want to calculate the height of this map in pixels, the example map below should be ...
Jose Lopez's user avatar
13 votes
6 answers
5k views

I have a grid of tiles of a known finite size that forms a map. Some of the tiles inside the map are put into a set known as a territory. This territory is connected, but nothing is known about its ...
ScienceSnake's user avatar
4 votes
1 answer
770 views

I have a hex grid stored in a 2d array; now I want to add some properties to the edges of the grid (e.g. rivers between hexes) and also potentially to the vertices. How can I store edges and vertices ...
Sergey's user avatar
  • 141
0 votes
1 answer
163 views

I’m trying to generate a 7*13 hexmap, with 9 different types of tiles, numbered 0 through 8. I need the map to be randomly generated on each run and it has to be so that each tile has a different ...
The Forgotten Machine's user avatar
1 vote
1 answer
605 views

I am trying to make a much simpler version of the graphic effects we see in the game Civilization 6. This question applies to the graphics on land and ocean tiles. But I first noticed this effect on ...
Big T Larrity's user avatar
1 vote
2 answers
832 views

I'm trying to find an elegant solution to calculating the x, y values of hexes that are crossed or intersected by a line or ray at a given angle from a given hex position on a hex grid. I do not want ...
jpwrunyan's user avatar
  • 111
1 vote
1 answer
227 views

So as the headline suggests, I am looking for an algorithm/algorithms used for square-to-hex and hex-to-square pixel coordinates convertion. I have an image which looks kinda "interpolated", meaning ...
Mr Jox's user avatar
  • 15
1 vote
1 answer
2k views

I have a hex grid and a game object, let's say it's the player. What I want to do is know on which cell the player is on based on his world position, this would be easy on a simple grid but on a hex ...
Saad Moutalib's user avatar
2 votes
1 answer
2k views

I got a turret that points at the corner of hexagon (point A). It can shoot in cover arc that's shown here: I need to check if my target lies within this cover arc. From this tutorial: Hexagonal ...
Vitozz_RDX's user avatar
1 vote
1 answer
426 views

How to performantly display a hex/pent grid on a subdivided icosahedron? I have a subdivided icosahedron planet used as the "board" for a strategy game. It usually has anywhere between a few thousand ...
Jax's user avatar
  • 474
0 votes
1 answer
131 views

I have this method to get the cells inside a given N range: ...
Enrique Benitez's user avatar
0 votes
1 answer
374 views

I'm looking for a way to get the cells based on a N range. But no luck. I'm converting Row Column offset to Cube Coordinate system QR -> XYZ ...
Enrique Benitez's user avatar
3 votes
1 answer
234 views

Just made it with some more investigation thanks to this site: Hexagonal grid math, but the hexagons have a little bit spacing horizontally. Here is the code: ...
Enrique Benitez's user avatar
4 votes
0 answers
331 views

Generalized Balanced Ternary is a fairly obscure but very elegant method of indexing a hex grid, using only a single integer coordinate. Operations like addition and multiplication on these ...
Draconis's user avatar
  • 161
3 votes
1 answer
817 views

I have a game engine which handles hexagon based war games and things like LOS, etc, for both flat and tip up hexes. A particular game I'm implementing at the moment, Band of Brothers, has facing for ...
Brian Sturk's user avatar
2 votes
0 answers
180 views

I'm working on the map editor of a game, where you can create a grid of hexagons to paint. An example of a grid of radius 6: What I want Once map creation is done, I would like to generate a mesh for ...
Luke B.'s user avatar
  • 1,031
4 votes
3 answers
6k views

I'm trying to create a wraparound map for a hexagonal map, so when you exit a tile on one side of the big hexagon-shaped map, you enter a tile on the other side. Example image from Red Blob Games ...
InsOp's user avatar
  • 153
2 votes
2 answers
2k views

So I am trying to draw hexagons with [SDL_RenderDrawLines][]. It looks to be working fairly well, however, it fails to draw some of the lines. So each of the ...
chewpoclypse's user avatar
1 vote
0 answers
394 views

I've been trying to workout the code that calculates the correct row and column in the mouse is over event the following is the code I'm using to draw the grid Tile are 64x64. ...
Jason Howells's user avatar
3 votes
1 answer
2k views

I am trying to implement field of view (FOV) in a hex grid. I am using the cube coordinate system from here. Then, I am using shadow casting to find FOV as from here. I have a system like in the ...
Joshua's user avatar
  • 175
3 votes
0 answers
293 views

I have a weird problem with my hexmap drawing code. My code uses "squished" hexagons to achieve a pseudo-isometric view. Because of that, the order of drawing them on screen matters a lot. ...
Daniel Tyomin's user avatar
2 votes
2 answers
239 views

I'm setting up a hex grid. The column/row system I use puts 0, 0 as the top left corner, and increasing columns (x) moves to the right but also vertically upwards. So columns run straight up and down, ...
DrZ214's user avatar
  • 348
1 vote
1 answer
1k views

I've been developing a game where a number of tiles can drag into a hexagonal grid background. For some purpose I need to find the location of same tiles into an array and merge them. Data Layer: ...
moin khan's user avatar
7 votes
2 answers
5k views

I've recently ported the hexasphere implementation by Rob Scanlon at https://github.com/arscan/hexasphere.js to objective-c for use in a project I'm exploring. As a port, it works very well, and I ...
PKCLsoft's user avatar
  • 225
3 votes
2 answers
918 views

The following messy code implements a decent hex map, but I have no way to detect edges and corners: ...
user85780's user avatar
6 votes
2 answers
1k views

I have been working on a tile map editor and plan to support two orientations for hexagons. I have seen various terms used, but these all seem ambiguous to me. Horizontal, Vertical (ambiguous: does ...
Don Jewett's user avatar
3 votes
3 answers
602 views

I have a hexagonal grid with variable radius. My entity can move exactly two hexes per turn. How should I calculate next step towards border and afterwards travelling clockwise around map? Preferred ...
warbaque's user avatar
  • 153
9 votes
2 answers
2k views

First up - I know I'm being super-dense here. With that out of the way, I'm trying to write a C# implementation of this algorithm: ...
aaron-bond's user avatar
3 votes
1 answer
145 views

I'm building a prototype turn-based game and I'm considering the best approach for user interaction with the game board. It's a hexagonal grid, where the user can select units and move to other cells ...
aaron-bond's user avatar
3 votes
1 answer
510 views

I am working on a personal project of developing a simple 3D strategy game. I am working on my own game engine (let's assume that I have to have my own) and I have one theoretical question. How to ...
T. Apeltauer's user avatar
1 vote
0 answers
173 views

So I made a hexagonal tilemap of ocean tiles and then picked a few tiles to be land. When I pick all adjacent tiles to the hexagon it usually works, but for tiles that are on certain columns it does ...
TheMagicShroom's user avatar
2 votes
0 answers
635 views

I am developing a browser game based on a hex map. I am storing my data based on axial coordinates system. I developed a function which shows me axial coordinates of hexes within ...
Abdel5's user avatar
  • 173