Mechanic · movement · multidirectional shooter, shoot 'em up
Screen wrap
Objects that leave one edge of the playfield come back at the opposite edge.
On this page
With screen wrap, the playfield has no edge to stop at. Asteroids wraps rocks, shots, and the ship both ways on one screen, but removes the saucer at a side edge1. Defender joins the ends of a world 2,048 pixels around2.
Games
| Game | Year | How | Note |
|---|---|---|---|
| Asteroids | 1979 | Both axes | rocks, ship, and shots wrap both ways; the saucer is removed at a side edge |
| Defender | 1981 | Looping world | a world 2,048 pixels around, joined through 16-bit coordinates |
Every claim about this mechanic, by game (2)
References
- ^ abEach frame, Asteroids adds the velocity of every object that isn't exploding (rocks, ship, saucer, and shots) to its position, on a playfield of 32 by 24 units of 256 (8,192 by 6,144 position units, computed). An object that crosses the left or right edge comes back on the other side, except the saucer, which is removed instead; one that crosses the top or bottom comes back at the other edge, the saucer included.CodeComputer Archeology, Asteroids
How we know
JSR $6F57 ; {}
content/Arcade/Asteroids/Code.md#L67 · upstream ↗ LDX #$22 LDA $0200,X ; {ram.statusAsteroids} BNE $6F62 ; {} DEX BPL $6F59 ; {} RTS BPL $6FC7 ; {}
content/Arcade/Asteroids/Code.md#L915-L921 · upstream ↗ LDA $0223,X ; {ram.horzVelAsteroids} … ADC $0269,X ; {ram.hposhAsteroids} CMP #$20 BCC $6FEC ; {} AND #$1F CPX #$1C BNE $6FEC ; {} JSR $702D ; {} … ADC $028C,X ; {ram.vposhAsteroids} CMP #$18 …
content/Arcade/Asteroids/Code.md#L968-L1016 · upstream ↗ LDA #$00 STA $021C ; {ram.statusSaucer} Saucer Flag
content/Arcade/Asteroids/Code.md#L1015-L1021 · upstream ↗ 99| 0200:021A | statusAsteroids | Asteroids 27-1 | ⋮ 101| 021C | statusSaucer | Saucer, 0 = No Saucer, 1 = Small Saucer, 2 = Large Saucer |
content/Arcade/Asteroids/RAMUse.md lines 99–101 at 1adc2a7 · upstream ↗ 1290269 - 028B Horizontal Position High (0-31), 0 = Left, 31 = Right ⋮ 141028C - 02AE Vertical Position High (0-23), 0 = Bottom, 23 = Top
content/Arcade/Asteroids/RAMUse.md lines 129–141 at 1adc2a7 · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-22.
Checked by a second AI model, 2026-10-22.
- ^ abDefender'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.Codemwenge/defender
How we know
480OX16 EQU $A ;16 BIT X WORLD COORD 481OY16 EQU $C ;16 BIT Y WORLD COORD
src/phr6.src lines 480–481 at e740063 · upstream ↗ 3333ISCAN LDD BGL 3334 SUBD #100*32 ;100 PIXEL LEFT BUFFER ⋮ 3345 ADDD OY16,X 3346 CMPA #YMIN ;WRAP AROUND 3347 BHS SCYV3 3348 LDA #YMAX 3349SCYV3 CMPA #YMAX 3350 BLS SCYV4 3351 LDA #YMIN 3352SCYV4 STD OY16,X ;ADD 8 TIMES VELOCITY 3353 LDD OXV,X ;UPDATE X POSITION ⋮ 3360 ADDD OX16,X ⋮
src/defa7.src lines 3333–3363 at e740063 · upstream ↗ 20YMAX EQU 240 21YMIN EQU 42 ;MIN Y COORD
src/phr6.src lines 20–21 at e740063 · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-22.
Checked by a second AI model, 2026-10-22.
Sources
Code
- Howell, Lonnie, Mark McDougall, and Christopher Cantrell. 2026. “Computer Archeology: Asteroids.” Commit 1adc2a7. topherCantrell/computerarcheology @ 1adc2a7 · licence, all uses
- Jarvis, Eugene, Sam Dicker, and Robert Hargreaves. 2023. “Defender (1981) by Eugene Jarvis and Sam Dicker: the 6809 source.” Commit e740063. mwenge/defender @ e740063 · licence, all uses