Thursday, August 23, 2018

Putting units or actions in the outer loop ...

Many of the discussions regarding rules design in miniature wargaming involve the turn sequence, and how to structure it in order to achieve some desired effects. Over the years, there have been many different variants of the turn sequence, illustrating various schools of thoughts on how to organize the game. Often, discussions are framed as IGO-UGO vs unit-activation, but the spectrum is more varied than that. See also my earlier post on discussing various ways of looking at the turn sequence.

In this post, I will offer a slightly different way of looking at the turn sequence, and how it can affect rules design.

Action-based turn sequences

In an action-based turn sequence, the turn is defined as a (strict) sequence of actions, and within each action, every units can do exactly that action. This is best illustrated with the classic move-shoot-melee-morale sequence. First, we have the movement phase, in which all units get to move. Then we have the shooting phase, in which all units can shoot. The same goes for the melee phase and the morale phase.

In computer programming terminology, one can see such a turn sequence as 2 nested loops . An outer loop loops over all actions, and an inner loop, for each action, loops over all units doing that action:
  • for each action X (in fixed order move, shoot, melee, morale):
    • for each eligible unit Y (order usually chosen by player):
      • unit Y does action X
Such a turn sequence has a number of advantages - there is a fixed order for all actions, and this implies one can be sure that all movement has happened before shooting and melee, morale checks are performed after all combat etc. This can lead to a design in which those various phases of the turn are strongly coupled. However, it also often leads to rules in which all turn phases use separate mechanisms which have not much in common from a procedural point-of-view. The mechanisms for shooting and melee can be very different, and morale usually is a separate subsystem.

An important and crucial disadvantage is that actions which are not explicitly listed in the turn sequence cannot be added to the games engine in an elegant manner. Such actions are often defined in terms of an existing action. E.g. setting a building on fire might take half a move; or instead of fighting a unit might build (part of) a bridge. An alternative solution is to add such additional actions explicitly to the turn sequence. E.g. one can imagine having a separate "engineering phase", or "spell casting phase". The drawback is that such specialized actions become very visible in the outer loop, while relatively few units might be eligible to act on them. These actions might also be rarely used during the entire game, depending on the specific scenario. In a fantasy ruleset we used during the late 90s, there was a phase in the turn sequence called "Morph Friendly Cyclics". It always gave rise to the same joke in each and every game. "Hold on guys, we forgot the Morph Friendly Cyclics phase! Friendly cyclics anywhere? No friendly cyclics? Are you sure? Ok, now we can move on ... "

Unit-based turn sequences

In computer programming, 2 nested loops can often be interchanged. We can also do this in the turn sequence. Instead of defining the turn as a loop over all actions, we define it as a loop over all units:
  • for each unit Y (order usually chosen by player, and/or driven by an activation mechanism):
    • for each eligible action X (chosen from a list of possible actions):
      • unit Y does action X
Such turn sequences are often called unit-based activation, since the units might be activated by die rolls, cards in hand etc. There might even be a terminating condition (e.g. a failed die roll), indicating the end of the turn. When a unit is activated, there usually is a choice of what actions, or a combination of actions (perhaps expending a budget of 'action points'), can be executed with that unit.

The main disadvantage of such a sequence is that it is difficult to maintain coherency between units. E.g. if one would like to maintain a battle line, and one cannot be sure that all units can move forward during this turn (e.g. if there is a possibility not all units might get activated), this can really frustrate player or result in ahistorical behaviour of the troops on the gaming table. Often, a mechanism for activating a group of units is necessary as part of the activation procedure.

On the other hand, there is a big advantage when one wants to add additional types of actions. Since actions do not drive the turn sequence at the top-level, adding actions does not change the turn structure. Rather, actions are an add-on to an already existing structure, which makes it easier to maintain coherent procedures and game mechanisms.

This does not prevent from actions having their own disparate procedures, but it does create a structure in which a coherent mechanism for resolving actions is more viable. One of the best examples is the Basic Roleplaying System by Chaosium. It exists in many different variations (the Call of Cthulhu rulesystem probably is the best-known). Looping over the characters is the outer loop (as in most roleplaying games), and each action - whether it is searching in a library or swimming across a pond - is resolved by checking a D100 vs a target number. That results in a very elegant and tight design, and adding new types of actions is rather straightforward.

The same structure can be used in miniature wargaming. Whether you want to add engineering actions, special movement or shooting actions, or actions invented for a specific scenario only, they can be fitted much easier in the overall game structure as opposed to an action-based turn sequence.

Tuesday, August 07, 2018

Triangular Grids

I am a fan of using grids for miniature wargaming. My wargaming table has a permanent Hexon terrain system laid out, but I've also played games on a rectangular grid, most notably my Flagstone Fleets game. See also the Table of Contents for previous discussions about grids.

In this blogpost, I would like to discuss the triangular grid. I think it's a grid that has not been fully explored in wargaming (hexagonal grids and square grids are getting much more attention), but it is worthwhile to look at some of its advantages and disadvantages.

Relation between the triangular and hexagonal grid

There is a strong relation between the classic hexagonal tiling, and a triangular tiling.


Mathematically, they are each other's dual tiling. This means that if you take the centre points of each hexagon, and you connect these centre points together, you get the triangular tiling. This also works in the other direction: if you take the centre points of each triangle, and connecting them together, you get the hexagonal tiling.

This duality results in a nice property: when playing a game on a triangular grid: placing the pieces on the corner points and moving them along edges, is equivalent to playing that game on a hexagonal grid by placing the pieces inside the hexagons and moving them across edges. And vice versa, playing a game on the corners and along edges of a hexagonal grid, is equivalent to putting the pieces in the triangles and moving them across edge boundaries.

There is however a major issue with the triangular grid, which is the asymmetry of connections between the triangles. Unlike a hexagon grid, triangle can connect edge-to-edge, but also point-to-point in various configurations. THis is also the case in a square grid, but in a triangular grid there are different ways in which triangles can connect point-to-point. This lack of symmetry is the most likely reason why triangular tiles have not been really considered for wargaming.

Has the triangular grid been used before?

When trying to look up whether (board) wargames make use of a triangular grid, surprisingly few results turn up. Most of the games that use a triangular grid, use the dual property, effectively using a hexagonal grid. The triangular grid is then merely an esthetic element in the design of the game. See e.g. games that employ the "Triangle System", See also this page at Forsage Games.

Most games that use the triangles themselves as areas usually are abstract boardgames. Some examples are: Blokus Trigon or Go played on a triangular grid.

Counting distances

Let us assume we do want to design a miniature wargame using a triangular grid. One of the things we need is a counting procedure for counting distances from one grid cell to another cell, and preferably, we would like that counting procedure to approximate the Euclidean distance between the centre points of both grid cells.

Using some simple goniometry, and setting the distance between the (barycentric) centre points between 2 adjoining triangles to 1, we arrive at the following relations:


Taking the red dot as starting point, we see that we can get to edge-to-edge triangles (yellow dots) using distance 1. The triangle directly opposite (blue dot) requires distance 2. Both triangles that touch the starting triangle, but are not directly opposite (yellow dots), are at a distance equal to the square root of 3, or 1.73.

Rounding up 1.73 to 2, we get the following, rather simple, counting procedure for measuring distances:
  • When moving from edge-to-edge, count 1;
  • When moving from point-to-point (any configuration), count 2.
This looks like a nice and relatively simple procedure for counting distances. Another way to look at this, is to construct a hexagonal grid on top of the triangular grid, by inscribing each triangle with a hexagon, and putting additional hexagons at the corner points (note that this is a different hexagonal grid as opposed to the dual grid as described above):

(Image from "20 Fun Grid Facts (Hexgrids)")
The yellow and blue triangles (or the yellow and blue hexagons) form our triangular grid. When moving from a yellow to an adjacent blue hexagon (i.e. moving on the triangular grid from a yellow to a blue triangle), you can do that directly, at a cost of 1 movement point. But when you move to a hexagon whose corresponding triangle is touching at a corner, you have to pass through a green corner hexagon, resulting in 2 movement points if you would count along the hexagonal grid. So, our distance rules derived above can also be considered as moving on the underlying hexagonal grid - albeit by disregarding the green hexagons as shown in the diagram above.
(You might wonder how this is possible, given that we have rounded one distance 1.73 to 2 ... but there are also 2 modes of moving on a hexagonal grid: straight ahead from hexagon to hexagon, or in a "zig-zag" pattern, which correspond to our differently connected triangles ... these two movement paths are not exactly equal, although we often consider them as such on the hexagonal grid.)

Ok, let's put it all together. How far can we move on a triangular grid given various amounts of movement points? The diagram below illustrate the movement ranges, using 1 movement point to move across an edge, 2 movement points to move across a corner.

The blue, green and orange triangles indicate the range using 3, 5 and 7 movement points. The dotted black arcs have radius equal to 3, 5 and 7. The dotted red arcs are scaled with a cosine(30 degrees) factor. This allows comparing the "zig-zag" movement when one would move along the horizontal row of adjacent triangles.

Facing, Battlelines and firing arcs

When located in a triangle, a unit can be oriented in 12 different directions: 3 sides, 3 corners, but there also 6 other directions that line up with rows of triangles (see diagram below). This is not unlike a square grid where you have 8 natural facings, or a hexagonal grid that has 12 facings (6 edges + 6 corners).
Square grids have 3 natural main directions along one which can put troops next to each other: vertical, horizontal, and diagonal. A hexagonal grid has 3 main directions, and 3 "zig-zag" directions. What about the triangular grid? The triangular grid also has 6 main directions, as shown below (the 2 other symmetric directions at 30 and 60 degrees are not shown).


The orientation and facings, having 12 "natural" directions on the grid, might be the biggest advantage of the triangular grid. However, just an in squares, the connections between the grid cells is asymmetric. But this is also the case when considering the "zig-zag" directions in a hexagonal grid.

Firing arcs become a little more complex. The diagram below shows firing arcs at 60 degrees, and a distance of 4, using the counting metric as derived above. Note the little discrepancy in the firing arc for the unit on the right.


All this seems workable, but it takes time getting used to.

Conclusion

So, should we use the triangular grid for our miniature wargames? Honestly, I don't know yet. I will have to run a test game or two ... but any other experiences or insights are certainly welcome!