Why do fast bullets sometimes go through walls in video games?
Games don't move things smoothly. They jump them forward once per frame, by the speed divided by the frame rate. A bullet at 3,300 pixels per second in a 60 fps game jumps 55 pixels each frame. If the wall is only 16 pixels thick, the bullet can land in front of it one frame and past it the next.
- Jump per frame
- 80 px
- Fastest speed that always hits
- 720 px/s
- Substeps per frame to fix it
- 4
Challenge: Make a bullet tunnel through even at 120 fps or higher.
More settings
Play
Press "Run it, frame by frame" on the fast bullet and watch it hop over the wall. Then try 240 fps.
Challenge: Make a bullet tunnel through even at 120 fps or higher. The box under the picture turns green when you get it.
Stuck? Pick one of the examples from the “Try an example” menu, or press “New example.”
Understand
A game draws the world many times a second. Between frames, everything jumps forward by its speed divided by the frame rate:
That's a ratio, and it's the whole problem. The game only checks for a hit at the spots where the bullet lands. When the step is bigger than the wall, one frame can be in front of the wall and the next one behind it, so the hit is never seen. Press "Run it, frame by frame" to watch the bullet hop.
Use
Every input has a unit menu, so you can type values in the units you already have. Results follow your units.
Show the work
- Each frame, the game moves the bullet by its speed divided by the frame rate
\text{step} = \frac{2400}{30} = 80\ \text{px} - It only checks for walls at those spots: 0, step, 2 × step, …
0,\ 80,\ 160,\ 240,\ \ldots - Any speed up to wall thickness × frame rate can never skip it
24 \times 30 = 720\ \text{px/s} - Substeps needed to make every step shorter than the wall
\left\lceil \frac{80}{24} \right\rceil = 4
Export
Set the bullet's speed and the frame rate. "More settings" changes the wall's thickness.
- This treats the bullet as a point. A real bullet's own size helps a little, like making the wall thicker.
For learning and estimation. Verify with applicable codes, standards, and a qualified professional before using in design, construction, or safety-critical work.
Cheat card
| Symbol | Meaning | Unit |
|---|---|---|
| how fast the bullet moves | px/s | |
| frames per second |
- Doubling the frame rate halves the jump per frame, so higher fps makes tunneling rarer.
- Thin walls and fast objects are the danger. That's why games often make walls thicker than they look.
- The fix is to check the whole path between frames, not just the landing spot.
Where it’s used
- Computer Science
Game engines like Unity and Unreal have a "continuous collision" setting just for fast objects. - Physics
Science simulations face the same problem and shrink the time step for fast-moving particles. - Hobbies & Crafts
Speedrunners use tunneling glitches to clip through walls on purpose.
Related exhibits
- Start here
Hitboxes: how a game knows you got hit
Games wrap every character in an invisible circle or box. A hit is just a distance check, and the Pythagorean theorem does the work.
- Go further
Why far things look small: how 3D games draw a flat screen
Size on screen = focal length × real size ÷ distance. Twice as far looks half as big, and the FOV slider in your settings changes the focal length.
- Also try
Delay times that lock to the beat: BPM to milliseconds
One beat lasts 60,000 ÷ BPM milliseconds. Every echo setting is a fraction of that beat.
- Also try
Speed, distance, time: how long is the drive?
Distance is speed times time. Rearrange it and you know when you’ll arrive.
Questions people ask
What is tunneling in a game?
When a fast object passes through something solid because no frame ever catches it inside. It jumps from one side to the other between checks.
Does a higher frame rate fix it?
It helps, because each jump gets shorter. But a fast enough bullet can still tunnel, so games also check along the path.
How do games stop it?
They split each frame into smaller steps, or trace a line from where the object was to where it is now and check that line for walls.
Updated : First published.