After being inspired by a video on GliĆski’s hexagonal chess and having been caught up in the resurgence of chess I decided that I would try to recreate hexagonal chess on PC.
This project challenged my coding abilities. Especially my ability to write clean and coherent code, so that it is easily readable when I needed to implement more of the complex logical nuances that the game holds.
Hexagonal Grids
The main issue I faced was how best to represent the grid for the game as I had never utilised a hexagonally tiled grid before. I prototyped a few different methods for storing the grid positions, until I found a system which had the most promise for the upcoming challenge of calculating legal moves. I represented each hex as a Vector2, with the first value being a movement of diagonal-up-left, and the second diagonal-up-right. This starts from an initial position of (0, 0) where the white, light squared bishop is, ending at (10, 10) where the dark, dark squared bishop is. So white queen would be (1, 0) and king (0, 1).
I developed this project using Unity and implemented it in C#. As I continue to develop the project, I’m exploring the possibility of making it networked and playable online, which may lead me to switch to a more suitable programming language such as JavaScript.