Questions tagged [hexagonal-tiles]

Tessellating tiles for use as 2d-histogram bins, game boards, etc.

Hexagonal tiles are tessellating hexagons placed adjacently to each other.

The use of this tag is fairly broad, encompassing statistics, computer science and game design.

234 questions
1
vote
2 answers

Generating Settlers of Catan Numbers?

I am trying to generate a Settlers of Catan game board and am stuck trying to create an efficient implementation of hex numbers. The goal is to randomly generate a set of numbers from 2-12 (with only one instance of 2 and 12, and two instances of…
tsurantino
  • 1,027
  • 13
  • 27
1
vote
2 answers

Generate HoneyComb hexagonal patern in Axial coordinates

I was searching for am algorithm to generate a HoneyComb of hexagons like this one using axial coordinates : But I only managed to find generators in Cube coordinates. I made this question only to share my solution .
nemo9955
  • 126
  • 1
  • 8
1
vote
3 answers

Hexagonal Grid (Flat Top) Distance Calculation

I have been working on creating a hexagonal (flat top) grid for a simulation I am working on. I have attempted to work out the distance between the hexagons, from a specified target hexagon. The solution I have works for most of the time, apart from…
Tomousee
  • 23
  • 1
  • 5
1
vote
2 answers

Calculation of Hex grid

What i would like to do is create a hex grid like below. I can draw the hex but unsure how to get them to stagger. So first row should be (0,0) (0,1) (0,2) (0,3) in the image and the second row should be (1,0) (1,1) (1,2) (1,3) ect Where the even…
Glen Morse
  • 2,437
  • 8
  • 51
  • 102
1
vote
1 answer

How to turn a hex grid into a squished hex grid?

I have these functions for a hex grid. They work great for a regular hex grid. What would these functions be for a squished hex grid. By squished hex grid I mean a grid where each hex is wider than it is tall. coordinates_to_pixel = function(x,…
Dan
  • 592
  • 1
  • 8
  • 20
1
vote
1 answer

Automatically generate an Hexagonal grid in Java

public void paintComponent(Graphics g) { super.paintComponent(g); for (int n = 0; n < 13; n++) { double hexCentX = x/2+(3*u*n*Math.cos(Math.PI/3)); double hexCentY = y/2+(u*n*Math.sin(Math.PI/3)); Polygon sn…
Panda
  • 11
  • 2
1
vote
2 answers

Randomly Generating Patterns Using Hexagonal Images

Okay so I have these images: Basically what I'm trying to do is to create a "mosaic" of about 5 to 12 hexagons, with most of them roughly centralised, and where all of the lines meet up. For example: I'm aware that I could probably just…
Ben Ezard
  • 463
  • 6
  • 18
1
vote
1 answer

Convert wave files to hex files for programming flash memory chip

I need to convert some PCM wave files to HEX files so I can program my memory chip. What is the proper way of doing it? I couldn't find a utility that simply does the conversion. I know some software like hexedit can edit the files in hex format,…
CuriousMind
  • 15,168
  • 20
  • 82
  • 120
1
vote
1 answer

Collision detection on a 2D hexagonal grid

I'm making a casual grid-based 2D iPhone game using Cocos2D. The grid is a "staggered" hex-like grid consisting of uniformly sized and spaced discs. It looks something like this. I've stored the grid in a 2D array. Also I have a concept of…
SundayMonday
  • 19,147
  • 29
  • 100
  • 154
1
vote
2 answers

Optimising movement on hex grid

I am making a turn based hex-grid game. The player selects units and moves them across the hex grid. Each tile in the grid is of a particular terrain type (eg desert, hills, mountains, etc) and each unit type has different abilities when it comes to…
Mloren
  • 85
  • 1
  • 6
1
vote
1 answer

hex grid A* pathfinding... type argument error

I'm a budding programming enthusiast and game designer studying to finish my degree, and thus am still quite new in the world of programming. I've done a fair amount of JavaScript (actually UnityScript) and now am trying to dabble in C#. I have been…
0
votes
0 answers

Ursina: mesh with line mode disconnected

I want to draw hexagon without filling, however it seems that setting thickness to more than one produces breaks between the lines. Does anyone know how to fix this? Code: from ursina import * OUTER_RADIUS = 1 INNER_RADIUS = OUTER_RADIUS *…
0
votes
0 answers

How can I print a diagonal line of buttons (top-left -> bottom-right) upon loading page, each button rendering after the last?

In my project I am focused right now on the frontend implementation of a series of buttons. Once loading the page, buttons will render on the screen, one after the other, starting from the top-left of the screen. Right now, I'm trying to get each…
0
votes
0 answers

Finding the optimal tiling based on soft edge-matching

I have 26 hexagonal tiles. Each tile has 6 different edges. I have an unbounded hexagonal grid into which I can place these tiles, with tile rotation allowed. When a tile is placed next to another tile, there's a score given based on how well the…
yaron
  • 1
0
votes
0 answers

Constructing a hexagonal heat-map with custom colors in each cell in google map(android)

How to construct a hexogonal shape heat map in google map. Normally heat map in google map in constructed by following code val heatMapProvider = HeatmapTileProvider.Builder() .weightedData(heatMapList) …