Forum Życie Wieczne Strona Główna Życie Wieczne

 
 FAQFAQ   SzukajSzukaj   UżytkownicyUżytkownicy   GrupyGrupy   GalerieGalerie   RejestracjaRejestracja 
 ProfilProfil   Zaloguj się, by sprawdzić wiadomościZaloguj się, by sprawdzić wiadomości   ZalogujZaloguj 

Gra w QuickBasic-u
Idź do strony 1, 2, 3, 4, 5  Następny
 
Napisz nowy temat   Odpowiedz do tematu    Forum Życie Wieczne Strona Główna -> Offtopic
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Piotr-246
Gość






PostWysłany: Wto 21:23, 05 Sty 2021    Temat postu: Gra w QuickBasic-u

SCREEN 13
FOR i = 0 TO 255: PRINT i; "-"; CHR$(i);
NEXT i

PRINT

PRINT CHR$(176)
PRINT CHR$(177)
PRINT CHR$(178)
PRINT CHR$(15)
PRINT CHR$(219)
PRINT CHR$(2)
PRINT


REM ****************************** pomieszczenie

a$ = CHR$(176) + CHR$(176) + CHR$(176) + CHR$(176)
b$ = a$ + a$ + a$ + a$
c$ = " "

COLOR 12

PRINT b$; b$; a$; a$

FOR i = 1 TO 4
PRINT CHR$(176); " "; c$; c$; CHR$(176)
NEXT i

PRINT CHR$(176); a$; a$; a$; " "; a$; a$; a$; a$; a$; CHR$(176)

FOR i = 1 TO 4
PRINT CHR$(176); " "; c$; c$; CHR$(176)
NEXT i

PRINT CHR$(176); a$; a$; a$; a$; a$; " "; a$; a$; a$; CHR$(176)


FOR i = 1 TO 4
PRINT CHR$(176); " "; c$; CHR$(176); " "; CHR$(176)
NEXT i
PRINT CHR$(176); a$; a$; a$; " "; a$; a$; a$; a$; a$; CHR$(176)


FOR i = 1 TO 5
PRINT CHR$(176); " "; CHR$(176); " "; CHR$(176)
NEXT i

PRINT b$; b$; a$; a$

LOCATE 10, 10: PRINT CHR$(2)


x = 10: y = 10
xs = 10: ys = 10
REM *************************** petla glowna


petla:
k$ = INKEY$
IF k$ = "" THEN GOTO petla

REM PRINT k$; : IF k$ <> "" THEN PRINT ASC(k$);

IF k$ = CHR$(27) THEN END

IF k$ = CHR$(0) + "M" THEN x = x + 1
IF k$ = CHR$(0) + "K" THEN x = x - 1
IF k$ = CHR$(0) + "H" THEN y = y - 1
IF k$ = CHR$(0) + "P" THEN y = y + 1

REM ************ sprawdzenie czy wolno wykonac ruch

pobrany = SCREEN(y, x)
IF pobrany <> 32 THEN x = xs: y = ys: FOR i = 85 TO 80 STEP -1: SOUND i, .07: NEXT i: GOTO petla

REM ************* kasowanie starego obrazka

LOCATE ys, xs: COLOR 14: PRINT " ";

REM ************* rysowanie nowego obrazka

LOCATE y, x: PRINT CHR$(2)

xs = x: ys = y

GOTO petla
Powrót do góry
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Piotr-246
Gość






PostWysłany: Śro 14:06, 06 Sty 2021    Temat postu:

SCREEN 13

REM ****************************** pomieszczenie

COLOR 9

PRINT "#######################################"
PRINT "# # # # # # # # # # # #"
PRINT "### ### ### # # # ### # # # # ### # ###"
PRINT "# # # # # # # # # # # # # #"
PRINT "# # ### ##### ####### ####### ##### #"
PRINT "# # # # # # # # # # # # # #"
PRINT "##### # # # # ### # # ##### # ###"
PRINT "# # # # # # # # # # # # # #"
PRINT "# ##### # # ##### ### ####### ##### # #"
PRINT "# # # # # # # # # # # #"
PRINT "#### ### # # ####### ##### # # #"
PRINT "# # # # # # # # # # # # # # # #"
PRINT "# ### ####### ####### # # ### ### #####"
PRINT "# # # # # # # # # #"
PRINT "# # ##### # # ### ######### ### ### # #"
PRINT "# # # # # # # # # # #"
PRINT "##### ##### # ### # ##### ### # #"
PRINT "# # # # # # # # # # # # #"
PRINT "### # ### ##### ### ### ##### # # ###"
PRINT "# # # # # # # # # # # #"
PRINT "# ### # ### # ### # # # ### ### ### # #"
PRINT "# # # # # # # # # # #"
PRINT "#######################################"
COLOR 12

LOCATE 5, 4: PRINT "";
LOCATE 20, 2: PRINT "";
LOCATE 10, 4: PRINT "";
LOCATE 10, 6: PRINT "";

LOCATE 15, 10: PRINT "";
LOCATE 20, 12: PRINT "";
LOCATE 10, 10: PRINT "";
LOCATE 12, 8: PRINT "";

LOCATE 5, 22: PRINT "";
LOCATE 15, 20: PRINT "";
LOCATE 10, 24: PRINT "";
LOCATE 12, 26: PRINT "";

LOCATE 19, 35: PRINT "";
LOCATE 10, 37: PRINT "";
LOCATE 12, 35: PRINT "";
LOCATE 8, 32: PRINT "";




REM ************************* wspolrzedne startowe

x = 10: y = 10
xs = 10: ys = 10
LOCATE y, x: COLOR 14: PRINT CHR$(2)

REM *************************** petla glowna

petla:
k$ = INKEY$
IF k$ = "" THEN GOTO petla

REM PRINT k$; : IF k$ <> "" THEN PRINT ASC(k$);

IF k$ = CHR$(27) THEN END

IF k$ = CHR$(0) + "M" THEN x = x + 1
IF k$ = CHR$(0) + "K" THEN x = x - 1
IF k$ = CHR$(0) + "H" THEN y = y - 1
IF k$ = CHR$(0) + "P" THEN y = y + 1

REM ************ sprawdzenie czy wolno wykonac ruch

pobrany = SCREEN(y, x)
IF pobrany = 3 THEN SOUND 250, .5: SOUND 150, .5: GOTO ruch
IF pobrany <> 32 THEN x = xs: y = ys: GOTO petla

ruch:
SOUND 39, .025
REM ************* kasowanie starego obrazka

LOCATE ys, xs: COLOR 14: PRINT " ";

REM ************* rysowanie nowego obrazka

LOCATE y, x: PRINT CHR$(2)

xs = x: ys = y

GOTO petla
Powrót do góry
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Piotr-246
Gość






PostWysłany: Śro 15:22, 06 Sty 2021    Temat postu:

SCREEN 13

REM ****************************** pomieszczenie

COLOR 9

PRINT "#######################################"
PRINT "#...#.....#.#...#...#...#.....#...#...#"
PRINT "###.#####.#.#.###.#.#.###.#.#####.#.###"
PRINT "#.#...#...........#.......#.#...#.....#"
PRINT "#.#...###.#####.#######.#######.#####.#"
PRINT "#...#.#...#.#...#.#.#.#.#.......#.#...#"
PRINT "#####.#.#.#.#.###.#...#.#.#####.#...###"
PRINT "#...#...#...#...#.#.#.#.#...#.#...#.#.#"
PRINT "#.#####.#.#.#####.###.#######.#####.#.#"
PRINT "#.....#.#.#.#...#.#.......#...#.#.#...#"
PRINT "####....###.#.#...#######.#####.#...#.#"
PRINT "#...#.#.#.#...#.#.#...#.#.#...# #.#.#.#"
PRINT "#.###.###.###.#######.#.#.###.###.#####"
PRINT "#.....#...#.#...#.......#.....#.#...#.#"
PRINT "#.#.##### #.#.###.#########.###.###.#.#"
PRINT "#.#.......#...# #.. #.#.#.........#.#.#"
PRINT "#####.#####.#.....###.#.#####.###.#...#"
PRINT "#...#.....#.#.#.# #...#.#.#.....#...#.#"
PRINT "###.#.###.#####.###.###...#####.#.#.###"
PRINT "#.......#.......#.#...#.#.#.....#.#.#.#"
PRINT "#.###.#.###.#.###.#.#.#.###.###.###.#.#"
PRINT "#.#...#...#.#.......#.......#.....#...#"
PRINT "#######################################"

REM ***************************** serduszka

COLOR 12

FOR i = 1 TO 20
x = INT(RND(1) * 19)
y = INT(RND(1) * 11)
LOCATE (y + 1) * 2, (x + 1) * 2: PRINT CHR$(3);
NEXT i


REM ************************* wspolrzedne startowe

x = 10: y = 10
xs = 10: ys = 10
LOCATE y, x: COLOR 14: PRINT CHR$(2)

REM *************************** petla glowna

petla:
k$ = INKEY$
IF k$ = "" THEN GOTO petla

REM PRINT k$; : IF k$ <> "" THEN PRINT ASC(k$);

IF k$ = CHR$(27) THEN END

IF k$ = CHR$(0) + "M" THEN x = x + 1
IF k$ = CHR$(0) + "K" THEN x = x - 1
IF k$ = CHR$(0) + "H" THEN y = y - 1
IF k$ = CHR$(0) + "P" THEN y = y + 1

REM ************ sprawdzenie czy wolno wykonac ruch

pobrany = SCREEN(y, x)
IF pobrany = 3 THEN SOUND 250, .5: SOUND 150, .5: GOTO ruch
IF pobrany = 46 THEN GOTO ruch

IF pobrany <> 32 THEN x = xs: y = ys: GOTO petla

REM ***************** ruch

ruch:
SOUND 100, .025: SOUND 30000, .025: SOUND 100, .025: SOUND 30000, .025
REM ************* kasowanie starego obrazka

LOCATE ys, xs: COLOR 14: PRINT " ";

REM ************* rysowanie nowego obrazka

LOCATE y, x: PRINT CHR$(2)

xs = x: ys = y

GOTO petla
Powrót do góry
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Piotr-246
Gość






PostWysłany: Śro 16:04, 06 Sty 2021    Temat postu:

SCREEN 13
DIM pom$(10 TO 32)

REM ****************************** pomieszczenie

pom$(10) = "#######################################"
pom$(11) = "#...#.....#.#...#...#...#.....#.-.#...#"
pom$(12) = "###.#####.#.#.###.#.#.###.#.#####.#.###"
pom$(13) = "#.#...#...........#.......#.#...#.....#"
pom$(14) = "#.#...###.#####.#######.#######.#####.#"
pom$(15) = "#...#.#...#.#...#.#.#.#.#.......#.#...#"
pom$(16) = "#####.#.#.#.#.###.#...#.#.#####.#...###"
pom$(17) = "#...#...#...#...#.#.#.#.#...#.#...#.#.#"
pom$(1Cool = "#.#####.#.#.#####.###.#######.#####.#.#"
pom$(19) = "#.....#.#.#.#...#.#...-...#...#.#.#...#"
pom$(20) = "####....###.#.#...#######.#####.#...#.#"
pom$(21) = "#...#.#.#.#...#.#.#...#.#.#...#.#.#.#.#"
pom$(22) = "#.###.###.###.#######.#.#.###.###.#####"
pom$(23) = "#.....#...#.#...#.......#.....#.#...#.#"
pom$(24) = "#.#.#####.#.#.###.#########.###.###.#.#"
pom$(25) = "#.#.......#...#.#...#.#.#.........#.#.#"
pom$(26) = "#####.#####.#.....###.#.#####.###.#...#"
pom$(27) = "#...#.....#.#.#.#.#...#.#.#.....#...#.#"
pom$(2Cool = "###.#.###.#####.###.###...#####.#.#.###"
pom$(29) = "#.......#.......#.#...#.#.#.....#.#.#.#"
pom$(30) = "#.###.#.###.#.###.#.#.#.###.###.###.#.#"
pom$(31) = "#.#...#...#.#.......#.......#.....#...#"
pom$(32) = "#######################################"

COLOR 9
FOR i = 10 TO 32
a$ = pom$(i)
FOR x = 1 TO LEN(a$):
b$ = MID$(a$, x, 1)
IF b$ = "#" THEN COLOR 7: PRINT CHR$(176);
IF b$ = "." THEN COLOR 1: PRINT CHR$(32);
IF b$ = "-" THEN COLOR 15: PRINT CHR$(4);
NEXT x
PRINT
NEXT i
REM ***************************** serduszka

COLOR 12

FOR i = 1 TO 20
x = INT(RND(1) * 19)
y = INT(RND(1) * 11)
LOCATE (y + 1) * 2, (x + 1) * 2: PRINT CHR$(3);
NEXT i


REM ************************* wspolrzedne startowe

x = 10: y = 10
xs = 10: ys = 10
LOCATE y, x: COLOR 14: PRINT CHR$(2)

REM *************************** petla glowna

petla:
k$ = INKEY$
IF k$ = "" THEN GOTO petla

REM PRINT k$; : IF k$ <> "" THEN PRINT ASC(k$);

IF k$ = CHR$(27) THEN END

IF k$ = CHR$(0) + "M" THEN x = x + 1
IF k$ = CHR$(0) + "K" THEN x = x - 1
IF k$ = CHR$(0) + "H" THEN y = y - 1
IF k$ = CHR$(0) + "P" THEN y = y + 1

REM ************ sprawdzenie czy wolno wykonac ruch

pobrany = SCREEN(y, x)
IF pobrany = 3 THEN SOUND 250, .5: SOUND 150, .5: GOTO ruch
IF pobrany = 4 THEN SOUND 1150, .5: SOUND 250, .5: GOTO ruch

IF pobrany = 46 THEN GOTO ruch

IF pobrany <> 32 THEN x = xs: y = ys: GOTO petla

REM ***************** ruch

ruch:
SOUND 100, .025: SOUND 30000, .025: SOUND 100, .025: SOUND 30000, .025
REM ************* kasowanie starego obrazka

LOCATE ys, xs: COLOR 14: PRINT " ";

REM ************* rysowanie nowego obrazka

LOCATE y, x: PRINT CHR$(2)

xs = x: ys = y

GOTO petla
Powrót do góry
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Piotr-246
Gość






PostWysłany: Śro 17:58, 06 Sty 2021    Temat postu:

SCREEN 13
DIM pom$(10 TO 32)

REM ****************************** pomieszczenie

pom$(10) = "OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"
pom$(11) = "O-..#.....#.#...#...#...#.....#.-.#...O"
pom$(12) = "O##.#####.#.#.###.#.#.###.#.#####.#.##O"
pom$(13) = "O.#...#:..........#.......#.#...#.....O"
pom$(14) = "O.#...###.#####.#######.#######.#####.O"
pom$(15) = "O...#.#...#.#...#.#.#.#.#.......#.#...O"
pom$(16) = "O####.#.#.#.#.###.#...#.#.#####.#...##O"
pom$(17) = "O.-.#...#...#...#.#.#.#.#...#.#...#.#:O"
pom$(18) = "O.#####.#.#.#####.###.#######.#####.#.O"
pom$(19) = "O.....#.#.#.#...#.#...-...#...#.#.#...O"
pom$(20) = "O###....###.#.#...#######.#####.#...#.O"
pom$(21) = "O...#.#.#.#...#.#.#:..#.#.#...#.#.#.#.O"
pom$(22) = "O.###.###.###.#######.#.#.###.###.####O"
pom$(23) = "O.....#...#.#...#.......#.....#.#...#.O"
pom$(24) = "O.#.#####.#.#.###.#########.###.###.#.O"
pom$(25) = "O.#....:..#...#.#...#.#.#.........#.#.O"
pom$(26) = "O####.#####.#:....###.#.#####.###.#...O"
pom$(27) = "O...#.....#.#.#.#.#...#.#.#.....#...#.O"
pom$(28) = "O##.#.###.#####.###.###...#####.#.#.##O"
pom$(29) = "O.......#.......#.#...#.#.#.....#.#.#.O"
pom$(30) = "O.###.#.###.#.###.#.#.#.###.###.###.#.O"
pom$(31) = "O.#...#.:.#.#.......#.......#-....#...O"
pom$(32) = "OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"


FOR i = 10 TO 32
a$ = pom$(i)
FOR x = 1 TO LEN(a$):
b$ = MID$(a$, x, 1)
IF b$ = "O" THEN COLOR 15: PRINT CHR$(177);
IF b$ = "#" THEN COLOR 7: PRINT CHR$(176);
IF b$ = "." THEN COLOR 1: PRINT CHR$(32);
IF b$ = "-" THEN COLOR 15: PRINT CHR$(4);
IF b$ = ":" THEN COLOR 12: PRINT CHR$(3);
NEXT x
PRINT
NEXT i


REM ************************* wspolrzedne startowe

x = 10: y = 10
xs = 10: ys = 10
LOCATE y, x: COLOR 14: PRINT CHR$(2)

REM *************************** petla glowna

petla:
k$ = INKEY$
IF k$ = "" THEN GOTO petla

REM PRINT k$; : IF k$ <> "" THEN PRINT ASC(k$);

IF k$ = CHR$(27) THEN END

IF k$ = CHR$(0) + "M" THEN x = x + 1
IF k$ = CHR$(0) + "K" THEN x = x - 1
IF k$ = CHR$(0) + "H" THEN y = y - 1
IF k$ = CHR$(0) + "P" THEN y = y + 1

REM ************ sprawdzenie czy wolno wykonac ruch

pobrany = SCREEN(y, x)
IF pobrany = 3 THEN SOUND 250, .5: SOUND 150, .5: GOTO ruch
IF pobrany = 4 THEN SOUND 1150, .5: SOUND 250, .5: GOTO ruch

IF pobrany = 46 THEN GOTO ruch

IF pobrany <> 32 THEN x = xs: y = ys: GOTO petla

REM ***************** ruch

ruch:
SOUND 100, .025: SOUND 30000, .025: SOUND 100, .025: SOUND 30000, .025
REM ************* kasowanie starego obrazka

LOCATE ys, xs: COLOR 14: PRINT " ";

REM ************* rysowanie nowego obrazka

LOCATE y, x: PRINT CHR$(2)

xs = x: ys = y

GOTO petla
Powrót do góry
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Piotr-246
Gość






PostWysłany: Śro 21:04, 06 Sty 2021    Temat postu:

SCREEN 13
DIM pom$(10 TO 32)

REM ****************************** pomieszczenie

pom$(10) = "OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"
pom$(11) = "O-..#.....#.#...#...#...#.....#.-.#...O"
pom$(12) = "O##.#####.#.#.###.#.#.###.#.#####.#.##O"
pom$(13) = "O.#...#:..........#.......#.#...#.....O"
pom$(14) = "O.#...###.#####.#######.#######.#####.O"
pom$(15) = "O...#.#...#.#...#.#.#.#.#.......#.#...O"
pom$(16) = "O####.#.#.#.#.###.#...#.#.#####.#...##O"
pom$(17) = "O.-.#...#...#...#.#.#.#.#...#.#...#.#:O"
pom$(18) = "O.#####.#.#.#####.###.#######.#####.#.O"
pom$(19) = "O.....#.#.#.#...#.#...-...#...#.#.#...O"
pom$(20) = "O####...###.#.#...#######.#####.#...#.O"
pom$(21) = "O...#.#.#.#...#:#.#:..#.#.#...#.#.#.#.O"
pom$(22) = "O.###.###.###.#######.#.#.###.###.####O"
pom$(23) = "O.....#...#.#...#.......#....-#.#...#.O"
pom$(24) = "O.#.#####.#.#.###.#########.###.###.#.O"
pom$(25) = "O.#....:..#...#.#...#.#.#.........#.#.O"
pom$(26) = "O####.#####.#:....###.#.#####.###.#...O"
pom$(27) = "O...#.....#.#.#.#.#...#.#.#.....#...#.O"
pom$(28) = "O##.#.###.#####.###.###...#####.#.#.##O"
pom$(29) = "O.......#.......#.#...#.#.#.....#.#.#.O"
pom$(30) = "O.###.#.###.#.###.#.#.#.###.###.###.#.O"
pom$(31) = "O.#...#.:.#.#..:....#.......#-....#:..O"
pom$(32) = "OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"


FOR i = 10 TO 32
a$ = pom$(i)
FOR x = 1 TO LEN(a$):
b$ = MID$(a$, x, 1)
IF b$ = "O" THEN COLOR 102: PRINT CHR$(177);
IF b$ = "#" THEN COLOR 9: PRINT CHR$(176);
IF b$ = "." THEN COLOR 1: PRINT CHR$(32);
IF b$ = "-" THEN COLOR 15: PRINT CHR$(4);
IF b$ = ":" THEN COLOR 12: PRINT CHR$(3);
NEXT x
PRINT
NEXT i


REM ************************* wspolrzedne startowe

x = 10: y = 10
xs = 10: ys = 10
LOCATE y, x: COLOR 14: PRINT CHR$(2)
licz = -1

REM *************************** petla glowna

petla:
REM czas
se$ = MID$(TIME$, 7, 2)
se = VAL(se$)
IF se <> ses THEN licz = licz + 1
ses = se
LOCATE 24, 2: COLOR 15: PRINT "Czas:"; licz;

k$ = INKEY$
IF k$ = "" THEN GOTO petla

REM PRINT k$; : IF k$ <> "" THEN PRINT ASC(k$);

IF k$ = CHR$(27) THEN END

IF k$ = CHR$(0) + "M" THEN x = x + 1
IF k$ = CHR$(0) + "K" THEN x = x - 1
IF k$ = CHR$(0) + "H" THEN y = y - 1
IF k$ = CHR$(0) + "P" THEN y = y + 1

REM ************ sprawdzenie czy wolno wykonac ruch

pobrany = SCREEN(y, x)
IF pobrany = 3 THEN SOUND 250, .5: SOUND 150, .5: GOTO ruch
IF pobrany = 4 THEN SOUND 1150, .5: SOUND 550, .5: GOTO ruch

IF pobrany = 46 THEN GOTO ruch

IF pobrany <> 32 THEN x = xs: y = ys: GOTO petla

REM ***************** ruch

ruch:
SOUND 100, .025: SOUND 30000, .025: SOUND 100, .025: SOUND 30000, .025
REM ************* kasowanie starego obrazka

LOCATE ys, xs: COLOR 14: PRINT " ";

REM ************* rysowanie nowego obrazka

LOCATE y, x: PRINT CHR$(2)

xs = x: ys = y

GOTO petla
Powrót do góry
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Piotr-246
Gość






PostWysłany: Czw 7:20, 07 Sty 2021    Temat postu:

SCREEN 13
REM blue green red max=63
PALETTE 100, 63 * 65536 + 31 * 256 + 15
PALETTE 101, 63 * 65536 + 15 * 256 + 0
DIM pom$(10 TO 32)

REM ****************************** pomieszczenie

pom$(10) = "OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"
pom$(11) = "O-..#.....#.#...#...#...#.....#.-.#...O"
pom$(12) = "O##.#####.#.#.###.#.#.###.#.#####.#.##O"
pom$(13) = "O.#...#:..........#.......#.#...#.....O"
pom$(14) = "O.#...###.#####.#######.#######.#####.O"
pom$(15) = "O...#.#...#.#...#.#.#.#.#.......#.#...O"
pom$(16) = "O####.#.#.#.#.###.#...#.#.#####.#...##O"
pom$(17) = "O.-.#...#...#...#.#.#.#.#...#.#...#.#:O"
pom$(18) = "O.#####.#.#.#####.###.#######.#####.#.O"
pom$(19) = "O.....#.#.#.#...#.#...-...#...#.#.#...O"
pom$(20) = "O####...###.#.#...#######.#####.#...#.O"
pom$(21) = "O...#.#.#.#...#:#.#:..#.#.#...#.#.#.#.O"
pom$(22) = "O.###.###.###.#######.#.#.###.###.####O"
pom$(23) = "O.....#...#.#...#.......#....-#.#...#.O"
pom$(24) = "O.#.#####.#.#.###.#########.###.###.#.O"
pom$(25) = "O.#....:..#...#.#...#.#.#.........#.#.O"
pom$(26) = "O####.#####.#:....###.#.#####.###.#...O"
pom$(27) = "O...#.....#.#.#.#.#...#.#.#.....#...#.O"
pom$(28) = "O##.#.###.#####.###.###...#####.#.#.##O"
pom$(29) = "O.......#.......#.#...#.#.#.....#.#.#.O"
pom$(30) = "O.###.#.###.#.###.#.#.#.###.###.###.#.O"
pom$(31) = "O.#...#.:.#.#..:....#.......#-....#:..O"
pom$(32) = "OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"


FOR i = 10 TO 32
a$ = pom$(i)
FOR x = 1 TO LEN(a$):
b$ = MID$(a$, x, 1)
IF b$ = "O" THEN COLOR 100: PRINT CHR$(177);
IF b$ = "#" THEN COLOR 101: PRINT CHR$(176);
IF b$ = "." THEN COLOR 1: PRINT CHR$(32);
IF b$ = "-" THEN COLOR 15: PRINT CHR$(4);
IF b$ = ":" THEN COLOR 12: PRINT CHR$(3);
NEXT x
PRINT
NEXT i


REM ************************* wspolrzedne startowe

x = 10: y = 10
xs = 10: ys = 10
LOCATE y, x: COLOR 14: PRINT CHR$(2)
licz = -1

REM *************************** petla glowna

petla:
REM czas
se$ = MID$(TIME$, 7, 2)
se = VAL(se$)
IF se <> ses THEN licz = licz + 1
ses = se
LOCATE 24, 2: COLOR 15: PRINT "Czas:"; licz;

k$ = INKEY$
IF k$ = "" THEN GOTO petla

REM PRINT k$; : IF k$ <> "" THEN PRINT ASC(k$);

IF k$ = CHR$(27) THEN END

IF k$ = CHR$(0) + "M" THEN x = x + 1
IF k$ = CHR$(0) + "K" THEN x = x - 1
IF k$ = CHR$(0) + "H" THEN y = y - 1
IF k$ = CHR$(0) + "P" THEN y = y + 1

REM ************ sprawdzenie czy wolno wykonac ruch

pobrany = SCREEN(y, x)
IF pobrany = 3 THEN SOUND 250, .5: SOUND 150, .5: GOTO ruch
IF pobrany = 4 THEN SOUND 1150, .5: SOUND 550, .5: GOTO ruch

IF pobrany = 46 THEN GOTO ruch

IF pobrany <> 32 THEN x = xs: y = ys: GOTO petla

REM ***************** ruch

ruch:
SOUND 100, .025: SOUND 30000, .025: SOUND 100, .025: SOUND 30000, .025
REM ************* kasowanie starego obrazka

LOCATE ys, xs: COLOR 14: PRINT " ";

REM ************* rysowanie nowego obrazka

LOCATE y, x: PRINT CHR$(2)

xs = x: ys = y

GOTO petla
Powrót do góry
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Piotr-246
Gość






PostWysłany: Czw 11:33, 07 Sty 2021    Temat postu:

SCREEN 13
REM blue green red max=63
PALETTE 100, 63 * 65536 + 31 * 256 + 15
PALETTE 101, 63 * 65536 + 15 * 256 + 0
DIM pom$(10 TO 32)

REM *************************dane pomieszczenia


pom$(10) = "OOOOOOOOOOOOOOOOOOOO"
pom$(11) = "I-..X.....T.X...T..Y"
pom$(12) = "I##.X####.T.X.###..Y"
pom$(13) = "I.T.X.T:....X......Y"
pom$(14) = "I.T.X.###.##X##.F.#Y"
pom$(15) = "I.....T...T.X...F..Y"
pom$(16) = "OOOOO.T.T.T.X.##F..Y"
pom$(17) = "I.-.T...T.......F..Y"
pom$(18) = "I.#####.T.T.OOOOOOOO"
pom$(19) = "I.....T.T.T.T...T..Y"
pom$(20) = "OOOOO...###.T.T....Y"
pom$(21) = "I...F.T.T.T...T:F..Y"
pom$(22) = "I.###.###.###.OOOOOO"
pom$(23) = "I.....T...T.F...F..Y"
pom$(24) = "I.T.#####.T.F.###..Y"
pom$(25) = "I.T....:..T...T.F..Y"
pom$(26) = "OOOOOOOO###.T:.....Y"
pom$(27) = "I...T.....T.T.T.OOOO"
pom$(28) = "I##.T.X##.#####.T..Y"
pom$(29) = "I.....X.T..........Y"
pom$(30) = "I.###.X.###.T.###..Y"
pom$(31) = "I.T...X.:.F.T..:...Y"
pom$(32) = "OOOOOOOOOOOOOOOOOOOO"




REM rysowanie pomieszczenia
FOR i = 10 TO 32
a$ = pom$(i)
FOR x = 1 TO LEN(a$):
b$ = MID$(a$, x, 1)

COLOR 100: REM mur glowny

IF b$ = "O" THEN PRINT CHR$(177); CHR$(177);
IF b$ = "I" THEN PRINT CHR$(177); CHR$(32);
IF b$ = "Y" THEN PRINT CHR$(32); CHR$(177);
IF b$ = "X" THEN PRINT CHR$(177); CHR$(32);

COLOR 101: REM mur drugorzedny

IF b$ = "#" THEN PRINT CHR$(176); CHR$(176);
IF b$ = "T" THEN PRINT CHR$(176); CHR$(32);
IF b$ = "F" THEN PRINT CHR$(32); CHR$(176);

COLOR 1: REM puste miejsce

IF b$ = "." THEN PRINT CHR$(32); CHR$(32);

REM inne elementy

IF b$ = "-" THEN COLOR 15: PRINT CHR$(4); CHR$(32);
IF b$ = ":" THEN COLOR 12: PRINT CHR$(3); CHR$(32);
NEXT x
PRINT
NEXT i


REM ************************* wspolrzedne startowe

x = 10: y = 10
xs = 10: ys = 10
LOCATE y, x: COLOR 14: PRINT CHR$(2)
licz = -1

REM *************************** petla glowna

petla:
REM czas
se$ = MID$(TIME$, 7, 2)
se = VAL(se$)
IF se <> ses THEN licz = licz + 1
ses = se
LOCATE 24, 2: COLOR 15: PRINT "Czas:"; licz;

k$ = INKEY$
IF k$ = "" THEN GOTO petla

REM PRINT k$; : IF k$ <> "" THEN PRINT ASC(k$);

IF k$ = CHR$(27) THEN END

IF k$ = CHR$(0) + "M" THEN x = x + 1
IF k$ = CHR$(0) + "K" THEN x = x - 1
IF k$ = CHR$(0) + "H" THEN y = y - 1
IF k$ = CHR$(0) + "P" THEN y = y + 1

REM ************ sprawdzenie czy wolno wykonac ruch

pobrany = SCREEN(y, x)
IF pobrany = 3 THEN SOUND 250, .5: SOUND 150, .5: GOTO ruch
IF pobrany = 4 THEN SOUND 1150, .5: SOUND 550, .5: GOTO ruch

IF pobrany = 46 THEN GOTO ruch

IF pobrany <> 32 THEN x = xs: y = ys: GOTO petla

REM ***************** ruch

ruch:
SOUND 100, .025: SOUND 30000, .025: SOUND 100, .025: SOUND 30000, .025
REM ************* kasowanie starego obrazka

LOCATE ys, xs: COLOR 14: PRINT " ";

REM ************* rysowanie nowego obrazka

LOCATE y, x: PRINT CHR$(2)

xs = x: ys = y

GOTO petla
Powrót do góry
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Piotr-246
Gość






PostWysłany: Czw 13:08, 07 Sty 2021    Temat postu:

SCREEN 13

REM ************************* wspolrzedne startowe

x = 10: y = 10
xs = 10: ys = 10
licz = -1
room = 1

REM blue green red max=63
PALETTE 100, 63 * 65536 + 31 * 256 + 15
PALETTE 101, 63 * 65536 + 15 * 256 + 0
DIM pom$(10 TO 32)

REM ************************* skok do danych pomieszczenia

rysuj:
IF room = 1 THEN GOSUB room1
IF room = 2 THEN GOSUB room2

REM rysowanie pomieszczenia
CLS
FOR i = 10 TO 32
a$ = pom$(i)
FOR xc = 1 TO LEN(a$):
b$ = MID$(a$, xc, 1)

COLOR 100: REM mur glowny

IF b$ = "O" THEN PRINT CHR$(177); CHR$(177);
IF b$ = "I" THEN PRINT CHR$(177); CHR$(32);
IF b$ = "Y" THEN PRINT CHR$(32); CHR$(177);
IF b$ = "X" THEN PRINT CHR$(177); CHR$(32);

COLOR 101: REM mur drugorzedny

IF b$ = "#" THEN PRINT CHR$(176); CHR$(176);
IF b$ = "T" THEN PRINT CHR$(176); CHR$(32);
IF b$ = "F" THEN PRINT CHR$(32); CHR$(176);

COLOR 1: REM puste miejsce

IF b$ = "." THEN PRINT CHR$(32); CHR$(32);

REM inne elementy

IF b$ = "-" THEN COLOR 15: PRINT CHR$(4); CHR$(32);
IF b$ = ":" THEN COLOR 12: PRINT CHR$(3); CHR$(32);
NEXT xc
PRINT
NEXT i
LOCATE y, x: COLOR 14: PRINT CHR$(2);
REM *************************** petla glowna

petla:
REM czas
se$ = MID$(TIME$, 7, 2)
se = VAL(se$)
IF se <> ses THEN licz = licz + 1
ses = se
LOCATE 24, 2: COLOR 15: PRINT "Czas:"; licz;

k$ = INKEY$
IF k$ = "" THEN GOTO petla

REM PRINT k$; : IF k$ <> "" THEN PRINT ASC(k$);

IF k$ = CHR$(27) THEN END

IF k$ = CHR$(0) + "M" THEN x = x + 1
IF k$ = CHR$(0) + "K" THEN x = x - 1
IF k$ = CHR$(0) + "H" THEN y = y - 1
IF k$ = CHR$(0) + "P" THEN y = y + 1

REM ************ sprawdzenie czy wolno wykonac ruch

IF x = 41 THEN x = 2: xs = 2: room = room + 1: GOTO rysuj
IF x = 0 THEN x = 39: xs = 39: room = room - 1: GOTO rysuj
pobrany = SCREEN(y, x)
IF pobrany = 3 THEN SOUND 250, .5: SOUND 150, .5: GOTO ruch
IF pobrany = 4 THEN SOUND 1150, .5: SOUND 550, .5: GOTO ruch

IF pobrany = 46 THEN GOTO ruch

IF pobrany <> 32 THEN x = xs: y = ys: GOTO petla

REM ***************** ruch

ruch:
SOUND 100, .025: SOUND 30000, .025: SOUND 100, .025: SOUND 30000, .025
REM ************* kasowanie starego obrazka

LOCATE ys, xs: COLOR 14: PRINT " ";

REM ************* rysowanie nowego obrazka

LOCATE y, x: PRINT CHR$(2)

xs = x: ys = y

GOTO petla

REM *************************dane pomieszczen

room1:
pom$(10) = "OOOOOOOOOOOOOOOOOOOO"
pom$(11) = "I-..X.....T.X...T..Y"
pom$(12) = "I##.X####.T.X.###..Y"
pom$(13) = "I.T.X.T:....X......Y"
pom$(14) = "I.T.X.###.##X##.F.#Y"
pom$(15) = "I.....T...T.X...F..."
pom$(16) = "OOOOO.T.T.T.X.##F..Y"
pom$(17) = "I.-.T...T.......F..Y"
pom$(18) = "I.#####.T.T.OOOOOOOO"
pom$(19) = "I.....T.T.T.T....T.Y"
pom$(20) = "OOOOO...###.T.T....Y"
pom$(21) = "I...F.T.T.T...T:F..."
pom$(22) = "I.###.###.###.OOOOOO"
pom$(23) = "I.....T...T.F....F.Y"
pom$(24) = "I.T.#####.T.F.####.Y"
pom$(25) = "I.T....:..T...T..F.Y"
pom$(26) = "OOOOOOOO###.T:.....Y"
pom$(27) = "I...T.....T.T.T.OOOO"
pom$(28) = "I##.T.X##.#####.T..Y"
pom$(29) = "I.....X.T..........Y"
pom$(30) = "I.###.X.###.T.###..Y"
pom$(31) = "I.T...X.:.F.T..:...."
pom$(32) = "OOOOOOOOOOOOOOOOOOOO"
RETURN

room2:
pom$(10) = "OOOOOOOOOOOOOOOOOOOO"
pom$(11) = "I-..X.....T.X...T..Y"
pom$(12) = "I...X.###.T.X......Y"
pom$(13) = "I...X..:....X......Y"
pom$(14) = "I...X###.###X##.F..Y"
pom$(15) = "......T...T.X...F..Y"
pom$(16) = "I.........T.X.##F..Y"
pom$(17) = "I.-.T.......X...F..Y"
pom$(18) = "I.#.##X.....X......Y"
pom$(19) = "I.....X.....X...T..Y"
pom$(20) = "I.....X.....X......Y"
pom$(21) = "....F.X..-..X..:F..Y"
pom$(22) = "I...#.X.....OOOOO..Y"
pom$(23) = "I.....X.....X...F..Y"
pom$(24) = "I...##X##.T.X.###..Y"
pom$(25) = "I.....X:..T.X.T.F..Y"
pom$(26) = "OO..OOX.OOOOX......Y"
pom$(27) = "I...T.X...T.....OOOY"
pom$(28) = "I##.T.X.:.....#.T..Y"
pom$(29) = "I.....X............Y"
pom$(30) = "I.###.X.....T..##..Y"
pom$(31) = "..T...X.:...T..:.-.Y"
pom$(32) = "OOOOOOOOOOOOOOOOOOOO"
RETURN
Powrót do góry
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Piotr-246
Gość






PostWysłany: Czw 14:42, 07 Sty 2021    Temat postu:

SCREEN 13

REM ************************* wspolrzedne startowe

x = 10: y = 10
xs = 10: ys = 10
licz = -1
roomx = 1
roomy = 1

REM blue green red max=63
PALETTE 100, 63 * 65536 + 31 * 256 + 15
PALETTE 101, 63 * 65536 + 15 * 256 + 0
DIM pom$(10 TO 32)

REM ************************* skok do danych pomieszczenia

rysuj:
IF roomx = 1 AND roomy = 1 THEN GOSUB roomx1y1
IF roomx = 2 AND roomy = 1 THEN GOSUB roomx2y1
IF roomx = 1 AND roomy = 2 THEN GOSUB roomx1y2

REM ******************** rysowanie pomieszczenia

CLS
FOR i = 10 TO 32
a$ = pom$(i)
FOR xc = 1 TO LEN(a$):
b$ = MID$(a$, xc, 1)

COLOR 100: REM mur glowny

IF b$ = "O" THEN PRINT CHR$(177); CHR$(177);
IF b$ = "I" THEN PRINT CHR$(177); CHR$(32);
IF b$ = "Y" THEN PRINT CHR$(32); CHR$(177);
IF b$ = "X" THEN PRINT CHR$(177); CHR$(32);

COLOR 101: REM mur drugorzedny

IF b$ = "#" THEN PRINT CHR$(176); CHR$(176);
IF b$ = "T" THEN PRINT CHR$(176); CHR$(32);
IF b$ = "F" THEN PRINT CHR$(32); CHR$(176);

COLOR 1: REM puste miejsce

IF b$ = "." THEN PRINT CHR$(32); CHR$(32);

REM inne elementy

IF b$ = "-" THEN COLOR 15: PRINT CHR$(4); CHR$(32);
IF b$ = ":" THEN COLOR 12: PRINT CHR$(3); CHR$(32);
NEXT xc
PRINT
NEXT i
LOCATE y, x: COLOR 14: PRINT CHR$(2);
REM *************************** petla glowna

petla:
REM czas
se$ = MID$(TIME$, 7, 2)
se = VAL(se$)
IF se <> ses THEN licz = licz + 1
ses = se
LOCATE 24, 2: COLOR 15: PRINT "Czas:"; licz;

k$ = INKEY$
IF k$ = "" THEN GOTO petla

REM PRINT k$; : IF k$ <> "" THEN PRINT ASC(k$);

IF k$ = CHR$(27) THEN END

IF k$ = CHR$(0) + "M" THEN x = x + 1
IF k$ = CHR$(0) + "K" THEN x = x - 1
IF k$ = CHR$(0) + "H" THEN y = y - 1
IF k$ = CHR$(0) + "P" THEN y = y + 1

REM ************ sprawdzenie czy wolno wykonac ruch

IF x = 41 THEN x = 2: xs = 2: roomx = roomx + 1: GOTO rysuj
IF x = 0 THEN x = 39: xs = 39: roomx = roomx - 1: GOTO rysuj
IF y = 24 THEN y = 2: ys = 2: roomy = roomy + 1: GOTO rysuj
IF y = 0 THEN y = 22: ys = 22: roomy = roomy - 1: GOTO rysuj


pobrany = SCREEN(y, x)
IF pobrany = 3 THEN SOUND 250, .5: SOUND 150, .5: GOTO ruch
IF pobrany = 4 THEN SOUND 1150, .5: SOUND 550, .5: GOTO ruch

IF pobrany = 46 THEN GOTO ruch

IF pobrany <> 32 THEN x = xs: y = ys: GOTO petla

REM ***************** ruch

ruch:
SOUND 100, .025: SOUND 30000, .025: SOUND 100, .025: SOUND 30000, .025
REM ************* kasowanie starego obrazka

LOCATE ys, xs: COLOR 14: PRINT " ";

REM ************* rysowanie nowego obrazka

LOCATE y, x: PRINT CHR$(2)

xs = x: ys = y

GOTO petla

REM *************************dane pomieszczen

roomx1y1:
pom$(10) = "OOOOOOOOOOOOOOOOOOOO"
pom$(11) = "I-..X.....T.X...T..Y"
pom$(12) = "I##.X####.T.X.###..Y"
pom$(13) = "I.T.X.T:....X......Y"
pom$(14) = "I.T.X.###.##X##.F.#Y"
pom$(15) = "I.....T...T.X...F..."
pom$(16) = "OOOOO.T.T.T.X.##F..Y"
pom$(17) = "I.-.T...T.......F..Y"
pom$(18) = "I.#####.T.T.OOOOOOOO"
pom$(19) = "I.....T.T.T.T....T.Y"
pom$(20) = "OOOOO...###.T.T....Y"
pom$(21) = "I...F.T.T.T...T:F..."
pom$(22) = "I.###.###.###.OOOOOO"
pom$(23) = "I.....T...T.F....F.Y"
pom$(24) = "I.T.#####.T.F.####.Y"
pom$(25) = "I.T....:..T...T..F.Y"
pom$(26) = "OOOOOOOO###.T:.....Y"
pom$(27) = "I...T.....T.T.T.OOOO"
pom$(28) = "I##.T.X##.#####.T..Y"
pom$(29) = "I.....X.T..........Y"
pom$(30) = "I.###.X.###.T.###..Y"
pom$(31) = "I.T...X.:.F.T..:...."
pom$(32) = "OOOOOOOOOOOOOO.OOOOO"
RETURN

roomx2y1:
pom$(10) = "OOOOOOOOOOOOOOOOOOOO"
pom$(11) = "I-..X.....T.X...T..Y"
pom$(12) = "I...X.###.T.X......Y"
pom$(13) = "I...X..:....X......Y"
pom$(14) = "I...X###.###X##.F..Y"
pom$(15) = "......T...T.X...F..Y"
pom$(16) = "I.........T.X.##F..Y"
pom$(17) = "I.-.T.......X...F..Y"
pom$(18) = "I.#.##X.....X......Y"
pom$(19) = "I.....X.....X...T..Y"
pom$(20) = "I.....X.....X......Y"
pom$(21) = "....F.X..-..X..:F..Y"
pom$(22) = "I...#.X.....OOOOO..Y"
pom$(23) = "I.....X.....X...F..Y"
pom$(24) = "I...##X##.T.X.###..Y"
pom$(25) = "I.....X:..T.X.T.F..Y"
pom$(26) = "OO..OOX.OOOOX......Y"
pom$(27) = "I...T.X...T.....OOOY"
pom$(28) = "I##.T.X.:.....#.T..Y"
pom$(29) = "I.....X............Y"
pom$(30) = "I.###.X.....T..##..Y"
pom$(31) = "..T...X.:...T..:.-.Y"
pom$(32) = "OOOOOOOOOOOOOOOOOOOO"
RETURN

roomx1y2:
pom$(10) = "OOOOOOOOOOOOOO.OOOOO"
pom$(11) = "I-..X.....OOOO..T..Y"
pom$(12) = "I...X.###.OOOO.....Y"
pom$(13) = "I...X..:..OOOO.....Y"
pom$(14) = "I...X###.##.....F..Y"
pom$(15) = "I.....T...T.....F..Y"
pom$(16) = "I.............##F..Y"
pom$(17) = "I.-.T.OOOOOOX...F..Y"
pom$(18) = "I.#.##X.....X......Y"
pom$(19) = "I.....X.....X...T..Y"
pom$(20) = "I.....X.....X......Y"
pom$(21) = "IOOOOOX..-..X..:F..Y"
pom$(22) = "I...#.X.....OOOOO..Y"
pom$(23) = "I.....X.....X...F..Y"
pom$(24) = "I...##XOOOOOX.###..Y"
pom$(25) = "I......:..T.X.T.F..Y"
pom$(26) = "OO..OO......X......Y"
pom$(27) = "I...T.....OOOO..OOOY"
pom$(28) = "I#..T...:.OOOO..T..Y"
pom$(29) = "OOOO......OOOO.....Y"
pom$(30) = "OOOO...........##..Y"
pom$(31) = "OOOO....:...T..:.-.Y"
pom$(32) = "OOOOOOOOOOOOOOOOOOOO"
RETURN
Powrót do góry
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Piotr-246
Gość






PostWysłany: Czw 16:25, 07 Sty 2021    Temat postu:

SCREEN 13

REM ************************* wspolrzedne startowe

x = 10: y = 10
xs = 10: ys = 10
licz = -1
roomx = 1
roomy = 1

REM blue green red max=63
PALETTE 100, 63 * 65536 + 31 * 256 + 15
PALETTE 101, 63 * 65536 + 15 * 256 + 0
DIM pom$(10 TO 32)

REM ********** dane poszczegolnych elementow

mur$ = CHR$(177) + CHR$(177) + CHR$(177) + CHR$(177)
murl$ = CHR$(177) + CHR$(32) + CHR$(32) + CHR$(32)
murp$ = CHR$(32) + CHR$(32) + CHR$(32) + CHR$(177)
murek$ = CHR$(176) + CHR$(176) + CHR$(176) + CHR$(176)
murekl$ = CHR$(176) + CHR$(32) + CHR$(32) + CHR$(32)
murekp$ = CHR$(32) + CHR$(32) + CHR$(32) + CHR$(176)
puste$ = CHR$(32) + CHR$(32) + CHR$(32) + CHR$(32)

REM ************************* skok do danych pomieszczenia

rysuj:
IF roomx = 1 AND roomy = 1 THEN GOSUB roomx1y1
IF roomx = 2 AND roomy = 1 THEN GOSUB roomx2y1
IF roomx = 1 AND roomy = 2 THEN GOSUB roomx1y2

REM ******************** rysowanie pomieszczenia

CLS
FOR i = 10 TO 32
a$ = pom$(i)
FOR xc = 1 TO LEN(a$):
b$ = MID$(a$, xc, 1)

COLOR 100: REM mur glowny
IF b$ = "O" THEN PRINT mur$;
IF b$ = "I" THEN PRINT murl$;
IF b$ = "Y" THEN PRINT murp$;


COLOR 101: REM mur drugorzedny
IF b$ = "#" THEN PRINT murek$;
IF b$ = "T" THEN PRINT murekl$;
IF b$ = "F" THEN PRINT murekp$;

COLOR 1: REM puste miejsce

IF b$ = "." THEN PRINT puste$;

REM inne elementy

IF b$ = "-" THEN COLOR 15: PRINT CHR$(4); CHR$(32); CHR$(32); CHR$(32);
IF b$ = ":" THEN COLOR 12: PRINT CHR$(3); CHR$(32); CHR$(32); CHR$(32);
NEXT xc
PRINT
NEXT i
LOCATE y, x: COLOR 14: PRINT CHR$(2);
REM *************************** petla glowna

petla:
REM czas
se$ = MID$(TIME$, 7, 2)
se = VAL(se$)
IF se <> ses THEN licz = licz + 1
ses = se
LOCATE 24, 2: COLOR 15: PRINT "Czas:"; licz;

k$ = INKEY$
IF k$ = "" THEN GOTO petla

REM PRINT k$; : IF k$ <> "" THEN PRINT ASC(k$);

IF k$ = CHR$(27) THEN END

IF k$ = CHR$(0) + "M" THEN x = x + 1
IF k$ = CHR$(0) + "K" THEN x = x - 1
IF k$ = CHR$(0) + "H" THEN y = y - 1
IF k$ = CHR$(0) + "P" THEN y = y + 1

REM ************ sprawdzenie czy wolno wykonac ruch

IF x = 41 THEN x = 2: xs = 2: roomx = roomx + 1: GOTO rysuj
IF x = 0 THEN x = 39: xs = 39: roomx = roomx - 1: GOTO rysuj
IF y = 24 THEN y = 2: ys = 2: roomy = roomy + 1: GOTO rysuj
IF y = 0 THEN y = 22: ys = 22: roomy = roomy - 1: GOTO rysuj


pobrany = SCREEN(y, x)
IF pobrany = 3 THEN SOUND 250, .5: SOUND 150, .5: GOTO ruch
IF pobrany = 4 THEN SOUND 1150, .5: SOUND 550, .5: GOTO ruch

IF pobrany = 46 THEN GOTO ruch

IF pobrany <> 32 THEN x = xs: y = ys: GOTO petla

REM ***************** ruch

ruch:
SOUND 100, .025: SOUND 30000, .025: SOUND 100, .025: SOUND 30000, .025
REM ************* kasowanie starego obrazka

LOCATE ys, xs: COLOR 14: PRINT " ";

REM ************* rysowanie nowego obrazka

LOCATE y, x: PRINT CHR$(2)

xs = x: ys = y

GOTO petla

REM *************************dane pomieszczen

roomx1y1:
pom$(10) = "OOOOOOOOOO"
pom$(11) = "I-..Y.T..Y"
pom$(12) = "I##.Y##..Y"
pom$(13) = "I.T.Y....Y"
pom$(14) = "I.T.Y.F.#Y"
pom$(15) = "I........."
pom$(16) = "OOOOO.T..Y"
pom$(17) = "I.-.T....Y"
pom$(1Cool = "I.#####OOO"
pom$(19) = "I.....TT.Y"
pom$(20) = "OOOOO.-..Y"
pom$(21) = "I.-.F.T..."
pom$(22) = "I.###.##OO"
pom$(23) = "I.....T..Y"
pom$(24) = "I.T.####.Y"
pom$(25) = "I.T..-.:.Y"
pom$(26) = "OOOOOOO..Y"
pom$(27) = "I.:.T...OO"
pom$(2Cool = "I##.T.Y#.Y"
pom$(29) = "I........Y"
pom$(30) = "I.###.Y-.Y"
pom$(31) = "I.T:..Y..."
pom$(32) = "OOOO.OOOOO"
RETURN

roomx2y1:
pom$(10) = "OOOOOOOOOO"
pom$(11) = "I-Y.Y.T..Y"
pom$(12) = "I.Y.Y....Y"
pom$(13) = "I.Y.Y....Y"
pom$(14) = "I.Y#Y.F..Y"
pom$(15) = "....Y.F..Y"
pom$(16) = "I...Y#F..Y"
pom$(17) = "I.T.Y.F..Y"
pom$(1Cool = "I.##Y....Y"
pom$(19) = "I...Y.T..Y"
pom$(20) = "I...Y....Y"
pom$(21) = "..F.Y:F..Y"
pom$(22) = "I.#.OOO..Y"
pom$(23) = "I.....F..Y"
pom$(24) = "I.##T##..Y"
pom$(25) = "I...T.F..Y"
pom$(26) = "OOOOO....Y"
pom$(27) = "I.T.T.OOOY"
pom$(2Cool = "I#T...T..Y"
pom$(29) = "I........Y"
pom$(30) = "I.#..##..Y"
pom$(31) = ".....:.-.Y"
pom$(32) = "OOOOOOOOOO"
RETURN

roomx1y2:
pom$(10) = "OOOO.OOOOO"
pom$(11) = "I-.O.....Y"
pom$(12) = "I..OOO...Y"
pom$(13) = "I........Y"
pom$(14) = "I........Y"
pom$(15) = "I...T....Y"
pom$(16) = "I...##F..Y"
pom$(17) = "I.-...F..Y"
pom$(1Cool = "I.#.Y....Y"
pom$(19) = "I...Y.T..Y"
pom$(20) = "I...Y....Y"
pom$(21) = "IOOOY:F..Y"
pom$(22) = "I...YOO..Y"
pom$(23) = "I...Y....Y"
pom$(24) = "I...Y##..Y"
pom$(25) = "I.....F..Y"
pom$(26) = "OO.......Y"
pom$(27) = "I....OOOOY"
pom$(2Cool = "I#...O...Y"
pom$(29) = "OOOO.O...Y"
pom$(30) = "OOOO.....Y"
pom$(31) = "OOOO...-.Y"
pom$(32) = "OOOOOOOOOO"
RETURN
Powrót do góry
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Piotr-246
Gość






PostWysłany: Czw 18:03, 07 Sty 2021    Temat postu:

SCREEN 13

REM ************************* wspolrzedne startowe

x = 10: y = 10
xs = 10: ys = 10
licz = -1
roomx = 1
roomy = 1

REM blue green red max=63
PALETTE 100, 63 * 65536 + 31 * 256 + 15
PALETTE 101, 63 * 65536 + 15 * 256 + 0
DIM pom$(10 TO 32)

REM ********** dane poszczegolnych elementow

mur$ = CHR$(177) + CHR$(177) + CHR$(177) + CHR$(177)
murl$ = CHR$(177) + CHR$(32) + CHR$(32) + CHR$(32)
murp$ = CHR$(32) + CHR$(32) + CHR$(32) + CHR$(177)
murek$ = CHR$(176) + CHR$(176) + CHR$(176) + CHR$(176)
murekl$ = CHR$(176) + CHR$(32) + CHR$(32) + CHR$(32)
murekp$ = CHR$(32) + CHR$(32) + CHR$(32) + CHR$(176)
puste$ = CHR$(32) + CHR$(32) + CHR$(32) + CHR$(32)

REM ************************* skok do danych pomieszczenia

rysuj:
IF roomx = 1 AND roomy = 1 THEN GOSUB roomx1y1
IF roomx = 2 AND roomy = 1 THEN GOSUB roomx2y1
IF roomx = 1 AND roomy = 2 THEN GOSUB roomx1y2
IF roomx = 2 AND roomy = 2 THEN GOSUB roomx2y2

REM ******************** rysowanie pomieszczenia

CLS
FOR i = 10 TO 32
a$ = pom$(i)
FOR xc = 1 TO LEN(a$):
b$ = MID$(a$, xc, 1)

COLOR 100: REM mur glowny
IF b$ = "O" THEN PRINT mur$;
IF b$ = "I" THEN PRINT murl$;
IF b$ = "Y" THEN PRINT murp$;


COLOR 101: REM mur drugorzedny
IF b$ = "#" THEN PRINT murek$;
IF b$ = "T" THEN PRINT murekl$;
IF b$ = "F" THEN PRINT murekp$;

COLOR 1: REM puste miejsce

IF b$ = "." THEN PRINT puste$;

REM inne elementy

IF b$ = "-" THEN COLOR 15: PRINT CHR$(32); CHR$(32); CHR$(4); CHR$(32);
IF b$ = ":" THEN COLOR 12: PRINT CHR$(32); CHR$(32); CHR$(3); CHR$(32);
NEXT xc
PRINT
NEXT i
LOCATE y, x: COLOR 14: PRINT CHR$(2);
REM *************************** petla glowna

petla:
REM czas
se$ = MID$(TIME$, 7, 2)
se = VAL(se$)
IF se <> ses THEN licz = licz + 1
ses = se
LOCATE 24, 2: COLOR 15: PRINT "Czas:"; licz;

k$ = INKEY$
IF k$ = "" THEN GOTO petla

REM PRINT k$; : IF k$ <> "" THEN PRINT ASC(k$);

IF k$ = CHR$(27) THEN END

IF k$ = CHR$(0) + "M" THEN x = x + 1
IF k$ = CHR$(0) + "K" THEN x = x - 1
IF k$ = CHR$(0) + "H" THEN y = y - 1
IF k$ = CHR$(0) + "P" THEN y = y + 1

REM ************ sprawdzenie czy wolno wykonac ruch

IF x = 41 THEN x = 2: xs = 2: roomx = roomx + 1: GOTO rysuj
IF x = 0 THEN x = 39: xs = 39: roomx = roomx - 1: GOTO rysuj
IF y = 24 THEN y = 2: ys = 2: roomy = roomy + 1: GOTO rysuj
IF y = 0 THEN y = 22: ys = 22: roomy = roomy - 1: GOTO rysuj


pobrany = SCREEN(y, x)
IF pobrany = 3 THEN SOUND 250, .5: SOUND 150, .5: GOTO ruch
IF pobrany = 4 THEN SOUND 1150, .5: SOUND 550, .5: GOTO ruch

IF pobrany = 46 THEN GOTO ruch

IF pobrany <> 32 THEN x = xs: y = ys: GOTO petla

REM ***************** ruch

ruch:
SOUND 100, .025: SOUND 30000, .025: SOUND 100, .025: SOUND 30000, .025
REM ************* kasowanie starego obrazka

LOCATE ys, xs: COLOR 14: PRINT " ";

REM ************* rysowanie nowego obrazka

LOCATE y, x: PRINT CHR$(2)

xs = x: ys = y

GOTO petla

REM *************************dane pomieszczen

roomx1y1:
pom$(10) = "OOOOOOOOOO"
pom$(11) = "I-:.Y.T..Y"
pom$(12) = "I-:.Y##..Y"
pom$(13) = "ITTYY....Y"
pom$(14) = "ITTYY.F.#Y"
pom$(15) = "ITTYY....."
pom$(16) = "OOOOO.T..Y"
pom$(17) = "I.-.T....Y"
pom$(18) = "I.#####OOO"
pom$(19) = "I.....TT.Y"
pom$(20) = "OOOOO.-..Y"
pom$(21) = "I.-.F.T..."
pom$(22) = "I.###.##OO"
pom$(23) = "I.....T..Y"
pom$(24) = "I.T.####.Y"
pom$(25) = "I.T..-.:.Y"
pom$(26) = "OOOOOOO..Y"
pom$(27) = "I.:.T...OO"
pom$(28) = "I##.T.Y#.Y"
pom$(29) = "I........Y"
pom$(30) = "I.###.Y-.Y"
pom$(31) = "I.T:..Y..."
pom$(32) = "OOOO.OOOOO"
RETURN

roomx2y1:
pom$(10) = "OOOOOOOOOO"
pom$(11) = "I-Y.Y.T..Y"
pom$(12) = "I.Y.Y....Y"
pom$(13) = "I.Y.Y....Y"
pom$(14) = "I.Y#Y.F..Y"
pom$(15) = "....Y.F..Y"
pom$(16) = "I...Y#F..Y"
pom$(17) = "I.T.Y.F..Y"
pom$(18) = "I.##Y....Y"
pom$(19) = "I...Y.T..Y"
pom$(20) = "I...Y....Y"
pom$(21) = "..F.Y:F..Y"
pom$(22) = "I.#.OOO..Y"
pom$(23) = "I.....F..Y"
pom$(24) = "I.##T##..Y"
pom$(25) = "I...T.F..Y"
pom$(26) = "OOOOO....Y"
pom$(27) = "I.T.T.OOOY"
pom$(28) = "I#T...T..Y"
pom$(29) = "I........Y"
pom$(30) = "I.#..##..Y"
pom$(31) = ".....:.-.Y"
pom$(32) = "OOOOOOOOOO"
RETURN

roomx1y2:
pom$(10) = "OOOO.OOOOO"
pom$(11) = "I-.O.....Y"
pom$(12) = "I..OOO...Y"
pom$(13) = "I........Y"
pom$(14) = "I........Y"
pom$(15) = "I...T....Y"
pom$(16) = "I...##F..Y"
pom$(17) = "I.-...F..Y"
pom$(18) = "I.#.Y....Y"
pom$(19) = "I...Y.T..Y"
pom$(20) = "I...Y....Y"
pom$(21) = "IOOOY:F..Y"
pom$(22) = "I...YOO..Y"
pom$(23) = "I...Y....Y"
pom$(24) = "I...Y##..Y"
pom$(25) = "I.....F..Y"
pom$(26) = "OO.......Y"
pom$(27) = "I....OOOOY"
pom$(28) = "I#...O...Y"
pom$(29) = "OOOO.O...Y"
pom$(30) = "OOOO......"
pom$(31) = "OOOO...-.."
pom$(32) = "OOOOOOOOOO"
RETURN

roomx2y2:
pom$(10) = "OOOOOOOOOO"
pom$(11) = "I........Y"
pom$(12) = "I........Y"
pom$(13) = "I........Y"
pom$(14) = "I.-......Y"
pom$(15) = "I...T....Y"
pom$(16) = "I...##F..Y"
pom$(17) = "I.-...F..Y"
pom$(18) = "I.#.Y....Y"
pom$(19) = "I...Y.T..Y"
pom$(20) = "I...Y....Y"
pom$(21) = "I...Y:F..Y"
pom$(22) = "I........Y"
pom$(23) = "I...Y....Y"
pom$(24) = "I...Y##..O"
pom$(25) = "I.....F.OO"
pom$(26) = "OO.....OOO"
pom$(27) = "I.OO..OOOO"
pom$(28) = "I#...OOOOO"
pom$(29) = "OO..OOOOOO"
pom$(30) = "...OOOOOOO"
pom$(31) = "..OOOOOOOO"
pom$(32) = "OOOOOOOOOO"
RETURN
Powrót do góry
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Piotr-246
Gość






PostWysłany: Czw 20:03, 07 Sty 2021    Temat postu:

SCREEN 13

REM ************************* wspolrzedne startowe

x = 10: y = 10
xs = 10: ys = 10
licz = -1
roomx = 1
roomy = 1

REM blue green red max=63
PALETTE 100, 63 * 65536 + 31 * 256 + 15
PALETTE 101, 63 * 65536 + 15 * 256 + 0
DIM pom$(10 TO 32)

REM ********** dane poszczegolnych elementow

mur$ = CHR$(177) + CHR$(177) + CHR$(177) + CHR$(177)
murl$ = CHR$(177) + CHR$(32) + CHR$(32) + CHR$(32)
murp$ = CHR$(32) + CHR$(32) + CHR$(32) + CHR$(177)
murek$ = CHR$(176) + CHR$(176) + CHR$(176) + CHR$(176)
murekl$ = CHR$(176) + CHR$(32) + CHR$(32) + CHR$(32)
murekp$ = CHR$(32) + CHR$(32) + CHR$(32) + CHR$(176)
puste$ = CHR$(32) + CHR$(32) + CHR$(32) + CHR$(32)

REM ************************* skok do danych pomieszczenia

rysuj:
IF roomx = 1 AND roomy = 1 THEN GOSUB roomx1y1
IF roomx = 2 AND roomy = 1 THEN GOSUB roomx2y1
IF roomx = 3 AND roomy = 1 THEN GOSUB roomx3y1

IF roomx = 1 AND roomy = 2 THEN GOSUB roomx1y2
IF roomx = 2 AND roomy = 2 THEN GOSUB roomx2y2

REM ******************** rysowanie pomieszczenia

CLS
FOR i = 10 TO 32
a$ = pom$(i)
FOR xc = 1 TO LEN(a$):
b$ = MID$(a$, xc, 1)

COLOR 100: REM mur glowny
IF b$ = "O" THEN PRINT mur$;
IF b$ = "I" THEN PRINT murl$;
IF b$ = "Y" THEN PRINT murp$;


COLOR 101: REM mur drugorzedny
IF b$ = "#" THEN PRINT murek$;
IF b$ = "T" THEN PRINT murekl$;
IF b$ = "F" THEN PRINT murekp$;

COLOR 1: REM puste miejsce

IF b$ = "." THEN PRINT puste$;

REM inne elementy

IF b$ = "-" THEN COLOR 15: PRINT CHR$(32); CHR$(32); CHR$(4); CHR$(32);
IF b$ = ":" THEN COLOR 12: PRINT CHR$(32); CHR$(32); CHR$(3); CHR$(32);
NEXT xc
PRINT
NEXT i
LOCATE y, x: COLOR 14: PRINT CHR$(2);
REM *************************** petla glowna

petla:
REM czas
se$ = MID$(TIME$, 7, 2)
se = VAL(se$)
IF se <> ses THEN licz = licz + 1
ses = se
LOCATE 24, 2: COLOR 15: PRINT "Czas:"; licz;

k$ = INKEY$
IF k$ = "" THEN GOTO petla

REM PRINT k$; : IF k$ <> "" THEN PRINT ASC(k$);

IF k$ = CHR$(27) THEN END

IF k$ = CHR$(0) + "M" THEN x = x + 1
IF k$ = CHR$(0) + "K" THEN x = x - 1
IF k$ = CHR$(0) + "H" THEN y = y - 1
IF k$ = CHR$(0) + "P" THEN y = y + 1

REM ************ sprawdzenie czy przejscie do innej planszy

IF x = 41 THEN x = 2: xs = 2: roomx = roomx + 1: GOTO rysuj
IF x = 0 THEN x = 39: xs = 39: roomx = roomx - 1: GOTO rysuj
IF y = 24 THEN y = 2: ys = 2: roomy = roomy + 1: GOTO rysuj
IF y = 0 THEN y = 22: ys = 22: roomy = roomy - 1: GOTO rysuj

REM *********** sprawdzenie czy cos mozna wziac

pobrany = SCREEN(y, x)
IF pobrany = 3 THEN SOUND 250, .5: SOUND 150, .5: GOTO ruch
IF pobrany = 4 THEN SOUND 1150, .5: SOUND 550, .5: GOTO ruch

REM ********** kropka tez umozliwia ruch

IF pobrany = 46 THEN GOTO ruch

IF pobrany <> 32 THEN x = xs: y = ys: GOTO petla

REM ***************** ruch

ruch:
SOUND 100, .025: SOUND 30000, .025: SOUND 100, .025: SOUND 30000, .025
REM ************* kasowanie starej postaci

LOCATE ys, xs: COLOR 14: PRINT " ";

REM ************* rysowanie nowej postaci

LOCATE y, x: PRINT CHR$(2)

xs = x: ys = y

GOTO petla

REM *************************dane pomieszczen

roomx1y1:
pom$(10) = "OOOOOOOOOO"
pom$(11) = "I........Y"
pom$(12) = "I-:.Y##..Y"
pom$(13) = "ITTYY....Y"
pom$(14) = "ITTYY.F.#Y"
pom$(15) = "ITTYY....."
pom$(16) = "OOOOO.T..Y"
pom$(17) = "I.-.T....Y"
pom$(18) = "I.#####OOO"
pom$(19) = "I.....TT.Y"
pom$(20) = "OOOOO.-..Y"
pom$(21) = "I.-.F.T..."
pom$(22) = "I.###.OOOO"
pom$(23) = "I.....T..Y"
pom$(24) = "I.T.####.Y"
pom$(25) = "I.T..-.:.Y"
pom$(26) = "OOOOOOO..Y"
pom$(27) = "I.:.T...OO"
pom$(28) = "I##.T..#.Y"
pom$(29) = "I........Y"
pom$(30) = "I.###.Y-.Y"
pom$(31) = "I.T:..Y..."
pom$(32) = "OOOO.OOOOO"
RETURN

roomx2y1:
pom$(10) = "OOOOOOOOOO"
pom$(11) = "I-Y.Y.T..Y"
pom$(12) = "I.Y.Y....Y"
pom$(13) = "I.Y.Y....Y"
pom$(14) = "I.Y#Y.F..Y"
pom$(15) = "......F..Y"
pom$(16) = "I...Y#F..Y"
pom$(17) = "I.T.Y.F..Y"
pom$(18) = "I.##Y....Y"
pom$(19) = "I...Y.T..Y"
pom$(20) = "I...Y....Y"
pom$(21) = "..F.Y:F..Y"
pom$(22) = "I.#.OOO..Y"
pom$(23) = "I.....F..Y"
pom$(24) = "I.##T##..Y"
pom$(25) = "I...T.F..Y"
pom$(26) = "OOO.T....Y"
pom$(27) = "I.T.T.OOOY"
pom$(28) = "I#T.T.T..Y"
pom$(29) = "I...T....Y"
pom$(30) = "I.#.T##..."
pom$(31) = "....T:.-.."
pom$(32) = "OOOOOOOOOO"
RETURN

roomx1y2:
pom$(10) = "OOOO.OOOOO"
pom$(11) = "I-.O.....Y"
pom$(12) = "I..OOO...Y"
pom$(13) = "I........Y"
pom$(14) = "I........Y"
pom$(15) = "I...T....Y"
pom$(16) = "I...##F..Y"
pom$(17) = "I.-...F..Y"
pom$(18) = "I.#.Y....Y"
pom$(19) = "I...Y.T..Y"
pom$(20) = "I...Y....Y"
pom$(21) = "IOOOY:F..Y"
pom$(22) = "I...YOO..Y"
pom$(23) = "I...Y....Y"
pom$(24) = "I...Y##..Y"
pom$(25) = "I.....F..Y"
pom$(26) = "OO.......Y"
pom$(27) = "I....OOOOY"
pom$(28) = "I#...O...Y"
pom$(29) = "OOOO.O...Y"
pom$(30) = "OOOO......"
pom$(31) = "OOOO...-.."
pom$(32) = "OOOOOOOOOO"
RETURN

roomx2y2:
pom$(10) = "OOOOOOOOOO"
pom$(11) = "I........Y"
pom$(12) = "I........Y"
pom$(13) = "I..OOOOOOO"
pom$(14) = "I.-......Y"
pom$(15) = "I...T....Y"
pom$(16) = "I...##F..Y"
pom$(17) = "I.-...F..Y"
pom$(18) = "I.#.Y....Y"
pom$(19) = "I...Y.T..Y"
pom$(20) = "I...Y....Y"
pom$(21) = "I...Y:F..Y"
pom$(22) = "I........Y"
pom$(23) = "I...Y....Y"
pom$(24) = "I...Y##..O"
pom$(25) = "I.....F.OO"
pom$(26) = "OO.....OOO"
pom$(27) = "I.OO..OOOO"
pom$(28) = "I#...OOOOO"
pom$(29) = "OO..OOOOOO"
pom$(30) = "...OOOOOOO"
pom$(31) = "..OOOOOOOO"
pom$(32) = "OOOOOOOOOO"
RETURN

roomx3y1:
pom$(10) = "OOOOOOOOOO"
pom$(11) = "I....-...Y"
pom$(12) = "I...Y###.Y"
pom$(13) = "I...Y....Y"
pom$(14) = "I.-.Y.OOOO"
pom$(15) = "I...Y....Y"
pom$(16) = "I.OOO....Y"
pom$(17) = "I.Y-Y.F..Y"
pom$(18) = "I.Y.Y....Y"
pom$(19) = "I.Y.Y.:..Y"
pom$(20) = "I.Y.Y....Y"
pom$(21) = "I.Y.Y:F..Y"
pom$(22) = "I.Y.Y....Y"
pom$(23) = "I...Y....Y"
pom$(24) = "I:..Y....O"
pom$(25) = "OOOOOOOO.O"
pom$(26) = "I...-....O"
pom$(27) = "I.OOOOOOOO"
pom$(28) = "I........O"
pom$(29) = "OOOOOOO..O"
pom$(30) = ".........O"
pom$(31) = "......:..O"
pom$(32) = "OOOOOOOOOO"
RETURN
Powrót do góry
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Piotr-246
Gość






PostWysłany: Pią 17:08, 08 Sty 2021    Temat postu:

SCREEN 13

REM ************************* wspolrzedne startowe

x = 10: y = 10
xs = 10: ys = 10
licz = -1
roomx = 1
roomy = 1

REM blue green red max=63
PALETTE 100, 63 * 65536 + 31 * 256 + 15
PALETTE 101, 63 * 65536 + 15 * 256 + 0
DIM pom$(10 TO 32)

REM ********** dane poszczegolnych elementow

mur$ = CHR$(177) + CHR$(177) + CHR$(177) + CHR$(177)
murl$ = CHR$(177) + CHR$(32) + CHR$(32) + CHR$(32)
murp$ = CHR$(32) + CHR$(32) + CHR$(32) + CHR$(177)
murek$ = CHR$(176) + CHR$(176) + CHR$(176) + CHR$(176)
murekl$ = CHR$(176) + CHR$(32) + CHR$(32) + CHR$(32)
murekp$ = CHR$(32) + CHR$(32) + CHR$(32) + CHR$(176)
puste$ = CHR$(32) + CHR$(32) + CHR$(32) + CHR$(32)

REM ************************* skok do danych pomieszczenia

rysuj:
IF roomx = 1 AND roomy = 1 THEN GOSUB roomx1y1
IF roomx = 2 AND roomy = 1 THEN GOSUB roomx2y1
IF roomx = 3 AND roomy = 1 THEN GOSUB roomx3y1

IF roomx = 1 AND roomy = 2 THEN GOSUB roomx1y2
IF roomx = 2 AND roomy = 2 THEN GOSUB roomx2y2

REM ******************** rysowanie pomieszczenia

CLS
COLOR 100
FOR i = 1 TO 23
a$ = MID$(kod$, i, 1)
IF a$ = "#" THEN PRINT "########################################"
IF a$ = "." THEN PRINT "........................................"
IF a$ = "L" THEN PRINT "#......................................."
IF a$ = "P" THEN PRINT ".......................................#"
IF a$ = "H" THEN PRINT "#......................................#"
IF a$ = "U" THEN PRINT "##################....##################"
IF a$ = "W" THEN PRINT "####....########################....####"
NEXT i

LOCATE y, x: COLOR 14: PRINT CHR$(2);
REM *************************** petla glowna

petla:
REM czas
se$ = MID$(TIME$, 7, 2)
se = VAL(se$)
IF se <> ses THEN licz = licz + 1
ses = se
LOCATE 24, 2: COLOR 15: PRINT "Czas:"; licz;

k$ = INKEY$
IF k$ = "" THEN GOTO petla

REM PRINT k$; : IF k$ <> "" THEN PRINT ASC(k$);

IF k$ = CHR$(27) THEN END

IF k$ = CHR$(0) + "M" THEN x = x + 1
IF k$ = CHR$(0) + "K" THEN x = x - 1
IF k$ = CHR$(0) + "H" THEN y = y - 1
IF k$ = CHR$(0) + "P" THEN y = y + 1

REM ************ sprawdzenie czy przejscie do innej planszy

IF x = 41 THEN x = 1: xs = 1: roomx = roomx + 1: GOTO rysuj
IF x = 0 THEN x = 40: xs = 40: roomx = roomx - 1: GOTO rysuj
IF y = 24 THEN y = 1: ys = 1: roomy = roomy + 1: GOTO rysuj
IF y = 0 THEN y = 23: ys = 23: roomy = roomy - 1: GOTO rysuj

REM *********** sprawdzenie czy cos mozna wziac

pobrany = SCREEN(y, x)
IF pobrany = 3 THEN SOUND 250, .5: SOUND 150, .5: GOTO ruch
IF pobrany = 4 THEN SOUND 1150, .5: SOUND 550, .5: GOTO ruch

REM ********** kropka tez umozliwia ruch

IF pobrany = 46 THEN GOTO ruch

IF pobrany <> 32 THEN x = xs: y = ys: GOTO petla

REM ***************** ruch

ruch:
SOUND 100, .025: SOUND 30000, .025: SOUND 100, .025: SOUND 30000, .025
REM ************* kasowanie starej postaci

LOCATE ys, xs: COLOR 14: PRINT " ";

REM ************* rysowanie nowej postaci

LOCATE y, x: PRINT CHR$(2)

xs = x: ys = y

GOTO petla

REM *************************dane pomieszczen

REM ************ plansze wiersza 1

roomx1y1:
kod$ = "#LLHHHHUHHHHHHUHHHHWLLU"
RETURN

roomx2y1:
kod$ = "#..HHHHUHHHHHWHHHHHUPP#"
RETURN

roomx3y1:
kod$ = "#PPHHHHUHHHHHWHHHHHUHH#"
RETURN

REM ************ plansze wiersza 2

roomx1y2:
kod$ = "UHHHHHHWHHLLHHUHHHHUHH#"
RETURN

roomx2y2:
kod$ = "#HWHWHWHWHPPHWHWHWHWHH#"
RETURN
Powrót do góry
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Piotr-246
Gość






PostWysłany: Pią 17:23, 08 Sty 2021    Temat postu:

SCREEN 13

REM ************************* wspolrzedne startowe

x = 10: y = 10
xs = 10: ys = 10
licz = -1
roomx = 1
roomy = 1

REM blue green red max=63
PALETTE 100, 63 * 65536 + 31 * 256 + 15
PALETTE 101, 63 * 65536 + 15 * 256 + 0
DIM pom$(10 TO 32)

REM ********** dane poszczegolnych elementow

FOR i = 1 TO 40: mur$ = mur$ + CHR$(177): NEXT i
murl$ = CHR$(177): FOR i = 1 TO 39: murl$ = murl$ + CHR$(32): NEXT i
FOR i = 1 TO 39: murp$ = murp$ + CHR$(32): NEXT i: murp$ = murp$ + CHR$(177)
FOR i = 1 TO 40: puste$ = puste$ + CHR$(32): NEXT i

FOR i = 1 TO 18: dziura$ = dziura$ + CHR$(177): NEXT i:
FOR i = 1 TO 4: dziura$ = dziura$ + CHR$(32): NEXT i:
FOR i = 1 TO 18: dziura$ = dziura$ + CHR$(177): NEXT i

dwiesciany$ = CHR$(177)
FOR i = 1 TO 38: dwiesciany$ = dwiesciany$ + CHR$(32): NEXT i
dwiesciany$ = dwiesciany$ + CHR$(177)

FOR i = 1 TO 4: dwiedziury$ = dwiedziury$ + CHR$(177): NEXT i
FOR i = 1 TO 4: dwiedziury$ = dwiedziury$ + CHR$(32): NEXT i
FOR i = 1 TO 24: dwiedziury$ = dwiedziury$ + CHR$(177): NEXT i
FOR i = 1 TO 4: dwiedziury$ = dwiedziury$ + CHR$(32): NEXT i
FOR i = 1 TO 4: dwiedziury$ = dwiedziury$ + CHR$(177): NEXT i


REM ************************* skok do danych pomieszczenia

rysuj:
IF roomx = 1 AND roomy = 1 THEN GOSUB roomx1y1
IF roomx = 2 AND roomy = 1 THEN GOSUB roomx2y1
IF roomx = 3 AND roomy = 1 THEN GOSUB roomx3y1

IF roomx = 1 AND roomy = 2 THEN GOSUB roomx1y2
IF roomx = 2 AND roomy = 2 THEN GOSUB roomx2y2

REM ******************** rysowanie pomieszczenia

CLS
COLOR 100
FOR i = 1 TO 23
a$ = MID$(kod$, i, 1)
IF a$ = "#" THEN PRINT mur$
IF a$ = "." THEN PRINT puste$
IF a$ = "L" THEN PRINT murl$
IF a$ = "P" THEN PRINT murp$
IF a$ = "H" THEN PRINT dwiesciany$
IF a$ = "U" THEN PRINT dziura$
IF a$ = "W" THEN PRINT dwiedziury$
NEXT i

LOCATE y, x: COLOR 14: PRINT CHR$(2);
REM *************************** petla glowna

petla:
REM czas
se$ = MID$(TIME$, 7, 2)
se = VAL(se$)
IF se <> ses THEN licz = licz + 1
ses = se
LOCATE 24, 2: COLOR 15: PRINT "Czas:"; licz;

k$ = INKEY$
IF k$ = "" THEN GOTO petla

REM PRINT k$; : IF k$ <> "" THEN PRINT ASC(k$);

IF k$ = CHR$(27) THEN END

IF k$ = CHR$(0) + "M" THEN x = x + 1
IF k$ = CHR$(0) + "K" THEN x = x - 1
IF k$ = CHR$(0) + "H" THEN y = y - 1
IF k$ = CHR$(0) + "P" THEN y = y + 1

REM ************ sprawdzenie czy przejscie do innej planszy

IF x = 41 THEN x = 1: xs = 1: roomx = roomx + 1: GOTO rysuj
IF x = 0 THEN x = 40: xs = 40: roomx = roomx - 1: GOTO rysuj
IF y = 24 THEN y = 1: ys = 1: roomy = roomy + 1: GOTO rysuj
IF y = 0 THEN y = 23: ys = 23: roomy = roomy - 1: GOTO rysuj

REM *********** sprawdzenie czy cos mozna wziac

pobrany = SCREEN(y, x)
IF pobrany = 3 THEN SOUND 250, .5: SOUND 150, .5: GOTO ruch
IF pobrany = 4 THEN SOUND 1150, .5: SOUND 550, .5: GOTO ruch

REM ********** kropka tez umozliwia ruch

IF pobrany = 46 THEN GOTO ruch

IF pobrany <> 32 THEN x = xs: y = ys: GOTO petla

REM ***************** ruch

ruch:
SOUND 100, .025: SOUND 30000, .025: SOUND 100, .025: SOUND 30000, .025
REM ************* kasowanie starej postaci

LOCATE ys, xs: COLOR 14: PRINT " ";

REM ************* rysowanie nowej postaci

LOCATE y, x: PRINT CHR$(2)

xs = x: ys = y

GOTO petla

REM *************************dane pomieszczen

REM ************ plansze wiersza 1

roomx1y1:
kod$ = "#LLHHHHUHHHHHHUHHHHWLLU"
RETURN

roomx2y1:
kod$ = "#..HHHHUHHHHHWHHHHHUPP#"
RETURN

roomx3y1:
kod$ = "#PPHHHHUHUHHHWHWHHHUHH#"
RETURN

REM ************ plansze wiersza 2

roomx1y2:
kod$ = "UHHHHHHWHHLLHHUHHHHUHH#"
RETURN

roomx2y2:
kod$ = "#HWHWHWHWHPPHWHWHWHWHH#"
RETURN
Powrót do góry
Wyświetl posty z ostatnich:   
Napisz nowy temat   Odpowiedz do tematu    Forum Życie Wieczne Strona Główna -> Offtopic Wszystkie czasy w strefie EET (Europa)
Idź do strony 1, 2, 3, 4, 5  Następny
Strona 1 z 5

 
Skocz do:  
Możesz pisać nowe tematy
Możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach

fora.pl - załóż własne forum dyskusyjne za darmo
Powered by phpBB © 2001, 2005 phpBB Group
Regulamin