Balance game difficulty for combat
About this model
To teach combat balancing, students must grasp the interplay between Time to Kill (TTK) and Time to Live (TTL). I have designed a symmetrical system that pits a Player against an Enemy to demonstrate how variance in damage affects the win/loss outcome.
In this model, the Player HP and Enemy HP Pools are set to `automatic` to simulate a "damage-per-turn" mechanic. By using a `D6` for the Player's damage and a `D4` for the Enemy, we introduce a stochastic element that allows students to analyze the "Difficulty Band" using the execution chart.
To model staggered, non-simultaneous combat, I have implemented a Turn Sequencer using a Deterministic Gate. This setup acts as a mechanical "Round Robin" scheduler: it takes a single combat pulse and alternates the trigger between the Player and the Enemy.
By changing the Player HP and Enemy HP pools to `passive`, they no longer fire every step. Instead, they wait for the Sequencer to signal whose turn it is. This effectively creates an interval where the Player attacks on odd steps and the Enemy attacks on even steps, ensuring they never strike at the same time.
To demonstrate the impact of survivability metrics, I have introduced a Defense System alongside the core combat loop. This model utilizes an Armor Register to act as a value modifier for incoming damage.
The Player HP is now a target of the Armor register. By using a State Connection with the formula `-1` pointing to the Enemy Attack connection, the effective damage taken is reduced by 1 for every point of Armor. For example, if the Enemy rolls 10 damage and the Player has 4 Armor, the pool only loses 6 Health resources.
Based on the simulation data, Play 4 shows the combat logic is functioning correctly: the turn-based sequencer is staggering attacks, resulting in a steady HP decline. At Step 15, the Enemy HP (16) is depleting significantly faster than the Player HP (40), indicating the current balance heavily favors the player due to the Armor mitigation.
To teach students about Tactical Variance, I am introducing a Dodge Mechanic. I've added a Random Gate between the Enemy's attack trigger and the actual damage event. This simulates a 20% chance for the player to "Dodge," resulting in zero damage regardless of the enemy's attack strength. This introduces "Spiky" damage patterns, which are harder for players to predict than the "Flat" mitigation provided by Armor.
"Balance game difficulty for combat" is a public Machinations diagram shared in the Community by Catalin Ichim, with 24 components.
It was created in January 2026 and last edited in January 2026.
Open the diagram in the Machinations app and press Play to watch the resources move, adjust its values to test how the system responds, or remix it to make an editable copy in My diagrams.