主题:原创]坦克之最
游戏简介:
这是一个双人对抗游戏
各有20条生命和25发高空炮,发完后只可进行零距离攻击
在两辆坦克相撞时可进行零距离攻击
如果两辆坦克距离很近,那么所发的高空炮就会打到外面去
按键:
1P: W上 A左 S下 D右 SPACE发射
2P: (辅助键区)8上 4左 5下 6右 ENTER发射
由于NT核心与DOS核心,在默认情况下运行DOS程序,速度有所差异(前者比后者快)
在玩游戏时按键p可加速以此来适应各个操作系统(默认速度为适合NT核心,修改后就不能再改回了)
游戏不完善之处请各位高手加以指教。
DECLARE SUB ankey2 (ke)
DECLARE SUB ankey1 (ke)
DECLARE SUB htu (b1!, b2!, b3!, b4!)
DECLARE SUB jz1 ()
DECLARE SUB jz2 ()
SCREEN 12
COLOR 9
LOCATE 1, 57: PRINT "IGDX tank - II"
'---ditu--
DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,0,0,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,1
DATA 1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1
DATA 1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1
DATA 1,0,0,1,0,0,1,1,1,1,1,0,0,0,0,0,1,0,0,1
DATA 1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1
DATA 1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1
DATA 1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1
DATA 1,0,0,1,1,1,1,0,0,0,1,1,1,1,0,0,1,0,0,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
DIM SHARED t1s(120), t2x(120), t3z(120), t4y(120)
DIM SHARED tas(120), tbx(120), tcz(120), tdy(120)
DIM SHARED zdy(40)
'hua si ge fang xiang de tank
't1 shang---------------
LINE (0, 0)-(27, 27), 0, BF
LINE (7, 11)-(21, 25), 2, BF
LINE (13, 2)-(15, 12), 2, BF
FOR i = 2 TO 12 STEP 2
LINE (7, 11 + i)-(9, 11 + i), 0
NEXT
FOR i = 2 TO 12 STEP 2
LINE (19, 11 + i)-(21, 11 + i), 0
NEXT
GET (0, 0)-(27, 27), t1s 'du ru shu zhu
't2 xia------------
LINE (0, 0)-(27, 27), 0, BF
LINE (7, 2)-(21, 16), 2, BF
LINE (13, 15)-(15, 25), 2, BF
FOR i = 2 TO 12 STEP 2
LINE (7, 2 + i)-(9, 2 + i), 0
NEXT
FOR i = 2 TO 12 STEP 2
LINE (19, 2 + i)-(21, 2 + i), 0
NEXT
GET (0, 0)-(27, 27), t2x
't3 zuo---------
LINE (0, 0)-(27, 27), 0, BF
LINE (11, 7)-(25, 21), 2, BF
LINE (2, 13)-(12, 15), 2, BF
FOR i = 2 TO 12 STEP 2
LINE (11 + i, 7)-(11 + i, 9), 0
NEXT
FOR i = 2 TO 12 STEP 2
LINE (11 + i, 19)-(11 + i, 21), 0
NEXT
GET (0, 0)-(27, 27), t3z
't4 --------------------
LINE (0, 0)-(27, 27), 0, BF
LINE (2, 7)-(16, 21), 2, BF
LINE (15, 13)-(25, 15), 2, BF
FOR i = 2 TO 12 STEP 2
LINE (2 + i, 7)-(2 + i, 9), 0
NEXT
FOR i = 2 TO 12 STEP 2
LINE (2 + i, 19)-(2 + i, 29), 0
NEXT
GET (0, 0)-(27, 27), t4y
'tk2-------------
'ta shang---------------
LINE (0, 0)-(27, 27), 0, BF
LINE (7, 11)-(21, 25), 4, BF
LINE (13, 2)-(15, 12), 4, BF
FOR i = 2 TO 12 STEP 2
LINE (7, 11 + i)-(9, 11 + i), 0
NEXT
FOR i = 2 TO 12 STEP 2
LINE (19, 11 + i)-(21, 11 + i), 0
NEXT
GET (0, 0)-(27, 27), tas
'tb xia------------
LINE (0, 0)-(27, 27), 0, BF
LINE (7, 2)-(21, 16), 4, BF
LINE (13, 15)-(15, 25), 4, BF
FOR i = 2 TO 12 STEP 2
LINE (7, 2 + i)-(9, 2 + i), 0
NEXT
FOR i = 2 TO 12 STEP 2
LINE (19, 2 + i)-(21, 2 + i), 0
NEXT
GET (0, 0)-(27, 27), tbx
'tc zuo---------
LINE (0, 0)-(27, 27), 0, BF
LINE (11, 7)-(25, 21), 4, BF
LINE (2, 13)-(12, 15), 4, BF
FOR i = 2 TO 12 STEP 2
LINE (11 + i, 7)-(11 + i, 9), 0
NEXT
FOR i = 2 TO 12 STEP 2
LINE (11 + i, 19)-(11 + i, 21), 0
NEXT
GET (0, 0)-(27, 27), tcz
'td you--------------------
LINE (0, 0)-(27, 27), 0, BF
LINE (2, 7)-(16, 21), 4, BF
LINE (15, 13)-(25, 15), 4, BF
FOR i = 2 TO 12 STEP 2
LINE (2 + i, 7)-(2 + i, 9), 0
NEXT
FOR i = 2 TO 12 STEP 2
LINE (2 + i, 19)-(2 + i, 29), 0
NEXT
GET (0, 0)-(27, 27), tdy
LINE (0, 0)-(27, 27), 0, BF
'zdy--------
CIRCLE (3, 3), 2, 12
PAINT (2, 3), 12
GET (1, 1)-(5, 5), zdy
LINE (0, 0)-(27, 27), 0, BF
'---------------
DIM SHARED tu%(20, 14)
FOR i = 1 TO 14
FOR j = 1 TO 20
READ tus
tu%(j, i) = tus
NEXT j, i
'hua tu --------------
FOR i = 1 TO 14 'hua di tu
FOR j = 1 TO 20
IF tu%(j, i) = 1 THEN
CALL htu(j * 28, i * 28, j * 28 + 28, i * 28 + 28)
END IF
NEXT j, i
这是一个双人对抗游戏
各有20条生命和25发高空炮,发完后只可进行零距离攻击
在两辆坦克相撞时可进行零距离攻击
如果两辆坦克距离很近,那么所发的高空炮就会打到外面去
按键:
1P: W上 A左 S下 D右 SPACE发射
2P: (辅助键区)8上 4左 5下 6右 ENTER发射
由于NT核心与DOS核心,在默认情况下运行DOS程序,速度有所差异(前者比后者快)
在玩游戏时按键p可加速以此来适应各个操作系统(默认速度为适合NT核心,修改后就不能再改回了)
游戏不完善之处请各位高手加以指教。
DECLARE SUB ankey2 (ke)
DECLARE SUB ankey1 (ke)
DECLARE SUB htu (b1!, b2!, b3!, b4!)
DECLARE SUB jz1 ()
DECLARE SUB jz2 ()
SCREEN 12
COLOR 9
LOCATE 1, 57: PRINT "IGDX tank - II"
'---ditu--
DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,0,0,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,1
DATA 1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1
DATA 1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1
DATA 1,0,0,1,0,0,1,1,1,1,1,0,0,0,0,0,1,0,0,1
DATA 1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1
DATA 1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1
DATA 1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1
DATA 1,0,0,1,1,1,1,0,0,0,1,1,1,1,0,0,1,0,0,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
DIM SHARED t1s(120), t2x(120), t3z(120), t4y(120)
DIM SHARED tas(120), tbx(120), tcz(120), tdy(120)
DIM SHARED zdy(40)
'hua si ge fang xiang de tank
't1 shang---------------
LINE (0, 0)-(27, 27), 0, BF
LINE (7, 11)-(21, 25), 2, BF
LINE (13, 2)-(15, 12), 2, BF
FOR i = 2 TO 12 STEP 2
LINE (7, 11 + i)-(9, 11 + i), 0
NEXT
FOR i = 2 TO 12 STEP 2
LINE (19, 11 + i)-(21, 11 + i), 0
NEXT
GET (0, 0)-(27, 27), t1s 'du ru shu zhu
't2 xia------------
LINE (0, 0)-(27, 27), 0, BF
LINE (7, 2)-(21, 16), 2, BF
LINE (13, 15)-(15, 25), 2, BF
FOR i = 2 TO 12 STEP 2
LINE (7, 2 + i)-(9, 2 + i), 0
NEXT
FOR i = 2 TO 12 STEP 2
LINE (19, 2 + i)-(21, 2 + i), 0
NEXT
GET (0, 0)-(27, 27), t2x
't3 zuo---------
LINE (0, 0)-(27, 27), 0, BF
LINE (11, 7)-(25, 21), 2, BF
LINE (2, 13)-(12, 15), 2, BF
FOR i = 2 TO 12 STEP 2
LINE (11 + i, 7)-(11 + i, 9), 0
NEXT
FOR i = 2 TO 12 STEP 2
LINE (11 + i, 19)-(11 + i, 21), 0
NEXT
GET (0, 0)-(27, 27), t3z
't4 --------------------
LINE (0, 0)-(27, 27), 0, BF
LINE (2, 7)-(16, 21), 2, BF
LINE (15, 13)-(25, 15), 2, BF
FOR i = 2 TO 12 STEP 2
LINE (2 + i, 7)-(2 + i, 9), 0
NEXT
FOR i = 2 TO 12 STEP 2
LINE (2 + i, 19)-(2 + i, 29), 0
NEXT
GET (0, 0)-(27, 27), t4y
'tk2-------------
'ta shang---------------
LINE (0, 0)-(27, 27), 0, BF
LINE (7, 11)-(21, 25), 4, BF
LINE (13, 2)-(15, 12), 4, BF
FOR i = 2 TO 12 STEP 2
LINE (7, 11 + i)-(9, 11 + i), 0
NEXT
FOR i = 2 TO 12 STEP 2
LINE (19, 11 + i)-(21, 11 + i), 0
NEXT
GET (0, 0)-(27, 27), tas
'tb xia------------
LINE (0, 0)-(27, 27), 0, BF
LINE (7, 2)-(21, 16), 4, BF
LINE (13, 15)-(15, 25), 4, BF
FOR i = 2 TO 12 STEP 2
LINE (7, 2 + i)-(9, 2 + i), 0
NEXT
FOR i = 2 TO 12 STEP 2
LINE (19, 2 + i)-(21, 2 + i), 0
NEXT
GET (0, 0)-(27, 27), tbx
'tc zuo---------
LINE (0, 0)-(27, 27), 0, BF
LINE (11, 7)-(25, 21), 4, BF
LINE (2, 13)-(12, 15), 4, BF
FOR i = 2 TO 12 STEP 2
LINE (11 + i, 7)-(11 + i, 9), 0
NEXT
FOR i = 2 TO 12 STEP 2
LINE (11 + i, 19)-(11 + i, 21), 0
NEXT
GET (0, 0)-(27, 27), tcz
'td you--------------------
LINE (0, 0)-(27, 27), 0, BF
LINE (2, 7)-(16, 21), 4, BF
LINE (15, 13)-(25, 15), 4, BF
FOR i = 2 TO 12 STEP 2
LINE (2 + i, 7)-(2 + i, 9), 0
NEXT
FOR i = 2 TO 12 STEP 2
LINE (2 + i, 19)-(2 + i, 29), 0
NEXT
GET (0, 0)-(27, 27), tdy
LINE (0, 0)-(27, 27), 0, BF
'zdy--------
CIRCLE (3, 3), 2, 12
PAINT (2, 3), 12
GET (1, 1)-(5, 5), zdy
LINE (0, 0)-(27, 27), 0, BF
'---------------
DIM SHARED tu%(20, 14)
FOR i = 1 TO 14
FOR j = 1 TO 20
READ tus
tu%(j, i) = tus
NEXT j, i
'hua tu --------------
FOR i = 1 TO 14 'hua di tu
FOR j = 1 TO 20
IF tu%(j, i) = 1 THEN
CALL htu(j * 28, i * 28, j * 28 + 28, i * 28 + 28)
END IF
NEXT j, i