| Defender moves its ship once per video frame: the interrupt calls the player routine once each time the beam passes line 128. Each call damps the horizontal velocity by 1/64 of itself, then a held thrust button adds 3/256 of a velocity unit in the facing direction (reverse negates it), and the velocity is held to ±1 unit. A unit is 256 world units, 8 pixels, a frame (the world has 32 units to a pixel). Since the damping runs every frame, thrust alone levels off at 3 × 64 = 192/256 of a unit, 6 pixels a frame, below the cap (computed). The source is the Red Label release. | README.md L75–77src/defa7.src L1931–1944src/defa7.src L1960–1962src/defa7.src L2336–2371src/defa7.src L2420–2431src/defa7.src L1249–1250src/defa7.src L3155–3164src/defa7.src L3333–3334 | Code |
| Up and down have no inertia in Defender: a held direction moves the ship 1 pixel a frame at once, rising by 8/256 of a pixel each frame to 2 pixels a frame (after 32 frames, computed), and letting go stops it. The ship stops climbing once at row 43 or higher, and descending at row 238 or lower. | src/defa7.src L2441–2476src/phr6.src L20–21 | Code |
| Defender's world is a loop: objects keep 16-bit X world coordinates, 32 units to a pixel, so the world is 65,536 units, 2,048 pixels, around and joins itself through 16-bit overflow (computed). Objects off the screen also wrap from the bottom (row 240) to the top (row 42) and back. | src/phr6.src L480–481src/defa7.src L3333–3363src/phr6.src L20–21 | Code |
| Defender's scanner draws every object, on the active and the inactive list alike, as a blip. Its left edge sits half the world (less 150 pixels) behind the screen's left edge, so the view stays at the scanner's middle. An object's offset from that edge, cut to its top 6 bits, and its row divided by 8 give the blip's screen address: 64 places across the whole world (computed). | src/amode1.src L1199–1200src/amode1.src L1236–1242src/amode1.src L1262–1275 | Code |
| A smart bomb works when none is already going off and the player has one left: it takes one and runs the collision routine of every active object that is on the screen and of type 0 or 1 (normal objects and landers picking someone up), destroying them. Objects of type 2 and up are skipped, among them the humanoids, type $10, "NON SMART BOMB". Players start with as many smart bombs as ships. | src/defa7.src L3173–3209src/phr6.src L476–496src/defb6.src L302src/defa7.src L1142–1147 | Code |
| Hyperspace works only in normal play (status bits other than the no-terrain bit clear). It clears the screen, removes the bullets, moves the view to a random place in the world, faces the ship a random way, sets a random height, and zeroes the ship's velocity. After the ship reappears and a pause, it dies if a random byte is above 192: 63 of 256 values, about 1 jump in 4 (computed). | src/defa7.src L3211–3278src/defa7.src L1319–1323 | Code |
| A Defender lander picks a humanoid from the target list and heads for it. Over it, the lander descends, grabs it, and climbs with it; at the top of the play area it pulls the humanoid inside, which kills the humanoid, and the lander becomes a mutant ("SCHITZO" in the source). Shooting a lander that carries a humanoid starts the humanoid falling. | src/defb6.src L688–710src/defb6.src L737–841src/defb6.src L903–911src/amode1.src L1144–1166 | Code |
| When the last humanoid dies, Defender blows up the planet's terrain. With no humanoids left, a lander that looks for a new target becomes a mutant, and new landers start as mutants. By the operator default, every fifth wave restores the humanoids to 10, the number each player starts with. | src/defb6.src L421–434src/defb6.src L626–656src/defb6.src L706–710src/defa7.src L1849–1863src/romc8.src L814src/defa7.src L1146–1147 | Code |
| A dropped humanoid falls faster each step, up to a limit. Touching it with the ship scores 500 and carries it under the ship, and setting it down on the ground scores 500 more. Left alone, it lands for 250 if its fall speed is $E0 or less, and dies if faster. At the end of each wave, each humanoid left scores 100 times the wave number, at most 500 (computed from the score calls). | src/defb6.src L925–962src/defb6.src L398–415src/defb6.src L499–508src/defa7.src L1822–1836 | Code |
| Defender reads each wave's enemies from a table with a column for each of waves 1 to 4: landers 15, 20, 20, 20; bombers 0, 3, 4, 5; pods 0, 1, 3, 4; no mutants or swarmers at the start; landers come in groups of 5. Later waves take the fourth column plus per-wave increments, which are 0 for these counts, so they keep the fourth wave's numbers (computed). | src/blk71.src L674–690src/defa7.src L1864–1900src/amode1.src L1144–1166src/mess0.src L271–274 | Code |
| Defender gives an extra ship and an extra smart bomb at each replay level: the level starts at the replay setting and rises by it each time it is passed. The operator default is 10,000 points, with 3 ships to a game. | src/defa7.src L510–526src/defa7.src L1152–1156src/romc8.src L801–802 | Code |