Worm Battle PvP

In-game screen.

Program listing on 48K Spectrum.

Text Listing

1 BORDER 3:
 POKE 23693,7:
 CLS :
 DIM t(2):
 DIM d(2):
 DIM c(2):
 DIM x(2,704):
 DIM y(2,704):
 LET h=1:
 LET x(1,1)=3:
 LET x(2,1)=28:
 LET y(1,1)=11:
 LET y(2,1)=11:
 LET d(2)=4:
 LET v=0:
 LET z=1:
 LET w=RND:
 LET g=1+h*(h<704):
 FOR r=1 TO 2:
 RESTORE :
 READ d,d,x,y,u,f,t:
 POKE (x<0 OR x>31 OR y<0 OR y>21 OR u<3)*23620,28:
 PRINT AT y(r,t),x(r,t);" " AND f=0;AT .5+w*20,.5+v*30; INK 6;"O" AND z=6; INK r;AT y,x;"o":
 READ x(r,g),y(r,g),c(r),t(r),d(r),z:
 NEXT r:
 READ h,v:
 POKE 23620,17:
 BORDER 3-r:
 DATA d(r)+SGN (IN (67582-3072*r)-IN (69630-6144*r)),d+8*((d<0)-(d>7)),x(r,h)+(d>6 OR d<2)-(d>2)*(d<6),y(r,h)+(d>4)-(d<4)*(d>0),ATTR (y,x),c(r)>-2,t(r)+1,x,y,c(r)+(u=6)*(3*w+1)-f,(t-f)*(t<704+f),d,z*(z<61)+1,g,w

Download the game

About the game

Einar Saukas had the idea to take the previously written game "Biscuit Snake" and develop this two player game from it. The resultant game was a collaborative effort between Einar Saukas and Digital Prawn. This is the first two player game we have put together for the one line competition. Keys can be chosen from any of the following:- Player 1: 1,2,3,4,5 - turn left, q,w,e,r,t - turn right. Player 2: y,u,i,o,p - turn left, 6,7,8,9,0 - turn right. In this game, each player controls a different coloured worm, blue for player 1, red for player 2. The object of this game is to survive longer than the other player. The player's worm gets killed either if (a) it hits the edge of the screen, (b) if its head hits the other worm, or (c) if its head hits part of its own body. Biscuits appear on the screen at random positions, at regular intervals. If a worm eats a biscuit, then its length will increase by a small random number of segments. This is advantageous to the player, as controlling a longer worm will give a greater chance of trapping the opponent, or inducing him to crash into you. When a player's worm gets killed, the game ends and the border colour changes to indicate the winner. The colour turns blue if player 1 has won, or red if player 2 has won.

Back to Sinclair stuff index