Среда, 18.10.2017, 03:18

..



Главная Регистрация Вход
Приветствую Вас, Гость · Браузер: « v»
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
Страница 1 из 11
Всё об «Электроника БК0010(-01), БК0011(М)»! » Языки программирования » Бейсик » Листинги игр » «Tunnel» [20.03.92] (Автор: RND corp. & DIA corp.)
«Tunnel» [20.03.92]
-=RUS=-Дата: Среда, 14.11.2012, 23:55 | Сообщение # 1
Генералиссимус
Группа: Администраторы
Сообщений: 350
Репутация: 1
Статус: Offline
;Листинг игры «Tunnel» на «Бейсике» для «БК0010-01»

1 POKE &O1000,&O12706
2 POKE &O1002,&O2000
3 POKE &O1004,&O12704
4 POKE &O1006,PEEK(&O2002)+1%
5 POKE &O1010,&O134
6 POKE 4%,&O1000
10 POKE -80%,64%
20 IF PEEK(32%)=0%TH?CHR¤(155%)
30 LV%=10%
40 K%=1%
50 SC%=0%
60 SP%=1%
70 PR%=1%
80 SE%=1%
90 SR%=1%
100 N%=1%
110 X2%=32%
120 X%=5%
130 Y%=120%
140 CLS
150 COLOR 4%
160 ? CHR¤(158%)CHR¤(140%)CHR¤(140%)
170 POKE 140%,-21931%
180 ? AT(1%,0%)"SCORE : 0000"AT(19%,0%)"SECTOR : 1"AT(21%,21%)"LIVES : 10"AT(11%,1%)"TIME : 0"
190 FOR T%=0%TO3%
200 GOSUB 1010
210 NEXT T%
220 DEF USR=&O30000
230 FOR I%=0%TO32%ST4%
240 POKE &O30074,I%
250 POKE &O30076,225%
260 A=USR(10%)
270 NEXT I%
280 GOSUB 1970
290 POKE 140%,-21931%
300 GOSUB 780
310 IF P%=1%THGOS660
320 IF INP(-50%,64%)TH420
330 A%=PEEK(-78%)
340 POKE &O30074,X%
350 POKE &O30076,Y%
360 A=USR(0%)
370 IF A%=8%ANDX%>1%THX%=X%-2%
380 IF A%=25%ANDX%<59%THX%=X%+2%
390 IF A%=26%ANDY%>68%THY%=Y%-8%
400 IF A%=27%ANDY%<172%THY%=Y%+8%
410 IF A%=32%THGOS610
420 IF H%=1%TH520
430 POKE &O30074,X%
440 POKE &O30076,Y%
450 A=USR(0%)
460 A%=PEEK(-52%)
470 IF A%=L%ANDX%>1%THX%=X%-2%
480 IF A%=RI%ANDX%<59%THX%=X%+2%
490 IF A%=UP%ANDY%>68%THY%=Y%-8%
500 IF A%=DO%ANDY%<172%THY%=Y%+8%
510 IF A%=W%THGOS610
520 POKE &O30074,X%
530 POKE &O30076,Y%
540 A=USR(10%)
550 IF PEEK(-78%)=7%THPO-80%,0%
560 IF PEEK(-78%)=7%TH END
570 K%=K%+1%
580 ? AT(11%,1%)"TIME :"K%" "
590 IF K%=500%THGOS1590
600 GOTO 300
610 POKE &O30074,X1%
620 POKE &O30076,Y1%
630 A=USR(0%)
640 X1%=X%+3%
650 Y1%=Y%
660 POKE &O30074,X1%
670 POKE &O30076,Y1%
680 A=USR(0%)
690 X1%=X1%+2%
700 IF X1%>59%THP%=0%
710 IF X1%>59%THRET
720 IF POINT(X1%*4%+8%,Y1%+2%)<4%ORPOINT(X1%*4%+10%,Y1%-16%)<4%ORPOINT(X1%*4%+15%,Y1%-8%)<4%THGOS1380
730 POKE &O30074,X1%
740 POKE &O30076,Y1%
750 A=USR(9%)
760 P%=1%
770 RETURN
780 FOR T%=0%TO3%
790 OUT -50%,64%,1%
800 POKE &O30074,X%(T%)
810 POKE &O30076,Y%(T%)
820 A=USR(0%)
830 IF X%(T%)<4%THGOS1010
840 ON N% GOSUB 1040 ,1060 ,1100 ,1120 ,1160 ,1180 ,1260 ,1220 ,1300 ,1340
850 POKE &O30074,X%(T%)
860 POKE &O30076,Y%(T%)
870 A=USR(SP%)
880 OUT -50%,64%,0%
890 NEXT T%
900 IF POINT(X%*4%+15%,Y%-8%)<4%ORPOINT(X%*4%+15%,Y%-16%)<4%ORPOINT(X%*4%+6%,Y%+2%)<4%THGOS1700
910 FOR I%=60%-O%TO-2%ST-4%
920 POKE &O30074,I%
930 POKE &O30076,40%
940 A=USR(SR%+10%)
950 POKE &O30076,200%
960 IF SR%=6%THA=USR(19%T%)=X%(T%)-2%
1090 RETURN
1100 X%(T%)=X%(T%)-4%
1110 RETURN
1120 IF W%(T%)=0%THY%(T%)=Y%(T%)+5%ELIFW%(T%)=1%THY%(T%)=Y%(T%)-5%
1130 IF Y%(T%)<65%THW%(T%)=0%ELIFY%(T%)>175%THW%(T%)=1%
1140 X%(T%)=X%(T%)-1%
1150 RETURN
1160 IF X%(T%)<15%THX%(T%)=X%(T%)-1%ELX%(T%)=X%(T%)-4%
1170 RETURN
1180 IF Y%(T%)Y%THY%(T%)=Y%(T%)-3%
1190 GOSUB 2460
1200 X%(T%)=X%(T%)-3%
1210 RETURN
1220 IF X%(T%)<22%THY%(T%)=Y%(T%)-7%ELY%(T%)=Y%(T%)+8%
1230 IF Y%(T%)>175%THY%(T%)=175%
1240 X%(T%)=X%(T%)-3%
1250 RETURN
1260 Y%(T%)=Y%(T%)+SGN(RND(1%)-.5!)*6%
1270 GOSUB 2460
1280 X%(T%)=X%(T%)-2%
1290 RETURN
1300 IF Y%(T%)Y1%-30%THY%(T%)=Y%(T%)+10%
1310 IF Y%(T%)>175%THY%(T%)=175%
1320 IF Y%(T%)=175%THX%(T%)=X%(T%)-4%ELX%(T%)=X%(T%)-1%
1330 RETURN
1340 IF X%(T%)<20%ANDT%>1%THY%(T%)=Y%(T%)-8%ELIFX%(T%)<27%ANDT%<=1%THY%(T%)=Y%(T%)+8%
1350 GOSUB 2460
1360 X%(T%)=X%(T%)-3%
1370 RETURN
1380 FOR T%=0%TO3%
1390 IF Y%(T%)>Y1%-20%ANDY%(T%)X1%-%ANDX%(T%) 1400 IF Y%(T%)>Y1%-20%ANDY%(T%)X1%-%ANDX%(T%) 1410 NEXT T%
1420 RETURN
1430 POKE &O30074,X%(T%)
1440 POKE &O30076,Y%(T%)
1450 A=USR(20%)
1460 FOR J%=0%TO14%
1470 FOR R%=J%/2%TOJ%-40%
1480 OUT -50%,64%,1%
1490 OUT -50%,64%,0%
1500 NEXT R%,J%
1510 POKE &O30074,X%(T%)
1520 POKE &O30076,Y%(T%)
1530 A=USR(0%)
1540 SC%=SC%+10%
1550 ? AT(1%,0%)"SCORE :"SC%" "
1560 PR%=PR%+1%
1570 IF PR%>20%THGOS18"0
1580 RETURN
1590 N%=N%+1%
1600 SE%=SE%+1%
1610 IF SE%>20%TH2400
1620 ? AT(19%,0%)"SECTOR :"SE%
1630 SP%=SP%+1%
1640 SR%=SR%+1%
1650 K%=0%
1660 IF SP%>8%THSP%=RND(1%)*8%+1%
1670 IF SR%>8%THSR%=RND(1%)*8%+1%
1680 IF N%>10%THN%=RND(1%)*10%+1%
1690 RETURN
1700 FOR O%=0%TO40%
1710 OUT -50%,64%,1%
1720 FOR A%=30%TOO%ST-1%
1730 OUT -50%,64%,0%
1740 NEXT A%,O%
1750 POKE &O30074,X2%
1760 POKE &O30076,225%
1770 A=USR(0%)
1780 X2%=X2%-4%
1790 LV%=LV%-1%
1800 ? AT(21%,21%)"LIVES :"LV%
1810 IF X2%<-4%TH2430
1820 RETURN
1830 X2%=X2%+4%
1840 IF X2%>32%THX2%=32%
1850 LV%=LV%+1%
1860 IF LV%>10%THLV%=10%
1870 ? AT(21%,21%)"LIVES :"LV%
1880 POKE &O30074,X2%
1890 POKE &O30076,225%
1900 A=USR(10%)
1910 FOR U%=1%TO100%
1920 OUT -50%,64%,1%
1930 OUT -50%,64%,0%
1940 NEXT U%
1950 PR%=1%
1960 RETURN
1970 FOR I%=0%TO60%ST4%
1980 POKE &O30074,I%
1990 POKE &O30076,40%
2000 A=USR(11%)
2010 POKE &O30076,200%
2020 A=USR(11%)
2030 NEXT I%
2040 S¤="TUNNEL"
2050 FOR I%=0%TOLEN(S¤)-1%
2060 POKE 140%,-4370%
2070 ? AT(0%,0%)MID¤(S¤,I%+1%,1%)
2080 FOR IY%=1%TO8%
2090 FOR IX%=1%TO5%
2100 IF POINT(IX%,IY%)=4%TH2150
2110 FOR IH%=0%TO3%
2120 POKE 140%,NOT(PEEK(140%))
2130 LINE (65%+IX%*3%+I%*20%,70%+IY%*4%+IH%)-@(3%,0%)
2140 NEXT IH%
2150 NEXT IX%,IY%,I%
2160 ? AT(0%,0%)" "AT(8%,11%)"BY © RND corp."AT(9%,13%)"JOYSTICK [Y/N]"
2170 IF INP(-50%,64%)TH2170ELA%=PEEK(-78%)
2180 IF A%=89%TH2190 ELIFA%=78%TH2370 EL2170
2190 ? AT(11%,15%)"←→↑↓W"
2200 L%=PEEK(-52%)
2210 IF L%=0%TH2190
2220 ? AT(11%,16%)CHR¤(127%)
2230 RI%=PEEK(-52%)
2240 IF RI%=L%ORRI%=0%TH2230
2250 ? AT(12%,16%)CHR¤(127%)
2260 UP%=PEEK(-52%)
2270 IF UP%=RI%ORUP%=0%TH2260
2280 ? AT(13%,16%)CHR¤(127%)
2290 DO%=PEEK(-52%)
2300 IF DO%=UP%ORDO%=0%TH2290
2310 ? AT(14%,16%)CHR¤(127%)
2320 W%=PEEK(-52%)
2330 IF W%=0%ORW%=DO%TH2320
2340 ? AT(5%,7%)TAB(200%)TAB(130%)
2350 H%=0%
2360 RETURN
2370 ? AT(5%,7%)TAB(250%)TAB(130%)
2380 H%=1%
2390 RETURN
2400 POKE 140%,-1%
2410 ? AT(10%,10%)"ВЫ СУПЕРМАН"
2420 IF INP(-50%,64%)TH2420 EL10
2430 POKE 140%,-1%
2440 ? AT(11%,11%)"ВЫ ПОГИБЛИ"
2450 IF INP(-50%,64%)TH2450EL1
2460 IF Y%(T%)<65%THY%(T%)=65%ELIFY%(T%)>175%THY%(T%)=175%
2470 RETURN


 
Всё об «Электроника БК0010(-01), БК0011(М)»! » Языки программирования » Бейсик » Листинги игр » «Tunnel» [20.03.92] (Автор: RND corp. & DIA corp.)
Страница 1 из 11
Поиск:

-=RUS=-
ICQ: 320867225