Taps can be unreliable inside this app's built-in browser. For the full experience, use its menu to open this page in your browser.
Skip to content

The Pool Game Where You Could Not Sink a Corner Pocket

A devlog by Neeraj Kotwani, who builds every game on Elipar.

Every game on Elipar is built here, which means every bug in them is mine too. This one sat in Pool Master for months and was invisible in the worst possible way: the game looked fine, played fine, and quietly refused to let you pot a ball.

The symptom nobody reports

A player rolls a ball dead straight at a corner pocket. It arrives. It bounces off. Not off the cushion beside the pocket — off the pocket itself, as though the hole were a wall.

Nobody files that as a bug. It reads as bad aim, so you try again, miss again, and eventually decide the game feels off. I only caught it by writing a bot that aimed perfectly at the ghost ball and measuring what happened: it potted 16% of its shots, sinking 6 balls in 38 attempts and scoring zero. A perfect-aim bot scoring zero is not a difficulty problem.

Two reasonable rules that combine into an impossible one

Pocket capture was a distance test. Each frame, take the ball's centre, measure to the pocket centre, and if it is within the capture radius, the ball drops. That is the obvious way to write it.

Cushion collision was also a distance test. If the ball has crossed the rail line, push it back onto the table and reverse its velocity. Also obvious.

Now put a pocket in a corner, where two cushions meet. The cushion clamp holds a ball at coordinates (78, 78). The pocket centre is at (50, 50). The distance between those is 39.6 pixels, and the capture radius was 36.

So a ball resting in the corner is permanently 3.6 pixels outside the one test that would let it drop. The clamp holds it exactly far enough away to never qualify. The only balls that ever went in were the ones moving fast enough to overshoot the cushion within a single frame — which is why the bug looked like inconsistency rather than a rule. Measured across speeds: 1 through 8 all bounced, 10 and above sank.

The fix is a gap, not a bigger radius

The tempting fix is to enlarge the capture radius until the corner case clears. That treats the symptom and breaks something else — a radius wide enough to catch a clamped ball also swallows balls rolling past on a legitimate path.

The right model is the one a real table uses: a pocket is a gap in the cushion, not a circle painted near one. So the cushion simply stops existing within range of a pocket. Inside that span the ball is never clamped, so it travels into the mouth under its own momentum and reaches capture range naturally.

I also changed capture to test the whole segment the ball swept during the frame rather than just where it ended up, so a fast ball cannot jump across the pocket between two frames.

Afterwards, corner pockets accept balls from speed 1 upward. The same perfect-aim bot went from 16% to 25%, from 6 balls to 11, and from zero points to 160.

The lesson that generalised

This exact shape of bug — an unconditional boundary check running before the test for the opening that is supposed to be in it — has now appeared in four of my games. It made goals unscoreable in Pro Football 3D, where the pitch boundary bounced the ball back at exactly the x-coordinate where the goal check began, so no shot could ever go in at any angle. It showed up again in Paddle Clash and in Mini Golf.

The rule I now write down: if a wall is meant to have a hole in it, the hole belongs in the wall's own logic. Do not put a boundary check and an opening check in sequence and hope the ordering works out, because for a while it will, and then geometry will move underneath it.

And the testing lesson, which cost me a second round

The first fix was verified by rolling balls into pockets at 45 degrees. Everything passed. The fix was still broken.

The problem was that the gap had been carved per-axis, which makes a corner opening L-shaped: both axes open together at exactly 45 degrees, and only there. A ball arriving on a shallow line — far more typical of a real shot — clipped the solid part of one rail and deflected before it ever reached the opening.

Testing the convenient angle told me nothing. Testing the awkward one found it immediately, and the mouth became a radius around each pocket so it opens identically from every direction.

If you want to see the result, it is the same game: Pool Master, free in a browser tab. The rack is properly packed now too — the balls used to sit 2 pixels apart, which is why the break never scattered convincingly.

We use cookies to keep games running and, once ads are live, to show relevant content. See our Privacy Policy for details.