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
2
votes
2 answers

Drawing Hexagon grid in Cocos 2d-x

So I'm about to create an Hexagon grid game in Cocos2D-X. I need it to be responsive to touches and I'm going to trigger some animations and actions when the user touches an hexagon. I was wondering which is the better approach to achieve…
6rod9
  • 1,407
  • 12
  • 29
2
votes
1 answer

XNA Waterphysics Top-Down Hex-based grid

I'm working on a project using C#/XNA and I'm having trouble creating water-physics in an top-down hex-based grid. We're using an hex-tilemap with help of: http://www.redblobgames.com/grids/hexagons. So I thought I could implement an algoritm for…
2
votes
2 answers

Nested For Loops - generating a catan-style hex-grid in Unity

As the title suggests, I am trying to generate a procedural hex grid in Unity using C#. void Start () { //5 mid startRowSize = 5; for (int i = 0; i < startRowSize; i++) { GameObject newHex = (GameObject)Instantiate(hex); …
GreenWire
  • 193
  • 4
  • 15
2
votes
2 answers

Selection of neighbors cells in a hexagonal field

Imagine hexagonal space with 3 dimensions. Each tile has coordinates XYZ. I need to select a given cell neighbors in the same plane. With SQL it's looks like: $tbDir = $y % 2 == 0 ? -1 : 1; $result = db_query('SELECT x,y,z FROM {cells} WHERE …
Coyod
  • 2,656
  • 2
  • 18
  • 13
2
votes
1 answer

LibGDX implement scrollable HexMap

I'm currently trying to implement a scrollable hexmap with LibGDX. The framework has some nice map apis but they seem to be pretty useless for what I want to do :( An example of the map view that I would want. The pink rectangle represents the…
AreusAstarte
  • 1,958
  • 2
  • 17
  • 29
2
votes
3 answers

Find Adjacent Hexagon Tiles on Map Using X & Y Coordinates

I've been searching hard to solve this one -- so I really must ask for help. I've created a CSS based game map that overlays DIV's in the shape of Hexagon Tiles (like table top games). I'm trying to find which tiles are adjacent to the current…
Jeff Solomon
  • 459
  • 6
  • 21
2
votes
1 answer

Truncated Icosahedron Tile Objects

I'm trying to make a truncated icosahedron, though with more subdivision (so more hexagons) In the game I use it, eacht pentagon and hexagon is a separate object. So after generating the icosahedron, I just use the generated points to place either…
The Oddler
  • 6,314
  • 7
  • 51
  • 94
1
vote
2 answers

recognizing and dealing with 2 valid paths when walking a hex map

I am writing a cost path script for use on hexagonal maps. Currently I am in the "learning how to walk" phase of development. In general terms the code works. I can reliably get from A to B. However, consider the following map: Both the sequence…
Drew
  • 6,208
  • 10
  • 45
  • 68
1
vote
1 answer

Maximising Collidable area for a hexagonal "Button" in pygame

I am programming a strategy game that takes place on an Hexagonal grid (yes, a civ clone) and want to implement a system, which allows me to display some properties of the tile by hovering over it with my mouse. My current implementation is to…
Isch
  • 13
  • 3
1
vote
0 answers

Why only 1 object is drawing using pygame?

So my goal is to be able to draw hexagons in a radial way, meaning first is center then 6 more on each side starting from top moving clockwise. Then drawing next layer and so own. Each Hexagon has a coordinate, a colour and other parameters. Then I…
1
vote
1 answer

How to fix overlapping hexagons with geom_hex() and ggplot()?

I am plotting some data, basically I have coordinates and a value for each point. I wanted to make a hexagon map, with each hexagon averaging all the point values that correspond to that hexagon. I manage to produce the map, but the some of the…
starski
  • 141
  • 6
1
vote
2 answers

How to get hexbin center coordinates?

library(hexbin) x <- rnorm(mean=1.5, 5000) y <- rnorm(mean=1.6, 5000) bin<-hexbin(x, y) plot(bin@xcm, bin@ycm, pch=20) I want to get the center coordinate of each hex in a hexbin plot. But xcm and ycm are not the centers of the hexagons as shown in…
user1424739
  • 11,937
  • 17
  • 63
  • 152
1
vote
0 answers

Get corresponding hex bin centers for each point of a hexbin in python

I am looking for a way to find the corresponding bin center for every point in my hexbin plot. For example, here is my plot: hex = plt.hexbin( df['loc_x'], df['loc_y'], extent=(-250, 250, 422.5, -47.5), cmap=plt.cm.Blues,…
bismo
  • 1,257
  • 1
  • 16
  • 36
1
vote
0 answers

Converting graphml to image

I have this script that creates a .graphml file, and it looks great in yEd (Link to software), but I'm trying to automate the extra step of having this file, opening it in a different program, doing some edits in there etc etc. I was wondering if…
GSerum_
  • 57
  • 8
1
vote
1 answer

Need an algorithm to randomly generate groups on a hexagon grid

I created a hexagon grid based on information in this article https://www.redblobgames.com/grids/hexagons/ Here's how it looks so far: I want to divide this grid into groups similar to this: I want to have gaps in the grid but I also need all…