Devlog — a game with no image files
Open the game's files and you will not find a single PNG, sprite sheet or sound file in the game itself. Every fish, the hook, the coins, the seaweed, the sky, the water and every sound effect is produced by code while the game starts. This post explains how, and why it turned out to be a good fit for a small browser game.
Drawing fish with three shapes
The game is built with Phaser, which can draw shapes onto a canvas and then save the result as a texture — exactly as if it had loaded an image. When the game boots, a single loading step draws everything it needs and stores it.
A fish is three shapes and an eye:
- an ellipse for the body,
- a triangle behind it for the tail,
- a white circle with a smaller dark circle inside it for the eye.
Every measurement is derived from the fish's collision radius in the game data. A sardine has a radius of 10, so its body is 24 px long and 15 px tall; a pufferfish has a radius of 18 and comes out almost twice the size. The colour comes from the same data table: pale blue for sardines, orange for pufferfish, deep navy for swordfish. Add a new fish to the table and it gets a body, a tail and an eye automatically, sized to match its hitbox. The picture and the physics can never disagree, because they come from the same number.
The other small textures follow the same idea:
- The hook is a small ring with an arc drawn below it.
- A coin is a yellow circle with a paler circle on top, which reads as a shine.
- A splash particle is a white dot that the particle system scales down to nothing.
- Seaweed is a single line traced along a sine wave, so it already looks like it is mid-sway.
The scenery is drawn live
The background — sky, clouds, banded water, light rays, bubbles, the seabed and the little boat — is drawn as layers behind the gameplay, each at its own depth. The water darkens in steps the deeper you go, and the seabed sits exactly where your line runs out. Because it is drawn at runtime, the scenery adapts to whatever screen you have: a 540 px wide portrait phone and a 1280 px wide laptop get the same sea, laid out across their own width, with no stretched or cropped artwork. The reef pattern repeats every 540 px, so the portrait layout is always exactly the original composition and a wide screen simply sees more of it.
Sounds are numbers too
The sound effects come from ZzFX, a tiny sound synthesiser. Each sound is a list of about twenty numbers: volume, pitch, how fast it rises and decays, the wave shape, how much the pitch slides, and so on. The cast, the hook, a shot, a hit, a miss, a coin and a purchase are seven such lists. The game generates the waveform the moment it plays the sound.
That made tuning sound effects almost like tuning physics: change a number, listen, change it back. A shot needed to be short and noisy, so it uses a noise-like wave with a very short decay. The coin needed to sparkle, so it starts at a high pitch and slides upward.
What it buys
- Nothing to download for the art. The game itself makes no image or audio requests, so its art adds nothing to load time however slow the connection.
- Easy to change. Making a fish bigger or a sound brighter is an edit to one number, not a trip back to a drawing program.
- One source of truth. Fish size, colour and value all live in one data table, and the fish guide quotes exactly those values.
What it costs
Honesty matters here: code-drawn art has a ceiling. Simple shapes give the game a clean, toy-like look, but there are no detailed scales, no hand-painted backgrounds and no frame-by-frame animation. Every fish of a species looks identical. For a game whose personality comes from how things move — a chain of fish whipping around, a pufferfish drifting out of your crosshair — that trade is worth it. The motion is the art.
If you want to see how that motion is made, the fish chain devlog covers the physics side.