Home › Devlog › Fragments
Devlog · Behind the Scenes

How I Made Fragments: From a Pixel Skull to 10 Bosses

Every game starts with a question. For Fragments, the question was a silly one: what if Phoenix and Arkanoid had a baby? Those two arcade classics ate a big part of my youth. One is about shooting down an alien fleet, the other about bouncing a ball into a wall of bricks. I wanted both in one game, and I wanted them to belong together, not just sit next to each other.

This is the story of how that idea turned into a game with ten bosses, twenty levels and one stubborn little skull.

The problem: why would you break a picture?

Gluing a shooter and a brick breaker together is easy. You play one, then the other. But that felt cheap. I needed a reason for the two halves to talk to each other.

The answer came from the name. What if the bricks were fragments of a picture, and you first had to win them back? In the shooter phase, golden ships carry pieces of the picture. Shoot them down and the pieces are yours. Let them escape and they are gone. Then the boss appears, built from the very pieces you collected. Beat it and the pieces fall into place as a wall of bricks, ready to be smashed.

Suddenly the shooter mattered for the breakout, and the breakout gave the shooter a purpose. That was the moment I knew the game would work.

Drawing bosses with a text editor

I am not a pixel artist. I can't hold a drawing tablet without feeling like a bear holding a pencil. So I drew the bosses the way we drew sprites in the eighties: as text. Every picture is a grid of 18 by 18 characters. A dot is empty space, a letter is a coloured pixel. Here is the Skull, the very first boss, exactly as it lives in the game's code:

{ name:'SKULL', pal:{ X:'#ece2c6' }, rows:[
  "......XXXXXX......",
  "....XXXXXXXXXX....",
  "...XXXXXXXXXXXX...",
  "..XXXXXXXXXXXXXX..",
  ".XXXXXXXXXXXXXXXX.",
  ".XXXXXXXXXXXXXXXX.",
  ".XXX....XX....XXX.",
  ".XX.....XX.....XX.",
  ".XX.....XX.....XX.",
  ".XXX...XXXX...XXX.",
  "..XXXXXXXXXXXXXX..",
  "..XXXXXX..XXXXXX..",
  "...XXXXX..XXXXX...",
  "....XXXXXXXXXX....",
  "....X.X.XX.X.X....",
  "....XXXXXXXXXX....",
  ".....X.XXXX.X.....",
  "......XXXXXX......",
]}

Squint and you can see it grinning at you. The Skull needs just one colour. Later bosses got richer palettes. The Rocket has seven colours, the Mushroom gets its red cap and white spots.

The best part is that one grid does three jobs. The game cuts it into fragments for the golden ships, wraps the same pixels around the mothership as spinning rings, and finally lays them out as bricks for the breakout phase. Draw a boss once, get a whole level.

The Alien mothership firing its Acid Spiral special attack
The Alien, drawn as an 18 by 18 grid, during its Acid Spiral.
The Octopus picture rebuilt as bricks in the breakout phase
The same kind of grid, now as breakable bricks.

Giving every boss a personality

Ten pictures that only differ in colour would get boring fast. So every boss got its own special attack that matches what it is. The Skull throws a Bone Storm. The Mushroom releases a Spore Cloud. The Spider sets a Web Trap, the Octopus hides the screen in an Ink Storm, the Robot draws a Laser Grid and the Pumpkin sends a Bat Swarm.

When a special attack starts, the picture inside the boss grows to three times its size and fills the screen for a few seconds. It's my favourite moment in the game. The picture you've been fighting for suddenly looks back at you, and it's angry.

The bosses don't give up in the breakout phase either. They keep fighting with seeds, spores, missiles and webs, and some of their attacks stun, slow or shrink your paddle. A brick breaker where the bricks fight back was something I had never played before, so I had to make it.

The rule that ties it all together

What should happen with the fragments you miss in the shooter phase? The obvious answer is to leave holes in the picture. But holes would make the breakout easier, which makes no sense. Playing badly would be rewarded.

So I turned it around. Missing pieces now stay in the picture as solid walls. The ball bounces off them, they can't be broken, and they make the level messier and harder. Now every golden ship you let escape comes back to haunt you later. It's a small rule, but it ties the whole game together.

Too hard, then just right

When other people first played the game, the verdict was clear: too hard. The waves were too fast, the enemies shot too often and the bosses had too much health.

I had fallen into the classic trap of every developer: after hundreds of hours of testing, I had become too good at my own game. So I took the numbers and made everything about 20 percent easier. Each wave got 20 percent more time, enemies became 10 percent slower, and both their fire rate and their toughness went down by a fifth. Then I added three difficulty levels on top, from a gentle Easy with an extra life to a Hard mode that pays double points.

For players who want a real challenge, there is the star round: levels 11 to 20 bring all ten bosses back, tougher than before, and only a perfect picture earns a gold star.

Sound of the eighties, made today

A retro game needs retro sound, but not the kind that hurts your ears. Fragments has four music tracks, for the menu, the shooter, the breakout and the boss fight, mixing synthwave and chiptune. On top of that sits an arcade announcer who shouts every power up you pick up, like the machines in smoky game halls used to do.

One file, no install

The whole game is a single web page. All the logic, all ten bosses and all the menus fit into about 200 kilobytes of code, plus images, music and one pixel font. That's more than the 48 kilobytes of my first computer, but still small enough to start in a second, on a laptop or on a phone. No download and no account needed.

What I learned

Try it yourself

Fragments is free to play in your browser. The guide has all the bosses, power ups and tips.

▶ Play Fragments

Read the Fragments guide →

More from the devlog

Krumbo the troll swinging his golf clubKrumbo Devlog #1 Chronicles Puzzle main menuAll devlog posts