Myriarch attempts a precise real-time simulation of pre-gunpowder tactical warfare. Myriarch is © 2012–2021 by Christoph Nahr but available for free download under the MIT license.
Myriarch simulates tens of thousands of soldiers as independent physical objects, advancing in 100 msec increments. The simulation comprises the following subsystems and features:
- Physics — Movement with acceleration and turning, distinction of facing and direction, semi-elastic collisions that can cause damage, and accumulation of “push mass” throughout the ranks when two phalanges clash.
- Combat — Weapon cooldown for repeated attacks, hit chance based on target size, partial body armor, shields that respect facing, and combat bonuses against colliding or routed units.
- Morale — Gained or lost from successful attacks, then averaged among nearby friendly units, reduced by nearby hostile units that aren’t routed. May generate mass panics or rally fleeing troops.
The entire simulation is recorded in memory and optionally to disk, and can be replayed as desired. Please note that you cannot issue orders or otherwise influence the simulation. Myriarch currently ships with one demo scenario based on the Battle of Leuctra (Sparta vs Thebes, 371 BC).
Although a complete and working application, Myriarch still lacks many desirable features: varied terrains and elevations, multiple unit types and weapons including ranged attacks, documentation of simulation internals, more scenarios, etc.
The following screenshot shows the overstrength Theban left clashing with the Spartan right at the Battle of Leuctra. (The screenshot dates from version 2.0.2 which used JavaFX rather than Swing, so the current version looks slightly different.) As you can see, Myriarch is a simple desktop application with abstract graphics.
Myriarch requires Java SE 8 or later. Users of high DPI displays should note that Java SE 9 or later is required for high DPI scaling. See the following for more information:
- The ReadMe file contains usage information and the copyright notice.
- The WhatsNew file contains the annotated version history of the project.
- You can also find some Implementation Notes on my weblog.
Copies of the ReadMe & WhatsNew files are included with both download packages. The integrated help system explains the various displays and controls.
- Binary & Source Package: version 2.1.0, released on 16 April 2021
Myriarch requires no installation. Simply extract the contents to any directory of your liking, then study the enclosed ReadMe file for further instructions.
Source Package — MyriarchSource.zip (1.91 MB)
You need IntelliJ IDEA 2021.1 to load the included project files. I used Oracle JDK 10.0.2 for development, but any JDK version 8 or later is fine. The source package also contains a prebuilt Javadoc class reference.
The source package contains two Myriarch projects, one for the Swing GUI and one for the simulation algorithms. This “core” project requires only the Java SE 8 Compact 1 profile, or the JVM module
java.base on Java SE 9 and later, and so could be used on any platform that supports a minimal Java 8 installation.
The current version of Myriarch includes version 6.3.0 of my Tektosyne library which is also available as a separate download, but this is not required to run or compile Myriarch.