ExperimentsFable 5.2 Retro Games

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.

  • Original title: Ink Rain
  • Inspired by: the Missile Command genre (point at the sky to stop things that fall on a row of homes)
  • File: games/08-ink-rain/index.html (one self-contained file, no network requests)
  • Built by: Job C, 2026-11-14 (started in one session, tested and finished in the next)

What I built

Black rain falls on a village of six homes. Three stone lanterns stand between the homes. You point at the sky, and the nearest lantern that has water sends a shot to that point. The shot opens into a round bloom of clear water. Any drop that touches the bloom is washed away. A drop that reaches the ground leaves a blot, and a blot on a home destroys it. The game ends when no home is left.

Additions to the genre:

  • Chains. A washed drop opens its own smaller bloom. That bloom can wash the next drop. Each link in the chain is worth more points and plays a higher note.
  • Water is limited. Each lantern holds 10 shots for each wave. Ten dots under the lantern show what is left. A blot on a lantern puts it out until the next wave.
  • Splitting drops. From wave 2, some drops carry a red ring. They split into two or three drops part of the way down.
  • Heavy drops from wave 4. They fall faster, make a larger blot, and are worth double.
  • The storm crow from wave 3. It crosses the sky and sheds drops. It is worth 150 points.
  • End of a wave. Unused water gives 5 points for each shot, and each home that stands gives 100 points. One lost home is rebuilt at every 3000 points.
  • The field changes shape. It is 480 by 360 on a wide screen and 360 by 480 on a tall screen.
  • Self-playing start screen. A simple defender plays behind the start card. It does not score and makes no sound.

Controls: with a mouse, point and click. With a touch screen, tap the sky. With keys, the arrow keys (or W A S D) move an aim mark and Space fires. There are no touch pads in this game, because a tap on the sky is the whole control.

Looks

  1. Sumi-e Ink (main). Rice paper with fibres, a pale red sun, mountain ridges painted as a wash with a dry-brush edge, bands of mist, bamboo, and a red seal. The drops are black teardrops with a tapering stroke. A bloom is an uneven ring of blue-grey water. Each bloom and each blot leaves a mark on the paper. The marks fade a little at the start of each wave, so the painting keeps a record of the game.
  2. Aurora Snow. A night sky with moving northern lights, snowy hills, cabins with lit windows, and beacon towers. The drops are embers. The blooms are rings of coloured light.
  3. Umbrella Town. A flat cartoon town with thick outlines under storm clouds. The drops are blue raindrops. Each bloom is a striped umbrella that opens and spins. The crow becomes a cross little cloud.

Techniques

  • All art is drawn by code on a canvas. No images.
  • The background is painted one time on a hidden canvas at the real screen resolution and copied each frame.
  • Ink blots are closed curves through 14 points at uneven distances from the centre, so no two have the same edge.
  • The stains use a second hidden canvas. A partial erase at the start of each wave fades them.
  • The ridge line is drawn as many short strokes of different widths with gaps, which gives the dry-brush edge.
  • The northern lights are a one-pixel gradient strip that is stretched many times each frame with additive blending.
  • Sound is generated with the Web Audio API. The note of a chain rises with each link.

What I am proud of

The stains. At the end of a hard wave, the paper shows where the fight happened. The chain rule also makes one well-placed shot more satisfying than many fast shots, and it fits the look: water that spreads in paper.

Known issues

  • With keys, the aim mark moves at one fixed speed. A mouse or a finger is faster.
  • A tap fires at the point of the tap. The player must aim ahead of a drop. There is no aim help.
  • Phone landscape: the playfield is about 400 by 300 pixels, because the height of the screen is the limit.
  • The stains exist only in the Sumi-e Ink look. They are cleared when the look or the window size changes.
  • I did not tune the difficulty of the later waves with human players.

Self-test

Tested with headless Chrome through .tools/selftest.js at 375x667, 740x360, and 1440x900. Result: all checks passed (no console errors, no network requests, start, pause, restart, all three looks, and the top bar and playfield inside the screen).

A second scripted test (.tools/t08.js) confirmed the rules: the start screen plays itself without scoring, a click sends water and the bloom washes a drop for 25 points, the shot uses one unit of water, a drop that lands on a home destroys it, a wave ends and gives the bonus, the game ends when no home is left, Enter restarts with score 0 and six homes, Space fires at the key aim mark, a look change keeps the game state, and the field turns tall on a tall window. Result: pass.

No defects were found in the second session. The first session's test screenshots were replaced by this run.