The instructions are in the game. You win if you complete level 8.
Tile scrolling, some of the health bar code, and a few other things are from @griffpatch. 4179 blocks. Some ideas are also from an Xbox game called 'Plate Up'.