One ball, ten tries, and a field of glowing pegs. That is the entire setup of Orbital Ricochet, an arcade game from x9m8 in which a cannon fires a steel-bright ball into a grid of obstacles and the player tries to clear every golden orb before the supply runs out. The rules fit in a sentence. The bounces take much longer to master.
The game runs in the frame below, with no download and no sign-in. Aim with the mouse or a finger, then click or press Space to fire.
A full-window version lives at apps.x9m8.com/orbital-ricochet, and the complete source is public in the x9m8/orbital-ricochet repository on GitHub.
How a round works
Every stage scatters pegs across a neon board. Blue pegs are plain scenery that scores a little. Golden target orbs are the objective: knock out all of them and the stage ends in an Extreme Fever finale, a slow-motion shower of points. Large round bumpers throw the ball back with spring force, TNT pegs explode, and some later stages add brick barricades that need something heavier than a standard shot.
A motorized catcher patrols the bottom edge of the board. Drop the ball into its net and the game awards an extra ball and a 5,000-point bonus, which is the difference between a clumsy round and a comfortable one. The same trolley also teaches the central lesson of the game: where a ball ends up matters as much as what it hit on the way down.

Scoring rewards chain reactions. Each target is worth 500 points in the source, a bumper 250, a TNT peg 300 and a plain peg 100. The multiplier climbs by one for every five consecutive hits in a single shot, so a ball that ping-pongs through a cluster is worth far more than the same pegs hit one at a time. Fever cups at the bottom of the board pay 10,000, 25,000 or 100,000 points depending on where the final ball lands.
Five balls for five jobs
The Ball Arsenal bar above the board lets a player swap ammunition before each shot, and the five types behave differently enough to change a plan.
- Plasma is the standard ball, a crisp, lively bouncer.
- Cluster splits into four smaller bombs when the player clicks in flight.
- Meteor carries three times the mass of a standard ball and crushes brick barricades.
- Tesla sends electric arcs to three neighboring pegs on contact.
- Splitter spawns two extra balls the moment it first hits something.
The source backs the descriptions with numbers. A Plasma ball has a mass of 1.0 and a restitution of 0.84. The Meteor weighs 3.5 and bounces at only 0.65. In other words, the heavy ball gives up liveliness for power, which is the trade a player feels without ever reading a number.
The physics underneath
Orbital Ricochet uses a hand-written physics engine on an HTML canvas, not a third-party library. Gravity pulls the ball down at 0.22 in the game’s own units, which the engine converts to roughly 216 pixels per second squared. The cannon launches at 580 pixels per second. A tiny drag factor of 0.9995 per step bleeds off speed over a long flight, and a hard cap of 1,400 pixels per second keeps a ball from tunneling through a peg when a bumper has just flung it.
Each frame is split into three substeps, so the ball moves in smaller increments and collisions get checked three times as often. That matters more than it sounds: a fast ball that jumps its own diameter in one step can skip clean past a thin obstacle, and substepping is the cheap, standard remedy.
Bounces follow the idea explored in the earlier Kinetic Shapes post: when the ball strikes a peg, the part of its velocity pointing into the surface is reversed, then scaled by a restitution number. Anything below 1 loses energy on each hit. Bumpers break that rule on purpose. Their restitution is 1.35, so the ball leaves faster than it arrived, which is how a single bumper can turn a lazy drop into a screaming comeback.

Gravity wells and the second world
The campaign has twelve handcrafted levels in three worlds of four: Neon Citadel, Cosmic Vortex and Demolition Foundry. The first world teaches the fundamentals. The second changes the rules of space itself.
In Cosmic Vortex, stages like The Singularity Well place a gravity well on the board, drawn as a purple spiral around a dark core. Inside the well’s radius the ball is pulled toward its center with a force proportional to the well’s mass and inversely proportional to the squared distance, softened by a constant of 600 so the pull stays finite near the center. Readers of the Gravity Lab post will recognize the trick: without softening, the force would blow up as the distance shrinks toward zero.
The effect on play is easy to see. A shot that would miss the golden ring entirely can be bent around the well and dropped onto a target from behind. A ball that wanders too close is grabbed and thrown in a new direction. The aim guide, drawn as a dotted line from the cannon, helps with the first bounce, though the well makes every later one hard to predict.

A short video on the original idea
Games built on this formula have a long history, and the genre’s best-known commercial example is Peggle. For a 36-second clip on the physics of that game, here is a video by Omar Chahbar.
Video: Omar Chahbar, “Physics in Peggle.” Orbital Ricochet is an independent game with its own levels, art and code, and it has no connection to that title or its publisher.
Endless Waves and the Level Builder
Beyond the campaign, the top bar offers two more modes. Endless Waves generates one new board after another, keeps the score running across waves, and remembers a personal best in the browser. The Level Builder is a sandbox editor in which standard pegs, bumpers, TNT barrels, brick barriers and gravity wells can be placed by hand, so a player can design a board and then play it.
The build is modern web tooling throughout: React 19 and TypeScript for the interface, Vite for bundling, Tailwind for styling, and a canvas renderer with motion trails for the ball. The game was generated and refined in Google AI Studio, exported to GitHub, and published to the x9m8 apps site, the same route taken by the Fur Simulation.
Why small changes matter so much
A game like this rewards a quiet kind of sensitivity. Nudge the aim by a single degree and the first peg is still the first peg, but the angle it sends the ball away at shifts a little, and the next collision magnifies that shift, and the one after magnifies it again. After five or six bounces the two paths can be nowhere near each other. The same effect, at the scale of a toy, drives the chaos on display in the double pendulum post.
That sensitivity is the reasoning behind the aim guide, and it is also an opinion worth stating plainly: the dotted line is a good teacher of the first bounce and a poor predictor of the fifth. Players who treat it as a hint, and then watch where the ball actually goes, tend to learn the board faster than players who treat it as a promise.
Built to scale on any screen
Every level is authored in a fixed internal space of 800 by 950 units, and the renderer scales that space to whatever the browser window offers. Because the physics lives in the same fixed space, a stage behaves identically on a phone and on a widescreen monitor; only the picture grows or shrinks. The ball carries a short trail of eight recent positions, redrawn each frame at fading opacity, which gives the streak that makes fast shots readable.
This design choice has a practical payoff for the Level Builder. A board designed on one device keeps its exact geometry on another, and since the editor can copy a finished level out as JSON text and import it again, a layout passed from one player to another plays the same way for both of them.
Tips for a first session
- Start with stage 1 and aim for the catcher basket to bank free balls early.
- Save the Meteor for brick barricades, and the Splitter for a tight cluster of targets.
- Look for bumper chains: a ball trapped between two bumpers can rack up the combo multiplier quickly.
- In the gravity stages, fire a shot to learn how the well bends the path before spending the best ammunition.
For readers who want to build something like this, collision handling is the part that bites first. Real-Time Collision Detection by Christer Ericson, part of the Morgan Kaufmann Series in Interactive 3-D Technology, is a reference book on the subject. See it on Amazon (affiliate link).
As an Amazon Associate I earn from qualifying purchases. A commission may be earned if you buy through this link, at no extra cost to you.
A note on the opening photograph: it is an AI-generated image of a chrome ball on a pinball playfield, included for atmosphere, and it is not a capture from the game. The three screenshots in the article come from the live build.
