Beiträge von True29
-
-
danke Volkmar für die Rückmeldung

Wenn du Ideen hast welche man einbringen kann nur her damit.
-
hi echt nett

vielleicht würde ich noch einen Schwierigkeitsfactor einbauen.
- Zeit beschränken
- Anzahl der Versuche
etc. -
so jetzt sollten alle Fehler beseitigt sein
Levelgrenze habe ich nun mal auf 30 gesetzt.update:
Code
Alles anzeigenWindow 0,0-500,500 WindowTitle "Labyrinth" var l%=0 Declare z%,k$[],e%,pos%,w%,pxb%,pyb%,px%,py% Randomize Proc Newgame cls UseBrush 1,0 Rectangle 100,100-400,350 WhileLoop 20 k$[&loop]="11111111111111111111" EndWhile px%=rnd(9)+7 py%=rnd(8)+7 pxb%=px% pyb%=py% WhileLoop 2*l% w%=rnd(5)+4 pos% = rnd(80) If pos% <= 20 WhileLoop w% k$[py%] = Del$(k$[py%],px%,1) k$[py%] = Ins$("0",k$[py%],px%) Case py% > 2 : Dec py% EndWhile ElseIf (pos% <= 40) And (pos% > 20) WhileLoop w% k$[py%] = del$(k$[py%],px%,1) k$[py%] = Ins$("0",k$[py%],px%) Case px% <= 18 : inc px% EndWhile ElseIf (pos% <= 60) And (pos% > 40) WhileLoop w% k$[py%] = del$(k$[py%],px%,1) k$[py%] = Ins$("0",k$[py%],px%) Case py% <= 18 : Inc py% EndWhile ElseIf (pos% <= 80) And (pos% > 60) WhileLoop w% k$[py%] = del$(k$[py%],px%,1) k$[py%] = Ins$("0",k$[py%],px%) Case px% > 3 : Dec px% EndWhile EndIf EndWhile k$[py%] = Del$(k$[py%],px%,1) k$[py%] = Ins$("0",k$[py%],px%) k$[pyb%] = del$(k$[pyb%],pxb%,1) k$[pyb%] = Ins$("x",k$[pyb%],pxb%) e%=1 z%=0 SetTimer 1000 EndProc Proc Anzeige If e%=1 UseBrush 0,45 Rectangle 20,20-470,430 UseBrush 1,Rgb(250,250,250) Rectangle 100+(px%*10),100+(py%*10)-110+(px%*10),110+(py%*10) UseBrush 1,Rgb(60,60,60) Case @Mid$(k$[py%-1],px%,1) = "1" : Rectangle 100+(px%*10),90+(py%*10)-110+(px%*10),100+(py%*10) Case @Mid$(k$[py%+1],px%,1) = "1" : Rectangle 100+(px%*10),110+(py%*10)-110+(px%*10),120+(py%*10) Case @Mid$(k$[py%],px%+1,1) = "1" : Rectangle 110+(px%*10),100+(py%*10)-120+(px%*10),110+(py%*10) Case @Mid$(k$[py%],px%-1,1) = "1" : Rectangle 90+(px%*10),100+(py%*10)-100+(px%*10),110+(py%*10) UseBrush 1,Rgb(90,30,30) Case @Mid$(k$[py%-1],px%,1) = "0" : Rectangle 100+(px%*10),90+(py%*10)-110+(px%*10),100+(py%*10) Case @Mid$(k$[py%+1],px%,1) = "0" : Rectangle 100+(px%*10),110+(py%*10)-110+(px%*10),120+(py%*10) Case @Mid$(k$[py%],px%+1,1) = "0" : Rectangle 110+(px%*10),100+(py%*10)-120+(px%*10),110+(py%*10) Case @Mid$(k$[py%],px%-1,1) = "0" : Rectangle 90+(px%*10),100+(py%*10)-100+(px%*10),110+(py%*10) UseBrush 1,Rgb(190,0,00) Case @Mid$(k$[py%-1],px%,1) = "x" : Rectangle 100+(px%*10),90+(py%*10)-110+(px%*10),100+(py%*10) Case @Mid$(k$[py%+1],px%,1) = "x" : Rectangle 100+(px%*10),110+(py%*10)-110+(px%*10),120+(py%*10) Case @Mid$(k$[py%],px%+1,1) = "x" : Rectangle 110+(px%*10),100+(py%*10)-120+(px%*10),110+(py%*10) Case @Mid$(k$[py%],px%-1,1) = "x" : Rectangle 90+(px%*10),100+(py%*10)-100+(px%*10),110+(py%*10) Case %wmTimer:Inc z% TextColor @Rgb(15,15,31),@Rgb(255,255,255), If @Mid$(k$[py%],px%,1) = "x" DrawText 30,40,"Du bist im Ziel angekommen Zeit: "+Str$(z%)+" Sekunden" DrawText 150,200,"Neues Spiel mit der Leertaste." WaitInput Inc l% e%=2 EndIf ElseIf l%>=20 DrawText 150,220,"Spielende! Vielen dank fürs Spielen." l%=0 Else DrawText 150,200,"Neues Spiel mit der Leertaste." EndIf DrawText 30,0,"Labyrinth Level:"+Str$(l%) DrawText 350,30,"Zeit für Level:"+Str$(z%) : DrawText 30,410,"Symbole Weiß: Spieler|Grau: Mauer|Braun: Boden|ROT: Ziel" DrawText 30,390,"(Q)uit | Steuerung: W/S/D/A+Cursor Tasten | Leertaste: Neues Spiel" EndProc Proc Getposition Parameters x%,y% Return @Mid$(k$[py%+y%],px%+x%,1) EndProc While 1 Anzeige() WaitInput If l%>0 If IsKey(87) Or IsKey(38) If ((Getposition(0,-1) = "0") Or (Getposition(0,-1) = "x")) Dec py% EndIf ElseIf IsKey(68) Or Iskey(39) If ((Getposition(1,0) = "0") Or (Getposition(1,0) = "x")) Inc px% EndIf ElseIf Iskey(83) Or IsKey(40) If ((Getposition(0,1) = "0") Or (Getposition(0,+1) = "x")) Inc py% EndIf ElseIf IsKey(65) Or IsKey(37) If ((Getposition(-1,0) = "0") Or (Getposition(-1,0) = "x")) Dec px% EndIf EndIf EndIf If IsKey(32) Case l%=0 : l%=1 Newgame EndIf If IsKey(81) BREAK EndIf EndWhile KillTimer End -
danke _Joerg_
der Fehler wurde in dem 2 update behoben
leider kann ich den Startbeitrag nicht bearbeiten.Mfg
-
danke
nochmal fürs Ausführliche Testen. -
hi Volkmar ,der Fehler ist mir bekannt jedoch is mir nicht ganz klar woher der kommt.
Daher hatte ich den Text oben geschrieben:
"nun gut egal hier schon mal der Code zu 90% taucht der Fehler nicht auf
und wenn dann Zeigt er sich dadurch das man das Ziel nicht erreichen kann xD
Vielleicht finde ich noch den Fehler dann gibts ein Update."Mfg
-
Der kleine Fehler wurde behoben.
Code
Alles anzeigenWindow 0,0-500,500 WindowTitle "Labyrinth" var l%=0 Declare z%,k$[],e%,pos%,w%,pxb%,pyb%,px%,py% Randomize Proc Newgame cls UseBrush 1,0 Rectangle 100,100-400,350 WhileLoop 20 k$[&loop]="11111111111111111111" EndWhile px%=rnd(6)+7 py%=rnd(6)+7 pxb%=px% pyb%=py% WhileLoop 3*l% w%=rnd(5)+2 pos% = rnd(80) If pos% <= 20 WhileLoop w% k$[py%] = Del$(k$[py%],px%,1) k$[py%] = Ins$("0",k$[py%],px%) Case py% > 2 : Dec py% EndWhile ElseIf (pos% <= 40) And (pos% > 20) WhileLoop w% k$[py%] = del$(k$[py%],px%,1) k$[py%] = Ins$("0",k$[py%],px%) Case px% <= 18 : inc px% EndWhile ElseIf (pos% <= 60) And (pos% > 40) WhileLoop w% k$[py%] = del$(k$[py%],px%,1) k$[py%] = Ins$("0",k$[py%],px%) Case py% <= 18 : Inc py% EndWhile ElseIf (pos% <= 80) And (pos% > 60) WhileLoop w% k$[py%] = del$(k$[py%],px%,1) k$[py%] = Ins$("0",k$[py%],px%) Case px% > 3 : Dec px% EndWhile EndIf EndWhile k$[py%] = del$(k$[py%],px%,1) k$[py%] = Ins$("0",k$[py%],px%) k$[pyb%] = del$(k$[pyb%],1,1) k$[pyb%] = Ins$("x",k$[pyb%],pxb%) e%=1 z%=0 SetTimer 1000 EndProc Proc Anzeige If e%=1 UseBrush 0,45 Rectangle 20,20-470,430 UseBrush 1,Rgb(250,250,250) Rectangle 100+(px%*10),100+(py%*10)-110+(px%*10),110+(py%*10) UseBrush 1,Rgb(60,60,60) Case @Mid$(k$[py%-1],px%,1) = "1" : Rectangle 100+(px%*10),90+(py%*10)-110+(px%*10),100+(py%*10) Case @Mid$(k$[py%+1],px%,1) = "1" : Rectangle 100+(px%*10),110+(py%*10)-110+(px%*10),120+(py%*10) Case @Mid$(k$[py%],px%+1,1) = "1" : Rectangle 110+(px%*10),100+(py%*10)-120+(px%*10),110+(py%*10) Case @Mid$(k$[py%],px%-1,1) = "1" : Rectangle 90+(px%*10),100+(py%*10)-100+(px%*10),110+(py%*10) UseBrush 1,Rgb(90,30,30) Case @Mid$(k$[py%-1],px%,1) = "0" : Rectangle 100+(px%*10),90+(py%*10)-110+(px%*10),100+(py%*10) Case @Mid$(k$[py%+1],px%,1) = "0" : Rectangle 100+(px%*10),110+(py%*10)-110+(px%*10),120+(py%*10) Case @Mid$(k$[py%],px%+1,1) = "0" : Rectangle 110+(px%*10),100+(py%*10)-120+(px%*10),110+(py%*10) Case @Mid$(k$[py%],px%-1,1) = "0" : Rectangle 90+(px%*10),100+(py%*10)-100+(px%*10),110+(py%*10) UseBrush 1,Rgb(190,0,00) Case @Mid$(k$[py%-1],px%,1) = "x" : Rectangle 100+(px%*10),90+(py%*10)-110+(px%*10),100+(py%*10) Case @Mid$(k$[py%+1],px%,1) = "x" : Rectangle 100+(px%*10),110+(py%*10)-110+(px%*10),120+(py%*10) Case @Mid$(k$[py%],px%+1,1) = "x" : Rectangle 110+(px%*10),100+(py%*10)-120+(px%*10),110+(py%*10) Case @Mid$(k$[py%],px%-1,1) = "x" : Rectangle 90+(px%*10),100+(py%*10)-100+(px%*10),110+(py%*10) Case %wmTimer:Inc z% TextColor @Rgb(15,15,31),@Rgb(255,255,255), If @Mid$(k$[py%],px%,1) = "x" DrawText 30,40,"Du bist im Ziel angekommen Zeit: "+Str$(z%)+" Sekunden" DrawText 150,200,"Neues Spiel mit der Leertaste." WaitInput e%=2 EndIf Else DrawText 150,200,"Neues Spiel mit der Leertaste." EndIf DrawText 30,0,"Labyrinth Level:"+Str$(l%) DrawText 350,30,"Zeit für Level:"+Str$(z%) : DrawText 30,410,"Symbole Weiß: Spieler|Grau: Mauer|Braun: Boden|ROT: Ziel" DrawText 30,390,"(Q)uit | Steuerung: W/S/D/A+Cursor Tasten | Leertaste: Neues Spiel" EndProc Proc Getposition Parameters x%,y% Return @Mid$(k$[py%+y%],px%+x%,1) EndProc While 1 Anzeige() WaitInput If l%>0 If IsKey(87) Or IsKey(38) If ((Getposition(0,-1) = "0") Or (Getposition(0,-1) = "x")) Dec py% EndIf ElseIf IsKey(68) Or Iskey(39) If ((Getposition(1,0) = "0") Or (Getposition(1,0) = "x")) Inc px% EndIf ElseIf Iskey(83) Or IsKey(40) If ((Getposition(0,1) = "0") Or (Getposition(0,+1) = "x")) Inc py% EndIf ElseIf IsKey(65) Or IsKey(37) If ((Getposition(-1,0) = "0") Or (Getposition(-1,0) = "x")) Dec px% EndIf EndIf EndIf If IsKey(32) Inc l% Newgame EndIf If IsKey(81) BREAK EndIf EndWhile KillTimer End -
ah ok
schau ich gleich mal -
joa coole sache

-
ehm ein Fehler den Balleinwurf verfehlt der Computer immer

-
Bin gerade auch dabei das so umzubauen das es zufallsgenerierte Levels gibt.
Is auch so weit fertig hat leider nur noch einen kleinen Fehler.nun gut egal hier schon mal der Code zu 90% taucht der Fehler nicht auf
und wenn dann Zeigt er sich dadurch das man das Ziel nicht erreichen kann xD
Vielleicht finde ich noch den Fehler dann gibts ein Update.Variante mit zufallsgenerierte Levels:
Mit jedem Level wird das Labyrinth etwas komplizierter.Code
Alles anzeigenWindow 0,0-500,500 WindowTitle "Labyrinth" var l%=1 Declare z%,k$[],e%,pos%,w%,pxb%,pyb%,px%,py% Randomize Proc Newgame cls UseBrush 1,0 Rectangle 100,100-400,350 WhileLoop 20 k$[&loop]="11111111111111111111" EndWhile px%=rnd(6)+7 py%=rnd(6)+7 pxb%=px% pyb%=py% WhileLoop 3*l% w%=rnd(5)+2 pos% = rnd(80) If pos% <= 20 WhileLoop w% k$[py%] = del$(k$[py%],px%,1) k$[py%] = Ins$("0",k$[py%],px%) Case py% > 2 : Dec py% EndWhile ElseIf (pos% <= 40) And (pos% > 20) WhileLoop w% k$[py%] = del$(k$[py%],px%,1) k$[py%] = Ins$("0",k$[py%],px%) Case px% <= 18 : inc px% EndWhile ElseIf (pos% <= 60) And (pos% > 40) WhileLoop w% k$[py%] = del$(k$[py%],px%,1) k$[py%] = Ins$("0",k$[py%],px%) Case py% <= 18 : Inc py% EndWhile ElseIf (pos% <= 80) And (pos% > 60) WhileLoop w% k$[py%] = del$(k$[py%],px%,1) k$[py%] = Ins$("0",k$[py%],px%) Case px% > 3 : Dec px% EndWhile EndIf EndWhile k$[py%] = del$(k$[py%],px%,1) k$[py%] = Ins$("0",k$[py%],px%) k$[pyb%] = del$(k$[pyb%],1,1) k$[pyb%] = Ins$("x",k$[pyb%],pxb%) e%=1 z%=0 SetTimer 1000 EndProc Proc Anzeige If e%=1 UseBrush 0,45 Rectangle 20,20-470,430 UseBrush 1,Rgb(250,250,250) Rectangle 100+(px%*10),100+(py%*10)-110+(px%*10),110+(py%*10) UseBrush 1,Rgb(60,60,60) Case @Mid$(k$[py%-1],px%,1) = "1" : Rectangle 100+(px%*10),90+(py%*10)-110+(px%*10),100+(py%*10) Case @Mid$(k$[py%+1],px%,1) = "1" : Rectangle 100+(px%*10),110+(py%*10)-110+(px%*10),120+(py%*10) Case @Mid$(k$[py%],px%+1,1) = "1" : Rectangle 110+(px%*10),100+(py%*10)-120+(px%*10),110+(py%*10) Case @Mid$(k$[py%],px%-1,1) = "1" : Rectangle 90+(px%*10),100+(py%*10)-100+(px%*10),110+(py%*10) UseBrush 1,Rgb(90,30,30) Case @Mid$(k$[py%-1],px%,1) = "0" : Rectangle 100+(px%*10),90+(py%*10)-110+(px%*10),100+(py%*10) Case @Mid$(k$[py%+1],px%,1) = "0" : Rectangle 100+(px%*10),110+(py%*10)-110+(px%*10),120+(py%*10) Case @Mid$(k$[py%],px%+1,1) = "0" : Rectangle 110+(px%*10),100+(py%*10)-120+(px%*10),110+(py%*10) Case @Mid$(k$[py%],px%-1,1) = "0" : Rectangle 90+(px%*10),100+(py%*10)-100+(px%*10),110+(py%*10) UseBrush 1,Rgb(190,0,00) Case @Mid$(k$[py%-1],px%,1) = "x" : Rectangle 100+(px%*10),90+(py%*10)-110+(px%*10),100+(py%*10) Case @Mid$(k$[py%+1],px%,1) = "x" : Rectangle 100+(px%*10),110+(py%*10)-110+(px%*10),120+(py%*10) Case @Mid$(k$[py%],px%+1,1) = "x" : Rectangle 110+(px%*10),100+(py%*10)-120+(px%*10),110+(py%*10) Case @Mid$(k$[py%],px%-1,1) = "x" : Rectangle 90+(px%*10),100+(py%*10)-100+(px%*10),110+(py%*10) Case %wmTimer:Inc z% TextColor @Rgb(15,15,31),@Rgb(255,255,255), If @Mid$(k$[py%],px%,1) = "x" DrawText 30,40,"Du bist im Ziel angekommen Zeit: "+Str$(z%)+" Sekunden" DrawText 150,200,"Neues Spiel mit der Leertaste." WaitInput Inc l% e%=2 EndIf Else DrawText 150,200,"Neues Spiel mit der Leertaste." EndIf DrawText 30,0,"Labyrinth Level:"+Str$(l%) DrawText 350,30,"Zeit für Level:"+Str$(z%) : DrawText 30,410,"Symbole Weiß: Spieler|Grau: Mauer|Braun: Boden|ROT: Ziel" DrawText 30,390,"(Q)uit | Steuerung: W/S/D/A+Cursor Tasten | Leertaste: Neues Spiel" EndProc Proc Getposition Parameters x%,y% Return @Mid$(k$[py%+y%],px%+x%,1) EndProc While 1 Anzeige() WaitInput If IsKey(87) Or IsKey(38) If ((Getposition(0,-1) = "0") Or (Getposition(0,-1) = "x")) Dec py% EndIf ElseIf IsKey(68) Or Iskey(39) If ((Getposition(1,0) = "0") Or (Getposition(1,0) = "x")) Inc px% EndIf ElseIf Iskey(83) Or IsKey(40) If ((Getposition(0,1) = "0") Or (Getposition(0,+1) = "x")) Inc py% EndIf ElseIf IsKey(65) Or IsKey(37) If ((Getposition(-1,0) = "0") Or (Getposition(-1,0) = "x")) Dec px% EndIf EndIf If IsKey(32) Newgame EndIf If IsKey(81) BREAK EndIf EndWhile KillTimer End -
diese gibts

"Du bist im Ziel angekommen Zeit" -
also ich meine halt das der ball unsauber fliegt xD vielleicht liegt das echt am timer^^
-
bei mir ruckelt es immer noch

egal ob als source oder als exe
-
joa ganz lustig
-
Fehler beseitigt. Für Ton habe ich leider kein Platz mehr

Update:
Code
Alles anzeigenWindow 0,0-500,500 WindowTitle "Labyrinth von True29" var level%=1 var posx%=2 var posy%=1 Declare zeit%,karte$[],end% karte$[0]="111111111111111111111" karte$[1]="1000000000100010000x1" karte$[2]="101110111010101010111" karte$[3]="100000000010101011111" karte$[4]="101110111110000000001" karte$[5]="101010101000101010101" karte$[6]="100000000010001010001" karte$[7]="101110111010101010101" karte$[8]="100000000010101010101" karte$[9]="101110111110000000111" karte$[10]="111101111110001110111" karte$[11]="100000000010001010001" karte$[12]="101110111010101010111" karte$[13]="100000000010101010111" karte$[14]="101110111010000000001" karte$[15]="100000000000101010101" karte$[16]="100000000010001010001" karte$[17]="101110111000001010111" karte$[18]="101111100010101010111" karte$[19]="100000111110000000001" karte$[20]="111111111111111111111" SetTimer 1000 Proc Anzeige UseBrush 1,Rgb(250,250,250) Rectangle 100+(posx%*10),100+(posy%*10)-110+(posx%*10),110+(posy%*10) UseBrush 1,Rgb(60,60,60) Case @Mid$(karte$[posy%-1],posx%,1) = "1" : Rectangle 100+(posx%*10),90+(posy%*10)-110+(posx%*10),100+(posy%*10) Case @Mid$(karte$[posy%+1],posx%,1) = "1" : Rectangle 100+(posx%*10),110+(posy%*10)-110+(posx%*10),120+(posy%*10) Case @Mid$(karte$[posy%],posx%+1,1) = "1" : Rectangle 110+(posx%*10),100+(posy%*10)-120+(posx%*10),110+(posy%*10) Case @Mid$(karte$[posy%],posx%-1,1) = "1" : Rectangle 90+(posx%*10),100+(posy%*10)-100+(posx%*10),110+(posy%*10) UseBrush 1,Rgb(90,30,30) Case @Mid$(karte$[posy%-1],posx%,1) = "0" : Rectangle 100+(posx%*10),90+(posy%*10)-110+(posx%*10),100+(posy%*10) Case @Mid$(karte$[posy%+1],posx%,1) = "0" : Rectangle 100+(posx%*10),110+(posy%*10)-110+(posx%*10),120+(posy%*10) Case @Mid$(karte$[posy%],posx%+1,1) = "0" : Rectangle 110+(posx%*10),100+(posy%*10)-120+(posx%*10),110+(posy%*10) Case @Mid$(karte$[posy%],posx%-1,1) = "0" : Rectangle 90+(posx%*10),100+(posy%*10)-100+(posx%*10),110+(posy%*10) UseBrush 1,Rgb(190,0,00) Case @Mid$(karte$[posy%-1],posx%,1) = "x" : Rectangle 100+(posx%*10),90+(posy%*10)-110+(posx%*10),100+(posy%*10) Case @Mid$(karte$[posy%+1],posx%,1) = "x" : Rectangle 100+(posx%*10),110+(posy%*10)-110+(posx%*10),120+(posy%*10) Case @Mid$(karte$[posy%],posx%+1,1) = "x" : Rectangle 110+(posx%*10),100+(posy%*10)-120+(posx%*10),110+(posy%*10) Case @Mid$(karte$[posy%],posx%-1,1) = "x" : Rectangle 90+(posx%*10),100+(posy%*10)-100+(posx%*10),110+(posy%*10) Case %wmTimer:Inc zeit% TextColor @Rgb(15,15,31),@Rgb(255,255,255), If @Mid$(karte$[posy%],posx%,1) = "x" DrawText 30,40,"Du bist im Ziel angekommen Zeit: "+Str$(zeit%)+" Sekunden" WaitInput End%=1 EndIf DrawText 30,390,"(Q)uit | Steuerung: W/S/D/A+Cursor Tasten | Zeit für Level:"+Str$(zeit%) EndProc Proc Getposition Parameters x%,y% Return @Mid$(karte$[posy%+y%],posx%+x%,1) EndProc UseBrush 0,45 Rectangle 20,20-470,430 TextColor 0,-1 DrawText 30,0,"Labyrinth Level:"+Str$(level%) UseBrush 1,0 Rectangle 100,100-400,350 While End%=0 Anzeige() WaitInput If IsKey(87) Or IsKey(38) If ((Getposition(0,-1) = "0") Or (Getposition(0,-1) = "x")) Dec posy% EndIf ElseIf IsKey(68) Or Iskey(39) If ((Getposition(1,0) = "0") Or (Getposition(1,0) = "x")) Inc posx% EndIf ElseIf Iskey(83) Or IsKey(40) If ((Getposition(0,1) = "0") Or (Getposition(0,+1) = "x")) Inc posy% EndIf ElseIf IsKey(65) Or IsKey(37) If ((Getposition(-1,0) = "0") Or (Getposition(-1,0) = "x")) Dec posx% EndIf EndIf If IsKey(81) inc End% EndIf EndWhile KillTimer End -
bei mir ruckelt es auch

-
Ok danke für die Rückmeldung und das Testen

Werde den Fehler beheben und schauen welcher Sound sich einbauen lässt.
-
Update:
Steuerung geändert + FenstergrößeCode
Alles anzeigenWindow 0,0-500,300 : WindowTitle "the little knight" : Randomize : var leben%=100 : var gamestep%=0 : var kapitel%=1 var intro%=0 : var code% = rnd(9999) : var codeversuche% = 3 : Proc Anzeige : Cls : TextColor 255,-1 : UseBrush 0,45 : Rectangle 20,20-400,150 DrawText 30,0,"the little knight kap."+Str$(kapitel%) : TextColor 0,-1: DrawText 30,10,"----------------------------------" DrawText 30,120,"(Q)uit | Steuerung: W/S/D/A | Interaktion=i | Leben:"+Str$(leben%) : If gamestep%=8 : DrawText 30,30,"Die Tür ist mit einem Zahlenschloss versehen!" If codeversuche% > 0 : If @Input$("Welche Zahlenkombination soll ich testen ?","Zahlenkombination",0) = code% cls : gamestep%=9 : Else : Dec codeversuche% : DrawText 30,50,"Der Zahlencode war leider nicht korrekt!" EndIf : Else : DrawText 30,50,"- Game Over -" : DrawText 30,60,"Ich hab keine lust mehr weiter zu probieren!" DrawText 30,70,"Vielleicht ist der Zahlencode irgendwo versteckt ?" : EndIf : EndIf Case leben% > 0 :DrawText 30,90,"was willst du tun ?" : Case leben% <= 0 :DrawText 30,50,"Game Over" Case gamestep%=0 :DrawText 30,30,"Vorgeschichte: Du Bist ein kleiner Ritter und hast" :Case gamestep%=0 :DrawText 30,40,"schlecht geträumt. Daher wachst du auf und wunderst" Case gamestep%=0 :DrawText 30,50,"dich was los ist denn du siehst nichts." : Case gamestep%=-1 :DrawText 30,30,"Du liegts schon im Bett." Case gamestep%=1 :DrawText 30,30,"Aua da hängt eine Lampe" : Case gamestep%=11 :DrawText 30,30,"Du rollst dich seitlich aus dem Bett" Case gamestep%=12 :DrawText 30,30,"Nein Danke. Ich hab genug geschlafen!" : Case gamestep%=13 :DrawText 30,30,"In der Lampe ist eine Zahl eingraviert:"+Str$(code%) Case gamestep%=2 :DrawText 30,30,"Hier gehts nicht weiter." : Case gamestep%=4 DrawText 30,30,"Du hast ein rascheln gehört" : Case gamestep%=5 :DrawText 30,30,"Plötzlich gab es einen laute Explosion!" Case gamestep%=6 :DrawText 30,30,"Du bist am Raumende angekommen." : Case gamestep%=7 :DrawText 30,30,"Endlich hast du die Tür gefunden!" Case gamestep%=9 :DrawText 0,30,"Du Öffnest die Tür und siehst ein Helles licht!" Case gamestep%=9 :DrawText 0,40,"......" : Case gamestep%=9 :DrawText 0,50,"Plötzlich liegst du wieder in deinem Bett als wäre nichts Passiert ?!?! ENDE" EndProc : Proc Aktion : Parameters direction% : If direction%=1 : If (gamestep%=0) Or (gamestep%=-1) Or (gamestep%=13) gamestep%=1 :leben%=leben%-10 : ElseIf (gamestep%=12) Or (gamestep%=11) : Gamestep%=6 ElseIf Gamestep%=6 : Gamestep%=2 : leben%=leben%-15 : EndIf : ElseIf direction%=2 : If (gamestep%=0) Or (gamestep%=-1) Or (gamestep%=1) Or (gamestep%=13) Gamestep%=11 : ElseIf Gamestep%=11 : Gamestep%=12 : ElseIf Gamestep%=6 : Gamestep%=5 : leben%=leben%-20 ElseIf Gamestep%=7 : gamestep%=6 : ElseIf (Gamestep%=2) Or (Gamestep%=3) : gamestep%=5 : leben%=leben%-20 EndIf : ElseIf direction%=3 : If gamestep%=0 : gamestep%=-1 : ElseIf (gamestep%=12) Or (gamestep%=11) : gamestep%=4 : ElseIf Gamestep%=4 : gamestep%=6 ElseIf Gamestep%=6 : Gamestep%=2 : leben%=leben%-15 : ElseIf Gamestep%=7 : gamestep%=6 : EndIf : ElseIf direction%=4 If (gamestep%=0) Or (gamestep%=-1) Or (gamestep%=1) Or (gamestep%=13) gamestep%=11 : ElseIf Gamestep%=11 : Gamestep%=12 : ElseIf Gamestep%=6 : Gamestep%=7 ElseIf Gamestep%=7 : Gamestep%=6 : ElseIf (Gamestep%=2) Or (Gamestep%=3) Or (Gamestep%=5) : Gamestep%=6 EndIf : ElseIf direction%=5 : If Gamestep%=7 : Gamestep%=8 : ElseIf (Gamestep%=-1) Or (Gamestep%=0) Or (gamestep%=1) Gamestep%=13 : EndIf : EndIf : Case gamestep%=9 : kapitel%=2 : Sleep 200 EndProc : While 1 : Anzeige() : WaitInput : If leben% > 0 : If IsKey(87) Or IsKey(38) : Aktion(1) : ElseIf IsKey(68) Or Iskey(39) : Aktion(2) ElseIf Iskey(83) Or IsKey(40) : Aktion(3) : ElseIf IsKey(65) Or IsKey(37) : Aktion(4) : ElseIf IsKey(73) : Aktion(5) : EndIf : EndIf If IsKey(81) : BREAK : EndIf : EndWhile : End