Tämä on sellainen demo versio jossa ammutaan haulikolla kohteita. Oikeen kaksi kenttääkin
'välilyönti ampuu ja nuolet ohjaa SCREEN 13 W = 98: E = 3: R = 1: F = 0: G = 170: sou = 1: Hit = 0 nrj = 100: K = 103: L = 210 Z = 0 0 'ekan kentän tausta FOR X = 0 TO 200 FOR Y = 0 TO 320 Q = INT(RND * E) + W E = E + .0001 IF Q > 103.9 AND Q < 105 THEN Q = 103 IF X > 100 THEN W = L PSET (Y, X), Q NEXT Y: NEXT X Q = 150: O = 160 DIM A(10000) GET (0, 160)-(319, 199), A DIM S(10000) GET (0, 8)-(319, 110), S DIM D(5000) GET (0, 157)-(319, 169), D RANDOMIZE TIMER 'valitsee mihin mennään eka vai toka. 1 U = INT(RND * 200) + 15 Y = INT(RND * 10) + 1 IF Z = 1 THEN GOTO 2 IF Z = 2 THEN GOTO 5 IF F = 0 THEN GOTO 3 'eka kenttä 2 IF Y = 1 AND I < 1 AND Z = 1 THEN CIRCLE (U, 103), 7, 4, BF: PAINT (U, 103), 30, 4 CIRCLE (U, 103), 2, 4: PAINT (U, 103), 4: I = I + 1 END IF IF Y = 1 AND I < 1 AND Z = 2 THEN CIRCLE (U - 10, K), 4, 7, , , .2: U = U - .1: K = K - .1 END IF LOCATE 1, 1: PRINT "Hit"; Hit, nrj A$ = INKEY$ IF A$ = CHR$(0) + "M" THEN Q = Q + R: O = O + R: R = R + 1: PUT (0, 160), A, PSET GOTO 3 END IF IF A$ = CHR$(0) + "K" THEN Q = Q - R: O = O - R: R = R + 1: PUT (0, 160), A, PSET GOTO 3 END IF IF A$ = " " AND sou = 1 THEN SOUND 100, 1: SOUND 50, 1: SOUND 40, 1 END IF IF A$ = " " AND O > U - 3 AND O < U + 3 THEN Hit = Hit + 1: LINE (O - 4, G - 1)-(O, G - 10), 44 ' suuliekki LINE (O - 3, G - 1)-(O, G - 10), 43 LINE (O - 2, G - 1)-(O, G - 10), 43 LINE (O - 1, G - 1)-(O, G - 10), 42 LINE (O, G - 1)-(O, G - 10), 42 LINE (O + 1, G - 1)-(O, G - 10), 43 LINE (O + 2, G - 1)-(O, G - 10), 42 LINE (O + 3, G - 1)-(O, G - 10), 43 LINE (O + 4, G - 1)-(O, G - 10), 44: FOR Y = 1 TO 3000 NEXT Y: PUT (0, 157), D, PSET: PUT (0, 8), S, PSET: I = 0 END IF IF A$ = " " THEN LINE (O - 4, G - 1)-(O, G - 10), 44 LINE (O - 3, G - 1)-(O, G - 10), 43 LINE (O - 2, G - 1)-(O, G - 10), 43 LINE (O - 1, G - 1)-(O, G - 10), 42 LINE (O, G - 1)-(O, G - 10), 42 LINE (O + 1, G - 1)-(O, G - 10), 43 LINE (O + 2, G - 1)-(O, G - 10), 42 LINE (O + 3, G - 1)-(O, G - 10), 43 LINE (O + 4, G - 1)-(O, G - 10), 44: FOR Y = 1 TO 3000 NEXT Y: PUT (0, 157), D, PSET: GOTO 4' suuliekki END IF IF O > U - 3 AND O < U + 3 AND I > 0 THEN nrj = nrj - .01 END IF IF Hit = 1 THEN CLS : W = 32: E = 0: L = 116: Hit = 0: Z = 2: GOTO 0 END IF IF nrj < 0 THEN END IF A$ = CHR$(27) THEN END IF A$ = "R" THEN R = 1 IF R > 5 THEN R = 5 IF K < 0 THEN END IF Z = 2 AND Y = 2 THEN GOTO 2 IF I > 0 THEN GOTO 2 GOTO 1 3 : F = 1 IF Z = 0 THEN Z = 1 'tälläiset pitkät linerivit ovat aseen piirtämistä varten LINE (O,G)-(O,G+30),20: LINE (Q+ 9, G)-(Q + 9, G + 30), 21 LINE (Q+9,G)-(Q+8,G+30),22: LINE (Q+9,G)-(Q+7, G + 30), 23 LINE (Q+8,G)-(Q+6,G+30),24: LINE (Q+8,G)-(Q+5, G + 30), 25 LINE (Q+8,G)-(Q+4,G+30),26: LINE (Q+7,G)-(Q+3, G + 30), 25 LINE (Q+7,G)-(Q+2,G+30), 24: LINE (Q+7,G)-(Q+1,G + 30), 23 LINE (Q+6,G)-(Q,G+30), 22: LINE (Q+6,G)-(Q-1,G+30), 21 LINE (Q+6,G)-(Q-2,G+30), 20: LINE (Q+5,G)-(Q-3,G + 30), 19 LINE (Q+5,G)-(Q-4, G+30), 18: LINE (Q+5,G)-(Q-5,G+ 30), 17 LINE (O,G)-(O,G+30),20: LINE (Q+11,G)-(Q+ 11, G + 30), 21 LINE (Q+11,G)-(Q+12,G+30),22: LINE (Q+11,G)-(Q+13,G+30),23 LINE (Q+12,G)-(Q+14,G+30),24:LINE(Q+12,G)-(Q+15,G+30), 25 LINE (Q+12,G)-(Q+16,G+30),26:LINE (Q+13,G)-(Q+17,G+30), 25 LINE (Q+13,G)-(Q+18,G+30),24:LINE (Q+13,G)-(Q+19,G+30), 23 LINE (Q+14,G)-(Q+20,G+30),22:LINE (Q+14,G)-(Q+21,G+30), 21 LINE (Q+14,G)-(Q+22,G+30),20:LINE (Q+15,G)-(Q+23,G+30), 19 LINE (Q+15,G)-(Q+24,G+30),18:LINE (Q+15,G)-(Q+25,G+30), 17 IF Y = 1 AND I < 1 AND Z = 2 THEN CIRCLE (U,K),4,7, , , .2: U=U-.1:K=K-.1:PUT (0,8),S,PSET END IF IF Z = 1 THEN GOTO 2'ekaan kenttään IF Z = 2 THEN GOTO 5'tokaan kenttään 4 PUT (0, 160), A, PSET LINE (O,G)-(O,G+30),20:LINE (Q + 9, G)-(Q + 9, G + 30), 21 LINE (Q+9,G)-(Q+8,G+30),22:LINE (Q+9,G)-(Q+ 7, G + 30), 23 LINE (Q+8,G)-(Q+6,G+30),24:LINE (Q+8,G)-(Q+ 5, G + 30), 25 LINE (Q+8,G)-(Q+4,G+30),26:LINE (Q+7,G)-(Q+ 3, G + 30), 25 LINE (Q+7,G)-(Q+2,G+30),24:LINE (Q+7,G)-(Q+ 1, G + 30), 23 LINE (Q+6,G)-(Q,G+30),22:LINE (Q+6, G)-(Q - 1, G + 30), 21 LINE (Q+6,G)-(Q-2,G+30),20:LINE (Q+5,G)-(Q- 3, G + 30), 19 LINE (Q+5,G)-(Q-4,G+30),18:LINE (Q+5,G)-(Q- 5, G + 30), 17 LINE (O,G)-(O,G+30),20:LINE(Q+ 11, G)-(Q + 11, G + 30), 21 LINE (Q+11,G)-(Q+12,G+30),22:LINE (Q+11,G)-(Q+13,G+30), 23 LINE (Q+12,G)-(Q+14,G+30),24:LINE (Q+12,G)-(Q+15,G+30), 25 LINE (Q+12,G)-(Q+16,G+30),26:LINE (Q+13,G)-(Q+17,G+30), 25 LINE (Q+13,G)-(Q+18,G+30),24: LINE (Q+13,G)-(Q+19,G+30),23 LINE (Q+14,G)-(Q+20,G+30),22:LINE (Q+14,G)-(Q+21,G+30), 21 LINE (Q+14,G)-(Q+22,G+30),20:LINE (Q+15,G)-(Q+23,G+30), 19 LINE (Q+15,G)-(Q+24,G+30),18:LINE (Q+15,G)-(Q+25,G+30), 17 IF Y = 1 AND I < 1 AND Z = 2 THEN CIRCLE (U,K),4,7,,,.2:U=U-.1:K=K-.1:PUT (0, 8), S, PSET END IF IF H = 1 THEN G = G + 3 IF H = 2 THEN G = G - 3 FOR Y = 1 TO 5000: NEXT Y IF G = 176 THEN H = 2 IF G = 170 THEN H = 1 J = J + 1 IF J = 5 AND Z = 1 THEN J = 0: GOTO 2 IF J = 5 AND Z = 2 THEN J = 0: GOTO 5 GOTO 4 'toka kenttä 5 IF Y = 1 AND I < 1 AND Z = 2 THEN CIRCLE (U,K),4,7,,,.2:U=U-.1:K=K-.1:PUT (0,8),S, PSET END IF LOCATE 1, 1: PRINT "Hit"; Hit, nrj A$ = INKEY$ IF A$ = CHR$(0) + "M" THEN Q=Q+R:O=O+ R: R = R + 1: PUT (0, 160), A, PSET: GOTO 3 END IF IF A$ = CHR$(0) + "K" THEN Q=Q-R:O=O-R:R=R+1: PUT (0, 160), A, PSET: GOTO 3 END IF IF A$=" " AND sou=1 THEN SOUND 100,1:SOUND 50,1:SOUND 40,1 END IF IF A$ = " " AND O > U - 3 AND U + 3 THEN Hit=Hit + 1: K = 103: LINE (O - 4, G - 1)-(O, G - 10), 44 LINE (O-3, G-1)-(O,G-10),43:LINE (O-2,G-1)-(O,G - 10), 43 LINE (O-1,G-1)-(O,G-10),42:LINE (O,G - 1)-(O, G - 10), 42 LINE (O+1,G-1)-(O,G-10),43:LINE (O+2,G-1)-(O, G - 10), 42 LINE (O+3,G-1)-(O,G-10),43:LINE (O+4,G-1)-(O, G - 10), 44 FOR Y=1 TO 3000:NEXT Y:PUT (0,157),D,PSET PUT (0,8),S,PSET I = 0: GOTO 4 END IF IF A$ = " " THEN LINE (O-4,G-1)-(O,G-10),44:LINE (O-3,G-1)-(O, G - 10), 43 LINE (O-2,G-1)-(O,G-10),43:LINE (O-1,G-1)-(O, G - 10), 42 LINE (O,G-1)-(O,G-10),42:LINE (O+1,G-1)-(O,G- 10), 43 LINE (O+2,G-1)-(O,G-10),42:LINE (O+3,G-1)-(O,G-10), 43 LINE (O + 4, G - 1)-(O, G - 10), 44: FOR Y = 1 TO 3000 NEXT Y: PUT (0, 157), D, PSET: GOTO 4 END IF IF O > U - 3 AND O < U + 3 AND I > 0 THEN nrj = nrj - .01 IF Hit=10 THEN CLS : W=32:E=0:L=116:Hit=0:C=C+1: GOTO 0 IF nrj < 0 THEN END IF A$ = CHR$(27) THEN END IF A$ = "R" THEN R = 1 IF R > 5 THEN R = 5 IF K > 10 AND Y = 1 THEN GOTO 5 GOTO 1 W = 50: E = 5: R = 1 FOR X = 0 TO 200 FOR Y = 0 TO 320 Q = INT(RND * E) + W E = E + .0003: W = W - .002 PSET (Y, X), Q PALETTE Q, Q IF Q < 1 THEN END NEXT Y: NEXT X
No onko tämä minkään arvonen? Kommentteja siis.
Ihan siisti kyllä...
Aika hieno. Ihmeen hyvät graffat qb:llä...
Mä voisin saada grafiikoit vieläki paremmaks out käskyä hyväksi käyttäen. Joten päivittänen tämän...
en oo viel ehtiny kokeilemaa tätä mut kertokaa minkälaista tää oikee on
aika hauska mut toka maa vaikee
toi on nii pitkä ei jaksais kirjottaa tota kaikkee.
voiks mitenkää muuten noit tekstei saada tungettuu qbasicii
No tietenkin saa! Maalat tuon tekstin kursorilla, klikkaat oikeaa hiiren korvaa ja klikkaat kopioi. Ja sen jälkeen ota vaikka muistio esille ja otat vaikka sieltä muokkaa valikosta liitä. Ja sitten tallenna se nimella jotain.bas ja nyt voit avata sen qbasicilla.
ois kiva jos sais binaarit ni VB ohjelmoijaki näkis ton
unohtakaa
Aihe on jo aika vanha, joten et voi enää vastata siihen.