Skip to main content
Blog

Balancing a C++ Game So Player Skill Matters More

We use a shared C++ simulation, paired bot matches and item telemetry to move DOTUH toward fairer fights, with player skill as the goal and data as the test.

· Tyler Garrett

DOTUH bot-match results: completed games rise from 162 to 382 of the same 400 attempts; Rook and Grim appearance win rates move closer to a 50 percent reference.

A competitive game should give players room to win through positioning, timing, teamwork and good decisions. Champion identity and equipment should create interesting choices. They should leave enough room for the person making those choices to matter.

That is the direction we are taking with DOTUH, our native C++ lane-based game. In the initial completed bot games, Grim appeared on the winning team 77.16% of the time. Rook did so 7.41% of the time. More than half the attempted matches never finished. Those numbers gave us a concrete engineering problem: understand what was driving the experience, repair the underlying behavior, then measure it again.

The latest pass completes 382 of the same 400 attempts, up from 162. Champion appearance win rates in that cohort now sit between 47.77% and 51.70%. A separate 800-attempt check puts them between 47.59% and 54.37%. That is useful progress toward our goal. It is still evidence about these bots, builds and fixtures; human competitive balance needs its own testing.

All measurements in this article come from our November 15, 2026 study. You can inspect the published aggregate data or download the champion results as CSV.

Equipment should reward decisions without choosing the winner

DOTUH has two lanes, connecting passages, four distinct champions, Q/W/E/R abilities, health, Mind, minion waves and three towers to defend. Champions level to ten. They earn gold through gameplay, including farm and champion kills, then spend it on equipment at base. The purchases discussed here use that in-game gold.

Equipment is part of player skill. Choosing armor against physical damage, magic resistance against spells, or attack speed for a particular kit should matter. Farming well and buying at the right moment should matter too. Our goal is to reduce overwhelming default advantages while keeping those decisions useful.

The same principle applies to champions. Rook is a melee fighter: he needs enough durability to reach an opponent, then meaningful damage if he gets close. Ranged champions keep their reach and damage while being more vulnerable when caught. We are balancing the opportunities each role gets, while preserving how each role feels.

A 50% reference helps us investigate broad advantages. We do not expect every matchup, team composition or item combination to win exactly half its games. We want a player’s execution and decisions to have more influence than an unusually strong default champion or purchase path.

One C++ simulation powers play and measurement

The game and the headless match runner share the same C++ gameplay simulation. The native window adds rendering, animated character models, effects, camera controls and input. The headless executable runs matches without loading those graphics. Python launches workers and analyzes results; gameplay stays in C++.

This separation lets us change a rule once, exercise it across many complete games, and watch it in the playable client. It follows the same principle as our portable C++ desktop chat core: keeping the model separate from its interface makes behavior easier to test.

The simulation advances at 60 fixed steps per simulated second. The speed dial requests anything from 0.25× to 100× time. At 100×, it requests 6,000 ordinary gameplay steps per wall-clock second. Cooldowns, movement and damage still use the same small steps. A bounded work budget protects rendering, and unprocessed steps remain pending if the machine falls behind.

We checked that this research path still represents the game people can see. One native replay reached its real tower victory after 26,537 ticks, or 442.28 simulated seconds. Every exported result field except wall duration matched the headless run, including purchases, positions, damage, towers and movement telemetry. The native 100× run took about 4.43 wall seconds.

Fix incomplete games before trusting the leaderboard

The initial workload used 200 seeds, each run twice with the logical players exchanged between map sides: 400 attempted matches. Each varied roster distributes two copies of each champion across eight seats, allowing up to two copies on a team. The original model completed only 162 games before the 30-minute simulation limit.

A timeout remains unfinished. We never turn the remaining tower health, gold or kills into a synthetic winner. That matters because a leaderboard based on the minority of matches that finish can hide the behavior trapping everyone else.

The investigation found several problems working together:

  • Bots stayed attached to their assigned lane after its tower fell, rather than rotating toward the remaining objective.
  • Retreating bots could turn back toward danger before they had recovered enough at the fountain.
  • Rook could spend time on self-buffs or the nearest minion instead of using Q to reach an enemy champion.
  • Long level-ten sieges needed stronger late wave support to create useful opportunities to attack towers.

The updated bots rotate objectives, commit to fountain recovery and give Rook a more useful engage decision. From wave 28, minions on both teams gain gradual, capped extra health and damage. Wave composition and gold rewards stay consistent. A match still ends through the actual victory rules.

We also changed the role budgets. Rook keeps 200 starting health, gains 44 health per level instead of 24, and reaches 596 health at level ten before items. His base attack rises from 27 to 44; Q gains reach, damage and a shorter cooldown. Grim keeps his basic and boomerang damage, but starts with 155 health instead of 180, lower armor and magic resistance, and a smaller shield.

The result reflects changes to both the rules and the bots using them. It does not isolate the causal effect of any single stat change.

Rerun the same workload, then check fresh seeds

Match cohortAttemptsCompletedUnfinishedCompletion rate
Original rules40016223840.50%
Updated rules, identical seeds4003821895.50%
Updated regression cohort8007673395.88%
Updated fresh cohort8007673395.88%

The same-seed cohort gives us a repeatable comparison. The regression cohort includes seeds that had exposed pathing problems during development. The fresh cohort uses another 400 paired seeds, 800 attempts, run after selecting the route repair; we did not use it to change stats.

These are completed-game champion appearance rates: appearances on the winning team divided by completed appearances for that champion. Each match has four-player teams. A champion’s rate therefore also reflects teammates, composition and the bot policy using it.

ChampionOriginal 400Updated same 400Fresh 800Fresh paired-seed 95% interval
Rook7.41%51.70%47.59%45.0–50.0%
Grim77.16%47.77%48.04%45.6–50.5%
Thorn58.95%50.79%54.37%52.0–56.9%
Vale56.48%49.74%50.00%47.5–52.6%

Fresh DOTUH cohort with champion appearance win rates and paired-seed 95 percent intervals, showing Thorn still above the 50 percent reference.

The intervals come from 2,000 bootstrap resamples grouped by seed, keeping each side-swapped pair together. They describe sampling uncertainty within this experiment. They do not cover human play, bot-policy bias or every possible composition.

Thorn still runs high in the fresh cohort. That remaining edge gives us another question to investigate. The old results also had much heavier censoring, so the before/after rates need to be read alongside completion counts.

Winning items need a denominator and a control

We now record successful purchases, their simulation time, gold actually paid, and each champion’s final inventory. In the updated 400-attempt cohort there are 1,528 winning hero appearances across 382 completed matches.

Item held at game endWinning holdersShare of winning hero appearances
Quickening Greaves74148.49%
Ironroot Greaves37724.67%
Spellpiercer Greaves37124.28%
Raider’s War Harness33021.60%
Sageweave Doublet30519.96%

These counts answer what winners were holding. They cannot tell us which purchase caused a win. The bots follow class-specific build goals, and winners may survive or earn enough gold to buy more. Item frequency carries those influences.

To ask a more controlled question, we assigned the first completed boot branch randomly by seed and preserved the assignment when swapping sides. All five branches cost 1,000 gold. This probe keeps ordinary earned-gold progression and includes assigned heroes who never manage to equip the boot.

Assigned boot branchCompleted assignmentsAppearance win rate
Quickening: attack speed1,22551.27%
Spellpiercer: magic penetration1,30850.54%
Wardkeeper: magic resistance1,21148.39%
Ironroot: physical armor1,25951.63%
Windstride: extra movement1,14147.94%

That 800-attempt probe completed 768 games, with 32 unfinished. The branch results are reasonably close in this bot population. They do not establish that every item or matchup is equally strong.

A separate equal-budget experiment starts mirrored teams with six finished items bought through normal component rules, then locks further purchasing. Class-appropriate alternative builds beat the normal build policy in 56.27% of 375 completed games, with 25 of 400 attempts unfinished. Gear parity still needs work.

We retained a much harsher test too: a whole team stacking defensive items. Normal builds won 333 of 336 completed games, with 64 of 400 attempts unfinished. A blanket statement that all build choices are balanced would fail that test. Equipment still creates substantial strategic tradeoffs, and our measurements need to keep those visible.

Test better decisions without granting better stats

To test the direction of our skill goal, we gave one bot team a more reactive policy: faster decisions, visible ground-zone avoidance, weakened-enemy focus and some predictive ground aim. It received the same stats and economy as its opponents.

That policy won 278 of 387 completed matches: 71.83%, with a paired-seed 95% interval of 67.0–76.7%. Thirteen of 400 attempts remained unfinished. This is useful evidence that better decisions can matter under these rules.

The harder cross-build check is less conclusive. Giving that policy to the normal-build team against the alternative builds produced 52.09% wins, with an interval that includes 50%. We have not established that player skill dominates every equipment advantage.

These probes use mirrored rosters, which put every champion on both teams. Each champion therefore gets a trivial 50% appearance rate in those games. We keep that result separate from the varied-roster champion analysis.

Pathing is part of the experience we are balancing

A player who loses control of movement beside a teammate cannot make full use of good timing or positioning. We added movement telemetry to make that problem measurable.

One rare trap occurred when passing traffic pushed a character sideways from a previously clear route. Its next waypoint then lay across a grove, and it could keep steering toward the blocked segment. The repair rechecks segment visibility and rebuilds the route when displaced. Waypoints advance on actual arrival.

Across 2,000 updated attempts, including unfinished games, the detector recorded seven sustained events near allies in seven games: 0.35%. Each lasted about two seconds. None were sustained enemy-pair or isolated terrain stalls. Four occurred near grove corners and three in open lanes.

Nearby allied pairEvents
Rook / Grim2
Rook / Thorn2
Grim / Vale1
Thorn / Vale1
Thorn / Thorn1

The detector requires continuous walking intent toward a distant, stable goal, with less than 0.5 meters of net displacement and goal progress for at least two seconds. It excludes roots, healing, unreleased casts, dashes and attacks already in range. Proximity identifies who was nearby; it does not prove that actor caused the event. Changing goals or interrupting movement can reset the window, so we also track brief slowdowns separately.

Short allied-traffic slowdowns occupied 0.0419% of intended walking time. Some are ordinary yielding or lateral movement. Counting those as separate from sustained traps makes the metric more useful.

Keep the game playable while running the experiment

The native client exposes graphics quality and frame-rate choices separately from simulation speed. A lower-powered machine can reduce rendering work; a stronger one can choose richer effects. Keeping gameplay rules shared means those choices do not grant extra damage or faster cooldowns.

On the development MacBook Pro, a short Balanced-quality run at 1440×900 with a 144 FPS target averaged 143.24 FPS. Its p99 frame time was 8.29 ms. A separate 120-target sample averaged 119.02 FPS and included a 42.14 ms outlier. These short local checks do not establish a sustained 120 FPS minimum or performance on other machines.

The native match runs through to a real tower victory at a requested 100× simulation speed, then holds the scorecard. Video capture includes image-readback and encoding overhead; its frame timing is separate from the play-performance measurements.

The final build passed nine Release test suites and eight UBSan simulation suites. Those checks cover gameplay, kits, targeting, progression, shopping, movement, simulation metrics and character assets. We retain rejected tuning runs and unfinished matches alongside the accepted results.

The experience we are working toward

We want a player to recognize why they won: they landed an avoidable spell, escaped a dangerous circle, timed an engage, farmed well, counterbuilt or coordinated a tower push. The game needs distinct roles and useful progression while giving those decisions room to change the outcome.

Vibe coding gets the feel of a game on screen quickly. Statistics give that intuition a feedback loop: define success, record what happened, and check whether a change helps across many games. The same discipline supports good machine-learning work—consistent features, a clear outcome, and a fresh evaluation set kept separate from the examples used to tune the system. Otherwise, it is easy to get very good at the test games while leaving the player experience uneven.

Our current experiments use rule-based bots and statistical comparisons. As telemetry grows, learned models could help identify combinations of items, levels and combat behavior that predict one-sided matches, guiding the next controlled experiment. Those models would need their own validation; a predictive pattern would still need testing before we called it a cause. The useful habit is to make each quick creative iteration something we can learn from.

Our next checks include human playtests, more behavior policies, adaptive purchases, broader compositions and ranged siege rules. The current data gives us a stronger starting point and identifies the advantages that still need attention.

This is the engineering work behind useful analytics: define what an outcome means, preserve the workload, collect the missing events, run controlled comparisons, and make a change whose effect can be checked. It connects C++ systems work, testing, data engineering and visualization around one concrete product problem.

If your product needs that connection between its behavior and its measurements, talk with dev3lop.