1987 · Konami

Gradius

This minisite was curated by unorig, air.

Every sprite shape the game stores, 96 of them, from the Vic Viper to the last boss, drawn from the listing.

01 · The sprites

Ninety-six shapes in six kilobytes

The sprite shapes fill $2000-$37FF, 64 bytes each, numbered $80 to $DF by where they lie.

Shapes nothing uses

Each group is drawn from the listing's bytes in the colour, mode and size the game gives it on its stage.6 All of them are multicolour, with the two shared colours grey ($D025 = 12) and white ($D026 = 1). Where a mover gives several colours, the commonest is drawn and the others are named. A group of more than one shape steps through them, one shape every eight frames; the game's own order and rate vary with the mover.

The video chip finds a sprite's shape from a pointer byte at the end of the screen, $07F8 to $07FF: shape n lies at n × 64 in the chip's 16 KB bank, so shapes $80-$DF are $2000-$37FF. The game keeps a table of eight sprites of its own at $4074 and copies it to the chip each frame (draw_sprites, $40C4), each slot's shape being its base shape plus an animation step (spr_frame, spr_anim). Slot 0 is always the Vic Viper.

Most of the moving things are sprites, but not all. The fliers in formation, the rushers, the shots, the lasers, the missiles, the capsules and the explosions are characters, drawn into the screen and moved a cell at a time. Only eight sprites can be on a line, so the game saves them for the ship, its Options and the larger enemies.

02 · Drawn as characters

Fliers, capsules, shots and explosions

Much of what moves is not a sprite at all, but characters written into the screen and moved a whole cell at a time.

Each drawn from the listing's character set in the colours the game gives it, with stage 1's two shared multicolours (stage_colour1 and stage_colour2: brown and light grey) and its playfield row colour. The fliers' shapes live in the stage's own half of the character set, so each stage's fliers look different; these are stage 1's.

A thing drawn as characters costs no sprite, so any number can be on a line, but it moves eight pixels at a time and wipes out what it covers. The game keeps the characters an explosion or a flier covers and puts them back afterwards (move_explosions, $5C78), and spins the capsules by copying four new shapes over characters $78-$7B every fourth frame (spin_capsules, $7B33), so every capsule on the screen turns at once.

03 · The last boss

A boss drawn one dot at a time

The last boss's four shapes are emptied as the fight starts and drawn in again from a picture stored elsewhere, 25 dots a frame.

The picture at brain_picture ($9C49), 256 bytes laid out as the four shapes $BC-$BF, drawn double size in brown (colour 9) as place_brain sets them. The slider shows the shapes as they stand after that many frames, the dots going in in the order add_dot picks them, 25 a frame (grow_brain, $9985).5

clear_brain ($993B) empties the shapes at $2F00, so the boss starts invisible. Each frame, grow_brain calls add_dot 25 times, and each call copies one bit of the picture into the shapes. After 2,048 dots, 82 frames, the boss is whole and the fight begins.