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
1 answer

Books about hex board war game programming?

I plan to write a hex board war game. Any books/sites to recommend? Probably require: game strategy AI programming board (hex) representation turn-based game loop ... (community wiki please)
ohho
  • 50,879
  • 75
  • 256
  • 383
2
votes
1 answer

JPanel Not Displaying Components? (Hexagon Grid)

Sorry, a complete beginner to java. I have done a square grid before, for a checkers game, however I am having trouble for a hexagonal grid. I followed the same idea of with the square grid however, I have small little dots on my JPanel, although I…
Bao Thai
  • 533
  • 1
  • 6
  • 25
2
votes
2 answers

hexagon grid drawing issue

I seem to be having a bit of trouble drawing a proper hex grid: As you can see, the hexagons are just slightly misaligned, though I believe my math is correct (some of which is verfied via http://www.redblobgames.com/grids/hexagons/). My method of…
mitim
  • 3,169
  • 5
  • 21
  • 25
2
votes
1 answer

Drawing hexagonal grid using texture

I have previously done couple of experiments to find the best way to draw large-scale hexagon grids. I have tried drawing the hexes using THREE.Line , THREE.LineSegments. It was working quite well for small grids, but if I had more than 1000+…
Alexus
  • 1,887
  • 1
  • 23
  • 50
2
votes
0 answers

Hexagon grid in random shape

I am trying to create a hexagon grid in a random generated shape with max 12 hexagons a row. The original design of what I am trying to achieve: Design In this JS Fiddle you can see what I've got so far, but I can't seem to figure out how to add…
Marijn Roukens.com
  • 113
  • 1
  • 1
  • 5
2
votes
2 answers

Hexagon tiles not lining up properly, gaps inbetween

I'm trying to draw a map with hexagonal tiles. However, I'm struggling to get the tiles to line up properly, so there is no space inbetween them. One with the tiles I use normally and one zoomed in on with another tile made to make sure it's not…
Askr
  • 57
  • 7
2
votes
1 answer

How to Render a Hex Grid

I am currently working on a game that requires a hexagon grid to be rendered in order to provide a place for the game to take place. I am using offset coordinates to store the hex grid in memory. When I attempt to render the grid, I get a result…
john01dav
  • 1,842
  • 1
  • 21
  • 40
2
votes
2 answers

Tessellating hexagons over a rectangle

I have an infinite grid of hexagons, defined by a cubic (x y z) coordinate system like so: I also have a viewport -- a rectangular canvas where I will draw the hexagons. My issue is this. Because the grid of hexagons is infinite in all directions,…
user3760657
  • 397
  • 4
  • 16
2
votes
0 answers

Using a 3rd variable rather than count in hexbin

I'm afraid this is a slightly abstract question, but is there a way to use a metric other than 'count' in hexbin. My code to produce a hexbin chart would be something like: library(hexbin) hexbinplot(latitude~longitude,data=X) Given that my output…
RichS
  • 659
  • 12
  • 19
2
votes
3 answers

Any code samples open-source-engines, or open source hex tile games, references for writing Hex Tile based Games?

Using other questions on here I found Amit's Page on Games including a section on Hex Tiles which also links to a game coding wiki here. I am looking for suggestions: (a) libraries, engines or code samples in any language. I have found one in…
Warren P
  • 65,725
  • 40
  • 181
  • 316
2
votes
1 answer

Depth First Search in C

If I have to iterate through a table of hexagonal cells checking for text inside them by conducting a recursive depth first search, arranged as shown: [Typing it out on StackOverflow apparently doesn't keep the formatting.] Example 1: Example…
2
votes
2 answers

Creating a tiled hex game with Swift

I'm new to Swift / Objective-C but have been coding Mac and Windows apps / games for years using Xojo (similar to Visual Basic). I want to make a simple turn-based strategy game with a tiled hex map and I want to do it in Swift for Mac OS X. What…
Garry Pettet
  • 8,096
  • 22
  • 65
  • 103
2
votes
5 answers

Recursively created linked lists with a class, C++

I'm using C++ to recursively make a hexagonal grid (using a multiply linked list style). I've got it set up to create neighboring tiles easily, but because I'm doing it recursively, I can only really create all 6 neighbors for a given tile.…
Jon Brant
  • 21
  • 2
2
votes
1 answer

Hexagonal grid representing a cellular network as used in mobile communication systems

I am relatively new to Matlab and I want to generate a hexagonal grid that represents a cellular network where each hexagon has a specific behaviour. My question is how does one go from a square grid to hex grid (transfer matrix)?. This is what I…
2
votes
0 answers

Is there a faster way to determine hexes within line-of-sight?

So, I have a 2d hex grid, where each hex is either a wall or a path, and I'd like to implement line-of-sight (in the sense of "a hex is visible from another hex if you can draw a straight line from any part of the start hex to any part of the end…
TLW
  • 1,373
  • 9
  • 22