主题:[原创]做QB游戏的初学者必看!
phile
[专家分:2310] 发布于 2009-09-01 17:05:00
控键:方向键左右移动,空格发子弹。
(内附源代码)
这是一个初级游戏,多顶顶。
[em11][em11][em11]
回复列表 (共22个回复)
11 楼
神鬼天王 [专家分:30] 发布于 2009-09-15 19:03:00
好
13 楼
phile [专家分:2310] 发布于 2009-09-21 18:54:00
?
14 楼
nbshff [专家分:0] 发布于 2009-09-27 16:15:00
沙发
15 楼
phile [专家分:2310] 发布于 2009-09-27 19:06:00
?
17 楼
小勇士来了 [专家分:220] 发布于 2009-12-15 12: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
18 楼
phile [专家分:2310] 发布于 2010-06-23 15:14:00
很对
19 楼
日出日到日落 [专家分:0] 发布于 2010-06-27 21:35:00
(权相佑FANS必看)--WHY?
20 楼
phile [专家分:2310] 发布于 2010-07-07 15:41:00
楼上用哪国语言?
我来回复