Hexadecagon Maze Day 2

Published August 23, 2014
Advertisement

Day 2



Today I will establish a link between cells. To recap, although in Hexadecagon Maze the cell shapes are different, moving from left to right, at some point the pattern starts to repeat. Same holds for moving from bottom to top. The smallest collection of cells that repeat, I call it a "macro tile". In Hexadecagon Maze, the number happens to be 20 (figure (8)). This macro tile can be horizontally and vertically arrayed without gaps (figure (9)).
macro09.png
A cell is a triangle or a quadrilateral, so a cell has either 3 or 4 neighbors. The directions are assigned the numbers {0, 1, 2} or {0, 1, 2, 3}. For example, in figure (8), cell #12 has directions {0, 1, 2, 3}, which link to neighbors {16, 15, 8, 9} respectively. I call these movements "micro movements" because they stay within the macro tile. But some movements cross tile boundaries. For example, if we are currently inside of cell #19, then moving in the 0 direction puts us in cell #0 of the neighbor tile in the Northeast direction. Figure (9) defines the 9 possible directions we can travel between tiles. This I call "macro movements".
all_links_01.png

I hard-coded the micro and macro directions into the array that holds the coordinates of all line segments. To verify that I correctly entered them, I wrote a test program that displays all links as light blue lines (figure (10)).
Previous Entry Hexadecagon Maze
2 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement