For Hallowed Ground

For Hallowed Ground is a turn based digital board game where you play as one of three teams to try to capture the sacred lands. The board is made up of hex tiles where the player can move to and engage in exciting combat casting unique spells with faith. Faith is gathered at temples scattered around the map.

Turn Rules

The player must move all their pieces using at most two (2) of three (3) movement abilities, but not less than one (1) movement abilities. These abilities are:

  1. Move
  2. Attack
  3. Rotate

Some basic turns would be something like:

  1. Move to a purple tile with first piece and attack.
  2. Attack to a red tile with second piece and rotate.
  3. Move to a blue tile with third piece and rotate.
  4. Move to a blue tile with fourth piece and end turn.

Spells are powerful abilities acquired from the Gods. These are the real game changers because they can be used at any time during your turn. However, you must be in a certain formation (a particular way your pieces are placed on the board) to cast the spell.

Player Input

The player can either click on the tile they want to select or they can tab through their units. These are separated into 2 different functions.

If the mouse is clicked, the code forms a raycast at the mouse position.
It then passes the hexTr into SelectTile, which selects a tile based on the selection method.

Artificial Intelligence

The AI in this game is developed by Josh Mahler (that’s me!). It uses a Utility based AI to tell the player’s opponents how to take their turns.

UtilityAction is the base class for everything scorers.

I used a Weighted Random algorithm for this. This uses “weights” or numbers given to the computer based on the board position it’s in and where opponents are facing. The function is a bit long so I will split it up into multiple pictures.

Weighted Random Figure 1.1
Weighted Random Figure 1.2

The position it’s in is based on the health it’s currently and if it can reach a nearby shrine and/or biome tile. I created a heatmap for the possible tiles everyone can move and attack to. This is the second part of the setup for the algorithm. This tells the AI where it is best suited to move to. This causes the player’s opponents to sometimes flank the player and move behind where the player’s pieces are currently facing.

Orientation/Rotating Pieces

If you rotate a piece, it shows the new tiles the piece can move to. This is the function that gets called as the middleman for that process. It may not seem like much, but it is the most helpful function I created for this project.

Tools for Designers

I created some tools early in production for this game. These are the map maker, moveset maker, and formation maker. All these tools are easy to use and let the designers go wild with creative ideas. These tools helped in the later production of the game, particularly when we had to create a tutorial.

Moveset Maker

This image is showing off one possible use of the moveset maker tool. The designers would come up with where the piece can attack (red) and move (blue) on paper. This would get translated to the middle image (blue -> blue, red -> red, overlap -> purple). This can all be finished in 5-10 minutes using this tool.

User Interface

The UI/UX in this game is the game. The scrollable field and formations are the obvious UI choices in the game because they stand out. However, all the hex tile color changes are done in a complex way. I could not have done this project without one resource, This was a savior during all stages of production and definitely deserves some praise. I used the axial coordinate system as the main way to reference hexes. In the map maker tool, they are instantiated in an odd-row horizontal layout, then translated to an axial coordinate to get the name of the tile. Only when the user wants to rotate a piece is it ever referencing something other than axial coordinates. I take the axial coordinate of the tile and rotate it using cube coordinates. Then I get translate the cube coordinate back to axial coordinate to get the tile.


The camera can rotate and zoom as well. Holding Alt allows you to rotate the camera as you see fit. Holding middle mouse button (scroll wheel) allows you to translate the camera. Scrolling with middle mouse button allows you to zoom in and out with the camera.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s