A six-sided polygon. Typically portrayed as a symmetrical shape with equal length sides and 120 degrees for each internal angle.
2
votes
1answer
57 views
How to get a cone shape of arbitrary size in an hex board
I'm implementing engine tools for my hex board game and this one is becoming messy. I want to get a list of all the positions that a cone of size N would have, given "caster" origin X,Y and origin in ...
9
votes
4answers
225 views
Generate equal regions in a hex map
Taking for example large (X by Y) hex map, how can I divide the map into N regions of connected hexes to simulate countries?
The goal is to generate a hex map that looks like a real life map with ...
1
vote
1answer
60 views
Line draw on “even-q” vertical flat topped hex grid
I'm trying to implement a Line Draw or Line of Sight algorithm for my hex boardgame. Upon reading several different solutions from most common places like the Hex Bible none of the algorithms adapted ...
24
votes
6answers
1k views
Hexagon collision detection for fast moving objects?
A object has a position and a speed vector. Usually only the position is used to check if two objects collide, this is problematic for very fast moving objects as it can happen that the object moves ...
1
vote
2answers
139 views
Converting hexagon grid coordinate system
As I have been building on a RTS game based on hexagon grid built in javascript. I stumbled across a problem regarding the coordinate system. Have been trying to implement a A-star system to find ...
16
votes
2answers
877 views
Why Hex Maps instead Octagon Maps?
I understand the advantage of Hex Maps over Square Grids. But I get a question: Why aren't used Octagons maps instead? At least (I think) will be easier cross (+) movement (up,down,left,right) and xis ...
5
votes
1answer
129 views
How to determine what hexes are in an area bounded by 3 hexes
I've been searching for hex grid algorithms for a while now, but I'm not having much luck.
I'm working on a game that will be using hex grids for the board. There seems to be sufficient resources to ...
12
votes
1answer
384 views
Get ring of tiles in hexagon grid
Thanks to this post I'm able to collect adjacent tiles to a given tile.
But I'm pretty much stuck on an algorithm that gives me only a "ring" of tiles specified by an offset. The algorithm given in ...
23
votes
6answers
1k views
Vertical vs horizontal hex grids, pros and cons
With hex grids, you can choose to arrange the tiles with the pointy sides up, so that you can move along the west-east axis, or you can arrange them with an edge up, so that you can move along the ...
9
votes
2answers
559 views
Finding shortest path on a hexagonal grid
I'm writing a turn based game that has some simulation elements. One task i'm hung up on currently is with path finding. What I want to do is, each turn, move an ai adventurer one tile closer to his ...
7
votes
3answers
643 views
Storing a Hex Grid
I've been creating a small hex grid framework for Unity3D and have come to the following dilemma. This is my coordinate system (taken from here):
It all works pretty nicely except for the fact I ...
0
votes
2answers
435 views
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 ...
0
votes
1answer
194 views
How to plot hex tiles with different length sides?
I'm trying to create a basic grid of hex tiles. I found some code...
s=h/Math.cos(30*Math.PI/180)/2;
tile._x=x*s*1.5;
tile._y=y*h+(x%2)*h/2;
That does just that, but I think it's setup for hex's ...
6
votes
3answers
684 views
Is it better to hard code data or find an algorithm?
I've been working on a boardgame that has a hex grid as this board:
Since the board will never change and the spaces on the board will always be linked to the same other spaces around it, should I ...
3
votes
1answer
439 views
Drawing an outline around an arbitrary group of hexagons
Is there an algorithm for drawing an outline around around an arbitrary group of hexagons?
The polygon outline drawn may be concave. See the images below, the green line is what I am trying to ...
1
vote
1answer
1k views
Drawing hexagonal grid on Android
I'm trying to draw a hexagon grid in my Android application. I don't want to reinvent the wheel here so I'm looking for some frameworks/libraries or just some basic ideas about how should one do this. ...
1
vote
2answers
127 views
Implementing an existing (but out of print) game electronically
One of my favorite games is the old Avalon Hill class, PanzerBlitz.
I would like to implement it electronically, and have a couple questions related to that:
Would I be in legal trouble if I do ...
2
votes
2answers
509 views
Pointy top hexagonal A* pathfinding
I'm trying to create a game with a hex based map with the points at the top. I have most of it working, however the path finding is being a little awkward. The heuristic I'm using is called euclidian ...
5
votes
1answer
1k views
Creating an isometric map with hexagonal tiles for iPad
I'm new to game development, so I need a little help.
I have to write down a little game which has a floor with hexagonal tiles but it must be seen in a isometric view like The Sims.
Ignoring the ...
6
votes
3answers
1k views
Is there a library that handles hexagon tiled 2D maps?
It would represent a map that is semi-square of arbitrary size. It would have a simple system for representation of the map coordinates such as 0101 (first column, 1st hex). I'd want the map to be ...
11
votes
6answers
3k views
How can I implement hexagonal tilemap picking in XNA?
I have a hexagon tiled map in which i need to check when a hexagon is clicked. The hexagons aren't actually touching, rather they have a slight gap in between each of them.
Does anyone know how I ...
6
votes
2answers
1k views
How do I rotate a structure of hexagonal tiles on a hexagonal grid?
My 2D isometric game uses a hexagonal grid map. In reference to the image below, how do I rotate the light blue hexagon structures by 60 degrees around the pink hexagons?
EDIT:
Main hex is (0,0). ...
21
votes
5answers
8k views
How to create a hexagon world map in PHP from a database for a browser based strategy game
I'm trying to create a hexagon world map for my PHP browser based strategy game. I've created a table in my database with the following data per row: id, type, x, y and occupied. Where type is the ...