主题:[原创]做QB游戏的初学者必看!
phile
[专家分:2310] 发布于 2009-09-01 17:05:00
控键:方向键左右移动,空格发子弹。
(内附源代码)
这是一个初级游戏,多顶顶。
[em11][em11][em11]
回复列表 (共22个回复)
沙发
phile [专家分:2310] 发布于 2009-09-02 17:09:00
最近没人上?
板凳
phile [专家分:2310] 发布于 2009-09-07 19:17:00
没人回!
3 楼
天天和和 [专家分:1420] 发布于 2009-09-07 21:51:00
是什么游戏啊?
4 楼
1054122 [专家分:750] 发布于 2009-09-08 17:55:00
射击游戏吧
CLS
RANDOMIZE TIMER
LOCATE 10, 30
PRINT "Loading..."
FOR i = 1 TO 5000000: NEXT i
CLS
INPUT "jibie,2~50"; n
DIM a(n)
CLS
FOR k = 1 TO 21
LOCATE k, 22
PRINT "|"
LOCATE k, 1
PRINT "|"
LOCATE 21, k
PRINT "-"
NEXT k
i = 18
j = 10
s1 = i
s2 = j
LOCATE i, j
PRINT " "; CHR$(4)
LOCATE i + 1, j
PRINT CHR$(4); CHR$(4); CHR$(4); CHR$(4); CHR$(4)
LOCATE i + 2, j
PRINT " "; CHR$(4); " "; CHR$(4)
a = INT(RND * 15) + 5
h = 1
GOSUB 100
s = 0
DO
kk = kk + 1
IF kk MOD 5 = 1 THEN
IF a <> 0 THEN
h = h + 1
IF h >= 20 THEN LOCATE 21, 1: PRINT "You lose!": END
GOSUB 100: GOSUB 200
ELSE
kk = 1
h = 1
a = INT(RND * 15) + 5
GOSUB 100
END IF
END IF
k$ = INKEY$
fff = 0
SELECT CASE k$
CASE CHR$(0) + "K"
j = j - 1
fff = 1
CASE CHR$(0) + "M"
j = j + 1
fff = 1
CASE CHR$(27)
EXIT DO
END SELECT
IF k$ = " " THEN
FOR k = i - 2 TO 1 STEP -1
LOCATE k, j + 2
PRINT "|"
FOR l = 1 TO 200000: NEXT l
IF k = h AND j + 2 = a THEN
a = 0: s = s + 1: LOCATE k, j + 2: PRINT " "
END IF
LOCATE k, j + 2
PRINT " "
NEXT k
ELSEIF fff = 1 THEN
IF i = 1 OR j = 1 OR i = 20 OR j = 18 THEN EXIT DO
LOCATE s1, s2
PRINT " "
LOCATE s1 + 1, s2
PRINT " "
LOCATE s1 + 2, s2
PRINT " "
FOR uu = 1 TO 20000: NEXT uu
LOCATE i, j
PRINT " "; CHR$(4)
LOCATE i + 1, j
PRINT CHR$(4); CHR$(4); CHR$(4); CHR$(4); CHR$(4)
LOCATE i + 2, j
PRINT " "; CHR$(4); " "; CHR$(4)
s1 = i
s2 = j
END IF
LOOP UNTIL s = n
LOCATE 21, 1
IF s = n THEN PRINT "You win!"
END
100
LOCATE h, a
PRINT CHR$(177)
RETURN
200
FOR oo = 1 TO 320000: NEXT oo
LOCATE h - 1, a
PRINT " "
RETURN
5 楼
天天和和 [专家分:1420] 发布于 2009-09-08 21:27:00
额 好玩吗?
6 楼
phile [专家分:2310] 发布于 2009-09-10 17:37:00
是的
7 楼
天天和和 [专家分:1420] 发布于 2009-09-11 20:57:00
我可不敢玩 一玩就死机
8 楼
phile [专家分:2310] 发布于 2009-09-12 10:14:00
不会
9 楼
天天和和 [专家分:1420] 发布于 2009-09-12 12:20:00
会的
好多次都是这样的
10 楼
phile [专家分:2310] 发布于 2009-09-13 09:55:00
你电脑有问题
我来回复