invaders
Space Invaders in sprites, ten levels of it, with music and a high score table.
Controls
Left and right push the ship, which has momentum, and Triangle fires. L1 pauses for as long as it is held, and Start and Select together quit. On the score screen Cross starts a new game and L1 and R1 together quit. If the invaders reach the bottom of the screen the program ends.
A port of L. Evans's Net Yaroze demo "invaders" (Sony, 1996): Space Invaders in sprites. Four rows of eight invaders march across the screen, dropping a line each time they reach a side, and one of them fires back now and then; the player's ship slides along the bottom and shoots upwards, no more than once every ten frames. Clearing the screen starts the next of ten levels, all alike, and an invader or a shot reaching the ship costs one of five lives. When they are gone, or the tenth level is cleared, the score and the high score table are shown. Behind the sprites a semi-transparent black box covers the screen, which the original uses to soften the black edges its sprites have, and the library's font prints the frame, the lives and the score. Music plays from a sequence off the disc.
Differences from the original:
- Positions and speeds are fixed point, with four bits of fraction, where the original has doubles. The only fraction in the game is the player's shot, which moves two and a half pixels a frame.
- The textures and the sound are read off the disc into the program's own memory, where the original's batch script sent them to fixed addresses. The sound comes from the check sample's files.
- An invader only fires when there is one to fire. The original picks one at random by dividing by how many are left, which is zero in the frame after the last is destroyed, and then indexes its arrays with what that gives.
- A shot that cannot be created, with all of them in flight, is not fired. The original writes the shot into the element before the first.
- The missing data is reported, where the original would hang.
Nothing allocates after startup.