ExperimentsFable 5.2 Retro Games
Tube Volley
The game has the keyboard when this page opens. If the keys stop working, click or tap the game. On a phone, Play full screen gives the game the whole screen.
Build notes
Open NOTES.md ↗ (opens in a new tab)- Original title: Tube Volley
- Inspired by: the Pong genre (two paddles and a ball)
- File:
games/10-tube-volley/index.html(one self-contained file, no network requests) - Built by: Job A, 2026-11-14
What I built
A one-player duel against a computer rival. The first side to reach 5 points takes the round. When you win a round, the next round starts with a faster and more accurate rival. When the rival wins a round, the game is over. Your score counts across rounds: 10 points or more for each return (longer rallies pay more), 100 points times the round number for each point you win, and 250 for each round.
Additions to the genre:
- The court turns with the screen. On a wide screen the paddles are on the left and right. On a tall phone the court stands upright and your paddle is at the bottom. The rules are the same.
- Spin. If your paddle is moving when it meets the ball, the ball curves in flight.
- Bumpers. From round 2, two drifting bumpers sit in the middle of the court. From round 4 there are three.
- The ball speeds up a little with every return.
Controls: move the mouse, slide a finger anywhere on the court, use the two arrow buttons, or use the arrow keys or W A S D.
Looks
- Neon Tube (main). Glass tubes on a dark brick wall. The paddles, walls, centre line, bumpers, and ball are glowing tubes with a white-hot core and small mounting caps. The score is a seven-segment sign made of tubes, with unlit segments still faintly visible. Tubes flicker now and then, flash when hit, and all dip when you lose a point. The light from the paddles and the ball spills onto the bricks.
- Pocket LCD. A grey-green handheld screen. Everything is made of dark squares with a soft shadow, the ball leaves faint ghost squares, and the score uses a 3 by 5 square font.
- Felt Table. A green felt table with a wooden rim under a warm lamp. Wooden bats with a red or blue face, a white ball with a shadow, chalk lines, and brass pegs for bumpers.
Techniques
- All art is drawn by code on a canvas.
- The neon glow is three strokes on top of each other: a wide soft glow, a tighter glow, and a thin white core. Light spill uses additive blending.
- The game works in its own court units and converts to screen positions at draw time. That is how one set of rules serves both the wide and the tall court.
- The ball moves in small steps inside each frame, so a fast ball cannot pass through a paddle.
- The rival predicts where the ball will arrive, including wall bounces, and then adds an aiming error that shrinks each round.
- Sound is generated with the Web Audio API.
What I am proud of
The neon look: the seven-segment tube sign, the flicker, and the coloured light on the bricks. Also the upright court on phones, which makes the game comfortable to play with one thumb.
Known issues
- The spin effect is easiest to produce with a mouse or a finger. With keys the paddle moves at one speed, so the curve is always the same strength.
- In the Pocket LCD look on a 375-pixel phone, the top bar text is tight. It fits, with a smaller font.
- I did not tune the difficulty with human players. Round 1 is meant to be easy; later rounds may be too hard or too easy.
Self-test
Tested with headless Chrome through .tools/selftest.js at 375x667 (upright court), 740x360, and 1440x900 (wide court). Result: all checks passed. A second scripted test confirmed the rules: five points for the player start round 2 with two bumpers, and five points for the rival end the game.
Issues found and fixed during testing:
- The "Restart" label was cut off in the Pocket LCD look on a 375-pixel phone. That look now uses a smaller button font on narrow screens.
- The start card was squeezed inside the playfield on small screens. The card now uses the whole stage area.

