Battle Analysis: Wargame Engine


Wargame Design:

Hexagon Library

The Hexagon Library provides hexagon math to calculate hexagon coordinates, range, bearing and line of sight. The Hexgon Name Calculator then calculates the hexagon name which is displayed on the screen.

map pixels ← [Hexagon Map] → hexagon point ← [Hexagon Name Calculator] → hexagon name

The hexagon point is a cartesian coordinate. The hexagon point make is easy to do analytical geometry on the wargame map. The hexagon name is not a coordinate. It is a label to identify a hexagon on the wargame map.


Graphical User Interface mouse click → wargame select event

There are only 3 events created from the mouse clicks on the wargame battlefield.

  [map image mouse down event] → [hexagon point select]

  [counter image mouse down event] → [unit select]

  [next phase button mouse down event] → [button select]


The wargame phase and wargame mode are checked to create a wargame command.

  [unit select] → (moving mode) → unit move

  [hexagon point select] → (moving mode) → unit move

  [unit select] → (combat mode) → unit combat

  [button select] → (combat mode) → next phase


Wargame Engine

The wargame command checks the wargame rules and processes the command. The wargame rules use the wargame calculators and the wargame data, which is embeded in the wargame components: Wargame, Terrain, Force, Map objects.

  For example: if the wargame mode is moving mode and the unit can move → start moving.

  For example: if the wargame mode is moving mode and the unit is moving and the move calculator calculates unit has move points into the hexagon → move.


Wargame Calculators

Each wargame has unique rules which are programmed with wargame calculators.


Wargame Data