Batmaster 2

In-game screen.

Program listing on 48K Spectrum.

Text Listing

1 DATA CODE INKEY$,x+(k=55)*(x<27)-(k=54)*(x>0),b,f=17,(a=0)-(a=31),a+c+c+4*p=x+2,q*((a>x)*(a<x+4)+r) OR f=0,c-2*c*(q*r OR p),d-d*2*v,a+c,b-d,ATTR (b,a)<7,d-d*2*z,b=20,s+z,s=93,l+t:
 BORDER 3:
 POKE 23693,7:
 LET o$=CHR$ 131:
 LET b$=" "+o$+o$+o$+" ":
 LET l=0:
 FOR x=1 TO 14:
 POKE USR "a"+x/.94,127+127*(x>7):
 NEXT x:
 CLS :
 LET s=0:
 LET a=2*INT (x/2)+1:
 LET b=15:
 FOR d=-5 TO 0:
 FOR c=s-15 TO 0:
 PRINT AT d+7,c+c-s; INK d+6;CHR$ 144;CHR$ 145:
 NEXT c:
 LET s=1-s:
 NEXT d:
 PRINT PAPER 2;AT 21,0;"    Score:";l*93+s,"    Level:";l+1,:
 RESTORE :
 READ k,x:
 PRINT AT 18,x;b$:
 READ f,q,p,r,v,c,d,a,b,z,d,w,s,t,l:
 PRINT AT f,a-c;" ";AT b,a;"o";" " AND z:
 BEEP w+(z+v OR p)/50,24*z:
 POKE (w=0)*23620,21-z-10*t

Download the game

About the game

Einar Saukas decided to take the earlier game batmaster as a starting point and develop this sequel from it which features quite a few improvements over the original. The keys are 6 - left, 7 - right. In this version, the bat has only one speed making it more challenging than the original. Just like in any other breakout clone the goal is to hit the ball with the bat, using it to knock out all of the bricks in the level. You only have one life. The horizontal ball direction may be reversed by hitting it right on the corner of the bat. On completing the level, a new level of bricks will appear, and the game continues.

Technical Notes

Firstly, the bricks in the game are UDG characters which Einar cleverly POKEd by using a mathematical expression, rather than the more usual DATA arrangement. It had to be done like this as RESTORE/READ/DATA is already in use within the main game loop. This game runs faster than the original partly due to removal of the two speed bat feature. This allowed erasing of the bat to be combined with the printing of the bat, and eliminated a couple of variables. Also, erasure of hit bricks was simplified. Further speed improvements were found and tested with the help of the profiling feature of the BASin development environment. Finally the score line was moved down to the bottom of the screen, as ATTR is no longer used for testing the top screen bounce in this version. The parameters for this game are 93 bricks per level, brick width is 2, bat width is 3 character positions.

Back to Sinclair stuff index