Finding adjacent cells in an hex map – AS3 Version
I am porting this prototype into AS3. I am not doing it for the sake of porting something, but because I want to show you a complete Dice Wars prototype. I am sorry if the code is not that clean, I’ll come with a dedicated class later, but at the moment this is what I … Finding adjacent cells in an hex map – AS3 Version
Finding adjacent cells in an hex map – part 2
In the Finding adjacent cells in an hex map post I showed you how to find adjacent cells in horizontal hex maps. Now it’s time to find adjacent cells in vertical hex maps. hexagon_width = 44; hexagon_height = 38; grid_x_size = 10; grid_y_size = 12; sector_width = hexagon_width/4*3; sector_height = hexagon_height; gradient = (hexagon_width/4)/(hexagon_height/2); for … Finding adjacent cells in an hex map – part 2
Finding adjacent cells in an hex map
This tutorial continues Hex maps creation and rollover. Now I will show you how find adjacent cells. Again, at the moment it’s only code, and it only works for horizontal hex maps hexagon_width = 38; hexagon_height = 44; grid_x_size = 12; grid_y_size = 10; sector_width = hexagon_width; sector_height = hexagon_height/4*3; gradient = (hexagon_height/4)/(hexagon_width/2); for (x=0; … Finding adjacent cells in an hex map
Hex maps creation and rollover
This is just a quick, uncommented snippet of code I made starting from Coordinates in Hexagon-Based Tile Maps tutorial I found at GameDev.net. The article does not cover all hex maps, just horizontal ones. Read Understanding hexagonal tiles to know something more about hex maps. Also, the pseudo code shown in the article has some … Hex maps creation and rollover
Understanding hexagonal tiles
You should already know Tile Maps: they are often used for the level design in two-dimensional games. The most used (and simplest) tiling system has squares. Tileball is an example of a game made with this method. Even if there are a lot of games using this tiling system, it’s easy to find its limit. … Understanding hexagonal tiles