Skip to main content
Blog

How n0.is Helped Us Speed Up a C++ Game Engine

Techniques from the n0.is C++ data engine helped DOTUH run a matched batch of games faster, with identical gameplay results and a retained experiment trail.

· Tyler Garrett

The same 100 DOTUH attempts take 8.359 seconds originally and 7.930 seconds after NEON-inspired optimizations, with a 6.19 percent median paired reduction.

A C++ data engine and a C++ game engine can teach each other useful things. They both spend time moving data, finding objects, allocating working memory and repeating calculations. Understanding those costs in one product can give us better questions to ask in another.

We used that connection to improve DOTUH, the native game discussed in our game-balance case study. We inspected the local n0.is / NEON C++ data engine, then applied several of its engineering patterns to the game’s existing C++ core.

In the combined exploratory comparison, 100 attempted games took 8.359 seconds before and 7.930 seconds after. The median reduction across five paired blocks was 6.19%. Every block favored the changed build, and every exported gameplay result matched exactly, excluding wall duration.

This is a transfer of techniques. DOTUH continues to run its own gameplay simulation; we did not embed NEON’s ETL runtime or copy its private implementation. The useful contribution was a way of identifying and removing repeated work.

Download the experiment summaries or inspect the combined block timings as CSV.

Where the data engine’s experience helped

NEON processes data through native operators. Its scheduler can avoid recomputing unchanged inputs, its buffers retain capacity for reuse, and its bounded execution paths keep working sets explicit. Those patterns translate well to a simulation with a fixed map and many repeated steps.

How NEON patterns transfer to DOTUH: reuse working memory, cache fixed navigation, use collision actors directly, and omit headless cosmetic events.

We looked for three concrete opportunities.

Reuse path-search memory. A pathfinder needs working arrays and a search heap. Repeatedly creating temporary storage adds work around the actual search. We retained fixed search buffers and reused a thread-local heap, clearing its contents between requests while keeping its capacity. Thread-local storage keeps each worker’s search workspace separate.

Precompute immutable navigation. DOTUH’s two-lane terrain is fixed. We built a shared cache of walkable grid cells and their ordered neighbor connections. A search can reuse those connections instead of repeatedly checking the same static obstacles. Characters still use dynamic steering and blocked-segment route checks. If terrain becomes editable, the navigation cache will need invalidation and rebuilding.

Use the actor already in hand. Projectile collision loops already have candidate actors available. The old path repeatedly resolved their IDs back through the minion list to retrieve properties. Passing those properties directly removes redundant searches without changing collision ordering or damage rules.

We also made cosmetic effect insertion and display-feed maintenance optional in the headless runner. The playable client retains its visual effects. Offline balance experiments need the combat, purchases and metrics; they can omit presentation events that nobody renders.

The use case: complete-game balance experiments

The practical benefit is a faster feedback loop for tuning the game. The same C++ simulation powers both the playable client and the headless runner, letting us test complete matches without loading a window and character graphics.

The final changed runner advanced 16.02 aggregate simulated hours in 7.93 wall seconds across 100 attempts. That includes games stopped at the simulation time limit. It completed 97 matches, with three unfinished, exactly like the original runner.

That throughput is useful when comparing champion changes, item builds, bot policies and pathing repairs. A modest reduction in runtime can accumulate across repeated experiments. Faster feedback also makes it easier to test a promising idea against fresh seeds before accepting it.

This is an offline simulation result. It does not measure player FPS, establish performance on another computer, or compare C++ with another language.

Keep the experiment trail, including small gains

We kept each stage separately rather than adding percentages from unrelated runs.

ExperimentAttempts per variantMedian paired runtime reduction
Initial memory reuse and headless cosmetics1001.75%
Navigation cache, against the preceding build1001.97%
Collision lookup changes, against the preceding build1001.45%
Combined changes, against the original executable1006.19%

Each experiment used its own seed range. The combined experiment used seeds 93001–93050, each with both side assignments. We ran five alternating blocks of 20 attempts per variant, using one worker at a time. Alternating which build runs first helps limit simple order effects.

The combined totals show a 5.13% reduction in aggregate wall time. The 6.19% figure is a different statistic: the median of the five paired after/before ratios. Publishing both makes the denominator clear.

BlockBeforeAfterRuntime reduction
12.720s2.636s3.10%
21.820s1.725s5.21%
31.195s1.109s7.23%
41.634s1.531s6.25%
50.990s0.929s6.19%

Five paired timing blocks, each showing the optimized runner completing its matched workload faster than the original runner. These are separate game blocks, not repeated copies of one workload.

These were battery-powered exploratory measurements with uncontrolled background activity and only five timing blocks. They support a useful candidate, rather than a controlled performance qualification. The initial gains remain visible, and the previous executables, raw timing/RSS logs, seeds and output comparisons remain in the local experiment record.

Faster should preserve the game

We compared every exported gameplay and movement-telemetry field, excluding wall duration. Winners, tick counts, damage, purchases, positions, tower results and movement metrics matched. Cosmetic event state intentionally differs in headless mode.

The final gameplay changes passed nine Release suites and eight UBSan simulation suites. Output parity and test coverage matter together: a faster run that silently changes collision order or match outcomes would answer a different balance question.

The next qualification should use controlled power and host conditions, more paired blocks, fresh fixtures and separate measurements for simulation throughput and native frame times. The current results do not establish a sustained FPS improvement.

An engine can pass on an engineering method

The lesson from n0.is is broader than a particular buffer or lookup. Reuse what remains valid. Avoid producing data that the next consumer will never use. Keep working memory explicit. Measure a complete workload, and preserve the slower attempts as well as the successful ones.

That method gives a vibe-coded prototype a repeatable learning loop. It also supports the discipline needed for future machine-learning work: stable features, clear outcomes and evaluation data separate from the examples used to tune a system. These optimizations themselves are conventional C++ changes, checked with statistical comparisons and rule-based simulations.

The result is a concrete example of experience from a data engine helping a game engine improve. The engines keep their own jobs, while the engineering knowledge travels between them.

Talk with dev3lop about connecting native software, measurement and product decisions.