gekro
GitHub LinkedIn

Brick Smasher

Play Brick Smasher: bounce a ball off a round paddle to clear walls of soft-coloured bricks, with power-ups, three lives and endless levels.

Score 0

Best -

Level 1

Lives ♥♥♥

Move the paddle with the left and right arrow keys (or A and D), the mouse, or by dragging a finger across the board; the buttons under the board work too. Space, a click or a tap launches the ball. Space or P pauses. Where the ball meets the paddle decides its angle: the edges send it sideways, the middle sends it straight up. Falling shapes are power-ups: catch them with the paddle. Changing the difficulty starts a new game.

  • Six-sided with a double arrow: a wider paddle for 12 seconds.
  • Round with clock hands: a slower ball for 10 seconds.
  • Square with two dots: two extra balls.
How it works

The game moves in fixed steps of 1/120 second, however fast your screen redraws, and a long pause between frames is counted as at most 50 milliseconds. The ball moves in small sub-steps of at most 3 pixels, half its radius, and bounces off each brick, wall and the paddle after every sub-step, so at its top speed it cannot pass through anything. Each level is built from a shape and a seed. Some bricks need two hits from level 5, shown with an inner outline.

As-is, no warranty. These apps are free under their listed license and run entirely in your browser. Use at your own risk — don't blame me if your PC catches fire, your dog runs away, or the math turns out wrong. Verify anything that actually matters. None of this is professional financial, medical, legal, or engineering advice.

© 2026 Rohit Burani · MIT · Built at gekro.com · View source ↗

Guide

How to play

Launch the ball, then keep it in play with the paddle and clear every brick to move to the next level. You have three lives. A ball that falls past the paddle costs one life; the next ball waits on the paddle until you launch it.

  • Move: the left and right arrow keys (or A and D), the mouse, or a finger dragged across the board. Two big buttons under the board also move the paddle on a touch screen: hold one down.
  • Launch: Space, a click or tap on the board, or the Launch button. A drag does not launch, only a tap does, so you can line up the paddle first.
  • Pause: Space (while the ball is moving), P or Escape. The game also pauses when you switch to another tab.
  • Steering: where the ball meets the paddle decides its angle. The middle sends it straight up and the very edge sends it 60 degrees to the side. The paddle is a rounded pill, and a ball that has dropped below its middle line is missed.

The keys only act while focus is inside the game or the ball is moving, so a stopped game never takes over the page’s arrow keys or Space. If you paused and moved on to something else, click the board or press Resume to carry on. If your system asks for reduced motion, the ball is 15 percent slower and there is no confetti.

Bricks, levels and score

Levels cycle through four shapes: stairs, wave, checker and heart. Stairs, wave and checker levels start 5 rows tall and gain a row every four levels, up to 8; the heart is always 8 rows tall. Bricks are drawn in violet, sky, teal, lime and amber from top to bottom, but about a quarter of them are shifted one colour, so the rows are not simple stripes. From level 5 some bricks take two hits and show an inner outline; the chance rises 5 percent a level up to 35 percent.

ThingValue
Each hit on a brick10 points
Clearing a level100 bonus points
Ball speed, Easy / Medium / Hard230 / 290 / 350 pixels per second at level 1
Speed increase4 percent per level, never over 600
Paddle width, Easy / Medium / Hard88 / 72 / 60 (out of a 360 wide board)

Power-ups fall from about one broken brick in seven, at most three at a time, and you catch them with the paddle. Each is a shape with a symbol, not a letter. A six-sided capsule with a double arrow makes the paddle 1.5 times wider for 12 seconds. A round capsule with clock hands slows the ball to 70 percent for 10 seconds. A square capsule with two dots adds two balls, up to five in play. You only lose a life when the last ball is gone.

Your best score at each difficulty is saved in your browser as a whole number.

How it works

The engine is a set of plain functions on a small world object with no page attached. It takes random numbers as an argument, so every run can be replayed exactly.

  • Fixed steps. The world moves in steps of 1/120 second however fast your screen redraws, and a long gap between frames counts as at most 50 milliseconds, so a stalled tab cannot throw the ball across the board.
  • No tunnelling. At 600 pixels per second the ball travels 5 pixels a step, nearly half its own width. The engine moves it in sub-steps of at most 3 pixels, half its radius, and resolves walls, bricks and the paddle after every one, so the centre of the ball can never end up inside a brick.
  • Collisions. A brick is a rectangle and the ball is a circle; the nearest point on the rectangle gives the bounce direction. The paddle is a capsule, so the ball bounces off its curved ends in the same way.
  • Levels. Each level comes from a shape plus random choices for tints, mirroring and two-hit bricks, all taken from the seed.

The tests attack the physics several ways. The circle-and-rectangle test is compared with a second version based on edge distances over 20,000 random cases. A full wall of unbreakable bricks is hit at 600 pixels per second from random angles for 150,000 steps and never crossed, and a single unbreakable column is shot at from both sides. For the paddle, the ball’s landing spot is worked out by unfolding its path off the side walls, and every ball predicted to land on the flat part, at least 4 pixels in from its curved end, is returned. First contacts on straight paths match a fine scan, one hundredth of a pixel at a time, to within one sub-step and never early. A bot that aims randomly clears each of the first eight levels, and a random-input run of 90,000 steps finds no ball outside the walls, no centre inside a brick, and no score going down.

Limits

  • There is one board size, and no two-player mode or sound.
  • Changing the difficulty or pressing Restart ends the game in progress. A score that beat your best is kept.
  • The page only draws the board on a canvas, so the board is described to screen readers in a short status line rather than brick by brick.
All Fun tools →

For informational purposes only. Not financial, medical, or legal advice. You are solely responsible for how you use these tools.