Bullet Hell Dodge & Covering Density
Dodge a field of bullets, plus the geometry: covering a screen takes twelve to sixteen times more bullets than covering its area does.
Move the mouse or drag a finger to fly. The dashed circle is the largest place on the screen where nothing can touch you right now, found by refinement rather than by sampling — watch it collapse as you raise the density. Everything runs in your browser; nothing is uploaded.
Covering the screen costs 13 to 16 times what covering its area suggests
The obvious estimate for "nowhere is safe" is the density at which the bullets' combined area equals the screen: A / πr². It is not close. Random discs land on top of one another, and the last few gaps are stubborn — closing them takes a logarithm's worth of extra bullets.
| Effective radius | No safe point from | Area alone says | Out by |
|---|---|---|---|
| 10 px | 17,613 bullets | 1,146 | 15.4× |
| 14 px | 7,508 bullets | 585 | 12.8× |
| 20 px | 4,710 bullets | 286 | 16.4× |
On a 600×600 screen, dodging with a combined radius of 14 pixels, the screen is not genuinely closed until about 7,508 bullets are on it — against 585 from the area. The multiple never strays far: 12.8× at one radius and 16.4× at another, because what separates the two columns is a logarithm rather than a constant.
A threshold is not a number until its criterion is stated, so here is this one: the density at which the mean largest empty circle, over four independent fields, falls to the radius. Change the criterion and you change the number.
The free area is exactly what the model says
Scatter n bullets of radius r over area A and the fraction of screen still safe is exp(−n·πr²/A). The measurement is not an approximation to it — it lands on it, worst case 0.0052 away across the whole range.
| Bullets | Measured free area | exp(−nπr²/A) | Difference |
|---|---|---|---|
| 50 | 91.9% | 91.8% | 0.09 pp |
| 200 | 71.0% | 71.0% | 0.08 pp |
| 400 | 50.7% | 50.5% | 0.25 pp |
| 800 | 25.8% | 25.5% | 0.37 pp |
| 1,600 | 7.0% | 6.5% | 0.52 pp |
Which raises the obvious question: if the free fraction is an exponential, it is positive at every density, so is anywhere ever certainly covered? That is the wrong question to ask of the formula, and the reason the thresholds above are measured rather than derived. An exponential describes the average free area. What kills you is the largest single gap, and that is a different quantity with a different law.
The largest gap shrinks as √(A ln n / πn)
The largest empty circle in a field of n random points has a known scaling law, and the measured gap tracks it to a constant near 1.24 across a twenty-fold change in density. That ln n is the entire story of the table at the top of this page: it is what makes coverage cost so much more than area.
| Bullets | Measured largest gap | √(A ln n / πn) | Ratio |
|---|---|---|---|
| 1,000 | 36.1 px | 28.1 px | 1.283 |
| 2,000 | 25.3 px | 20.9 px | 1.210 |
| 5,000 | 18.8 px | 14.0 px | 1.344 |
| 10,000 | 12.2 px | 10.3 px | 1.191 |
| 20,000 | 8.8 px | 7.5 px | 1.166 |
Measuring that gap with a grid is biased, not merely imprecise
The natural way to find the largest gap is to sample a grid and keep the best point. It cannot work, and the failure has a direction. A grid only finds a gap that happens to contain a sample point, so it can never report a gap larger than the true one — every estimate sits below the answer and climbs towards it as the grid tightens.
| Bullets | Grid 30×30 | Grid 90×90 | Grid 270×270 | Refined | Finest grid short by |
|---|---|---|---|---|---|
| 2,000 | 19.70 px | 24.88 px | 26.10 px | 27.45 px | 4.9% |
| 10,000 | 8.62 px | 9.71 px | 10.68 px | 11.80 px | 9.5% |
At 10,000 bullets even a 270×270 grid — 72,900 samples — is 9.5% short. A one-directional error is worse than a noisy one: it means a grid declares the screen covered earlier than it truly is, and a covering threshold built on grid samples comes out too low. So the numbers here come from a coarse pass that keeps eighteen candidates and refines each one locally with a shrinking step.
Sampling harder is not the fix — a finer grid can be worse
The obvious repair is to sample more finely. It does not reliably work, and this is the part that caught us out. "A finer grid cannot do worse" is only true when the finer sample set contains the coarser one — and samples at cell centres, (i + ½)·W/n, do not nest under doubling. A 60-grid reproduces 0 of a 30-grid's coordinates. A 90-grid reproduces all 30.
| On one field of 800 bullets | Samples | Largest gap found |
|---|---|---|
| 20×20 grid | 400 | 33.03 px |
| 40×40 grid (doubled) | 1,600 | 30.13 px — worse |
| 60×60 grid (tripled) | 3,600 | 33.03 px |
| Local refinement | — | 36.22 px |
Quadrupling the work returned an answer 8.8% worse, because the doubled grid landed between the coarse grid's points and missed the one that had found the gap. Tripling recovered it exactly, as nesting requires. Across 120 trials on 40 fields, doubling lost 16 times (13% of them, once by 19.6%) and tripling lost 0. Nothing, at any resolution, ever beat refinement.
So the two halves of "a grid understates the gap" have completely different standing. Never overstating is geometry and holds always. Improving as you refine is a property of the sampling scheme, and only survives if the grids nest. The table further up steps 30 → 90 → 270 for exactly that reason.
Where the arithmetic gives up before the mathematics does
Building this page we asserted that the free-area formula never reaches zero, because an exponential does not. The build disagreed. It is not a claim about bullets, it is a claim about arithmetic: past 435,643 bullets the exponent drops below −745 and a double-precision float underflows to exactly zero. The mathematics never reaches zero; the number standing in for it does, and it does so at a perfectly definite density.
It changes nothing about the game — that density is about 58 times past the point where the screen is already covered — but it is a fair reminder that "the formula says so" and "the float says so" are different statements. That constant is left in the source, still false, with the reason written beside it, and so is the finer-grid one from the section above. Both were assertions that sounded like geometry and were not.
What this page does and does not answer
Everything above is the static question: at what density does the screen contain no safe point at all. Real survival is strictly harder, because a safe point also has to be reachable in the time you have and has to still be there when you arrive. The densities here are therefore an upper bound on what is survivable, not an estimate of it — the screen becomes undodgeable some distance before it becomes uncoverable.
The four measured columns are frozen — sweeping them live costs about twenty-eight seconds per build. Every derived quantity on this page is still computed at build time from those rows, and one row of each table is re-measured live by the same shipped function and compared: the free fraction at 200 bullets came back 0.7095 again just now.
How to use
- Move the mouse or drag a finger to fly.
- Raise the density slider and watch the safe circle collapse.
- The dashed circle is the largest place nothing can reach you.
- Turn it off if you would rather dodge blind.
- Press Restart for a fresh wave.
Frequently asked questions
At what density does survival become impossible?
On a 600 by 600 screen with a combined bullet-and-player radius of 14 pixels, the screen contains no safe point at all from about 7,508 bullets. At a radius of 10 it takes 17,613 and at 20 it takes 4,710. Those are measured rather than derived, because the quantity that decides it is the largest single gap rather than the average free area.
Would the bullets not cover the screen much sooner than that?
That is the tempting estimate and it is out by a factor of twelve to sixteen. Setting the bullets combined area equal to the screen gives 585 bullets at radius 14 against a real 7,508. Random discs land on top of one another, so most of the area you add is wasted, and the last few gaps take a logarithm worth of extra bullets to close.
How much of the screen is safe at a given density?
Exactly what the Boolean model predicts: the fraction still safe is exp of minus n times pi r squared over the area. Measured against that formula it lands within 0.6 percentage points at every density tried, from 50 bullets to 1,600. It is not an approximation here, it is what the screen does.
How big is the largest safe circle?
It shrinks as the square root of the area times the natural log of n, divided by pi n. Measured against that law the ratio sits near 1.2 across a twenty-fold change in density. That logarithm is the whole reason coverage costs so much more than area suggests.
Why not just sample a grid to find the gap?
Because a grid is biased rather than merely imprecise, and the bias only runs one way. Sampling can only find a gap that happens to contain a sample point, so it can never report a gap larger than the true one. Even a 270 by 270 grid comes back 9.5 per cent short at 10,000 bullets, which makes the screen look covered before it is. Sampling harder is not a reliable fix either: doubling a grid resolution returned a worse answer in 16 of 120 trials, because cell-centre samples do not nest under doubling.
Does this measure whether the game is survivable?
No, and the difference matters. This is the static question of whether any safe point exists. Real survival also needs that point to be reachable in the time you have and to still be there when you arrive, which is strictly harder. Treat these densities as an upper bound on what is dodgeable, not an estimate of it.
Does this send anything anywhere?
No. Every wave is generated and every gap computed in your browser, and nothing is uploaded.
🔒 This tool runs entirely in your browser. Nothing you enter is uploaded, logged, or stored.