PB-MiniGame-Contest Thread 2

Hier kann alles mögliche diskutiert werden. Themen zu Purebasic sind hier erwünscht.
Flames und Spam kommen ungefragt in den Mülleimer.

Welches Game ist am besten?

Umfrage endete am 22.06.2005 21:05

Maze Mission
12
50%
The Snake Projekt
3
13%
Boxy
3
13%
Explo Billiard
1
4%
Grid lock
5
21%
Desktop Tennis
0
Keine Stimmen
 
Insgesamt abgegebene Stimmen: 24

Benutzeravatar
Plankton
Beiträge: 48
Registriert: 20.04.2005 19:48

PB-MiniGame-Contest Thread 2

Beitrag von Plankton »

Also, da ja Morgen mein Wettbewerb endet, dachte ich mir ich erstell mal
nen neuen Thread für die Wahl des Siegers (und für die Spiele natürlich).

Ich werd wohl selber mit meinem Bomberman Clone nicht fertig.
Also post ich mal mein aller erstes PB-Game :!:.

info zu meine Spiel:
Es geht darum, den farbigen Kugeln auszuweichen (man selbst ist
der Smily). Wenn man den Rand berührt bkommt man entweder ne
Menge Punkte abgezogen (bei den Laserstrahlen) oder man Stirbt
(beim oberen Bildschirmrand).
Für jede Sekunde die man überlebt bekommt man Punkte.
Je weiter oben man sich befindet desto mehr (wenn man ganz weit unten
ist verliert man Punkte). Am meisten Fun machts bei Schwierigkeitsgrad
10

Aber seht selbst (ich hoffe niemand kriegt nen Epilleptischen Anfall :lol: ):

Code: Alles auswählen

OpenConsole()
Print("Geben sie bitte den Schwierigkeitsgrad ein: ")
difficulty = Val(Input()) + 2
CloseConsole() 

InitSprite()
InitKeyboard()
playerX = 500
playerY = 400

Dim Blitz(200,2) 


Structure enemies 
x.l
y.l
speed.l
color.w
EndStructure 
Dim enemy.enemies(difficulty+2)
For x = 1 To difficulty
enemy(x)\Y = -10
enemy(x)\X = Random(1024)
enemy(x)\speed = Random(difficulty)
enemy(x)\color = Random(3)
 If enemy(x)\speed = 0
 enemy(x)\speed = difficulty
 EndIf 
Next 

OpenScreen(1024,768,32,"Hallo")

Repeat 
ExamineKeyboard()
ClearScreen(0,0,0)
StartDrawing(ScreenOutput())
DrawingMode(1)


;For a = 1 To 1024       ;Background----------------
;FrontColor(a/5,a/5,a/5)
;Box(a,0,1,768)         
;Next                    ;--------------------------


Locate(100,0)
FrontColor(255,0,0)
DrawText("Punkte"+Str(Punkte))
 
playerY + moveY
playerX + moveX
Gosub DrawPlayer
Gosub steuerung
Gosub enemies
Gosub laser

zv + 1
If zv =30
zv = 0
punkte = ((punkte+100) - playerY/4) + difficulty*3
EndIf 

StopDrawing()
FlipBuffers()
Until KeyboardPushed(1) Or GameOver = 1
CloseScreen()
MessageRequester("Game Over","erreichte Punktezahl: "+Str(punkte)) 
end 


DrawPlayer:
Circle(playerX,playerY,20,RGB(255,250,130))
Circle(playerX-7,playerY-4,5,RGB(50,50,255))
Circle(playerX+7,playerY-4,5,RGB(50,50,255))
Line(playerX-10,playerY+8,20,0,RGB(255,70,0))
Line(playerX-10,playerY+8,-3,-3,RGB(255,0,0))
Line(playerX+10,playerY+8,3,-3,RGB(255,0,0))
Return 


steuerung:
If KeyboardPushed(#pb_key_right)
moveX  + 1.2
ElseIf KeyboardPushed(#pb_key_left) 
moveX  - 1.2
EndIf 
If KeyboardPushed(#pb_key_up)
moveY  - 1.2
ElseIf KeyboardPushed(#pb_key_down) 
moveY  + 1.2
EndIf 

If playerX > 950 
playerX = 920
  punkte - 50
EndIf 

If playerX < 74
playerX = 104
  punkte - 50
EndIf 

If playerY < -10 
gameover = 1
EndIf 
Return 


enemies:
For x = 1 To difficulty+2
 enemy(x)\Y + enemy(x)\speed
 If enemy(x)\color = 0
 FrontColor(255,255,0)
 ElseIf enemy(x)\color = 1
 FrontColor(255,0,0)
 ElseIf enemy(x)\color = 2
 FrontColor(0,255,0)
 ElseIf enemy(x)\color = 3
 FrontColor(0,0,255)
 EndIf 
 If enemy(x)\Y > 790 Or enemy(x)\X < 74 Or enemy(x)\X > 950
 enemy(x)\Y = -10
 enemy(x)\X = Random(1024)
 enemy(x)\speed = Random(difficulty)
 enemy(x)\color = Random(3)
  If enemy(x)\speed = 0
  enemy(x)\speed = difficulty
  EndIf 
 EndIf 
Circle(enemy(x)\X,enemy(x)\Y,18) 
If enemy(x)\X > playerX And enemy(x)\X < playerX + 40 And enemy(x)\Y > playerY And enemy(x)\Y < playerY + 40    
gameover = 1
EndIf 
Next 
Return 

laser:
zw+1
If zw =2
FrontColor(190,190,230)
Box(24,0,50,768)
Box(950,0,50,768)
ElseIf zw = 4
zw = 0
FrontColor(0,0,255)
Box(24,0,50,768)
Box(950,0,50,768)
EndIf 
Return 


Edit: Mir ist grad aufgefallen das an zu viele Punkte verliert wenn man die Laser berührt. Ich änder das mal
Zuletzt geändert von Plankton am 07.06.2005 21:05, insgesamt 7-mal geändert.
Wer andern eine Grube gräbt...
...hat ein Grubengrabgerät

http://plankton.hat-gar-keine-homepage.de/
Benutzeravatar
bluejoke
Beiträge: 1244
Registriert: 08.09.2004 16:33
Kontaktdaten:

Beitrag von bluejoke »

Auch wenn das dein erstes Spiel ist, würde ich es so fixen, dass es am Ende nicht abstürzt. Hast du das nicht mit Debugger getestet?
Ich bin Ausländer - fast überall
Windows XP Pro SP2 - PB 4.00
Benutzeravatar
ZeHa
Beiträge: 4760
Registriert: 15.09.2004 23:57
Wohnort: Friedrichshafen
Kontaktdaten:

Beitrag von ZeHa »

Okay, dann will ich mein Werk auch mal vorstellen.
Die Handlung ist recht schnell erklärt: Man findet sich in einem industriell-spacigen Komplex wieder, in dem man 3 Aufgaben erledigen muß: Pläne klauen, Gebäude in die Luft jagen, abhauen. Nur sollte man sich nicht erwischen lassen :)
Die labyrinthartigen Levels werden durch Zufall erstellt, man hat allerdings die Wahl zwischen drei Größen.

Um sich gegen die Gegner verteidigen zu können, hat man auch was zum Schießen, allerdings zu Beginn nur 2 Patronen. Hier und da findet man aber noch ein paar auf dem Boden rumliegen.

Zur Steuerung:
Pfeiltasten und Space - rumlaufen und schießen
F1 - ändert das Aussehen der Wände
F2 - Karte anzeigen

Die Gegner haben keine Intelligenz, aber dafür hatte ich auch keine Zeit mehr; morgen werd ich wohl auch nicht mehr dran weitermachen können, daher hier halt mal eine ohne-KI-Version.
Es kann leider auch noch zu Fehlern kommen (allerdings gaaanz selten), z.B. kann es sein, daß ein Raum erstellt wird, der keine Verbindung zum Rest des Levels hat. Aber wie gesagt, das ist wirklich extrem selten, mir ist das beim Testen nur 2x passiert (von 500 Versuchen oder so :mrgreen:) - in dem Fall einfach ESC drücken und nochmal von vorn anfangen.

Viel Spaß

Code: Alles auswählen

;
;      ****************************
;    ********************************
;  ***                              ***
; ***                                ***
; ***          MAZE MISSION          ***
; ***                                ***
; ***  © 2005 by Christian Gleinser  ***
; ***                                ***
;  ***                              ***
;    ********************************
;      ****************************



InitSprite()
InitKeyboard()

Global breite.b
Global hoehe.b
Global cnt.l
Global rndness.b, maxrnd.b

Global cx.b, cy.b
Dim zelle(500,500,5)
Dim maze.b(1001,1001)
Dim bereits(4)
Global modus.b
Global mrichtung.b
Global anzeigen.b
Global deadends.l
Global mazefertig.b

Global PlayerX.w, PlayerY.w
Global richtung.b, walk.b, Blickrichtung.b
Global anicnt.l

Dim GegnerX.w(500)
Dim GegnerY.w(500)
Dim GegnerRichtung.b(500)
Global GegnerAnzahl.l
Global ganicnt.l

Dim MuniX.w(100)
Dim MuniY.w(100)
Global MuniAnzahl.l
Global Munition.l

Global ShotX.w, ShotY.w
Global Shoot.b
Global ShootRichtung.b

Global mission.b
Global Zeit.w

Global BlueX.w
Global BlueY.w

Global TheButtonX.w
Global TheButtonY.w

Global ExitX.w
Global ExitY.w

Global newgame.b

Declare removesomedeadends()
Declare makesomerooms()
Declare scheiss()
Declare init()
Declare map()
Declare MakeSomeSprites()
Declare game()
Declare gameover()
Declare explode()
Declare Display()
Declare DisplayMaze()
Declare DisplayItems()
Declare DisplayPlayer()
Declare DisplayEnemies()
Declare Controls()
Declare Player()
Declare Enemies()
Declare Richtungswechsel(i.l)

#links=0
#rechts=1
#hoch=2
#runter=3




Procedure umrechnenfinal()
  For i = 2 To breite*2 Step 2
    For j = 2 To hoehe*2 Step 2
      If zelle(i/2,j/2,5)=1
        maze(i-1,j-1)=1
      EndIf
     
      If zelle(i/2,j/2,2)=1
        maze(i-1,j-1)=1
        maze(i+1-1,j-1)=1
      EndIf
      If zelle(i/2,j/2,3)=1
        maze(i-1,j-1)=1
        maze(i-1,j+1-1)=1
      EndIf
    Next j
  Next i
 
  makesomerooms()
EndProcedure



Procedure umrechnen()
  For i = 1 To breite
    For j = 1 To hoehe
      If zelle(i,j,1)=1
        zelle(i,j-1,3)=1
      EndIf
      If zelle(i,j,2)=1
        zelle(i+1,j,4)=1
      EndIf
      If zelle(i,j,3)=1
        zelle(i,j+1,1)=1
      EndIf
      If zelle(i,j,4)=1
        zelle(i-1,j,2)=1
      EndIf
    Next j
  Next i
EndProcedure


Procedure calcmaze()
  If modus=0
    If cnt>=breite*hoehe
      modus=1
      umrechnen()
      removesomedeadends()
    EndIf
  EndIf
 
 
  If zelle(cx, cy, 5)=0
    zelle(cx, cy, 5)=1
    cnt=cnt+1
  EndIf
 
 
  While erfolg=0
    rndness=rndness+1
    If rndness=1
      maxrnd=Int(Random(Int(breite/10)+1)+2)
      mrichtung=Int(Random(3)+1)
    EndIf
   
    bereits(mrichtung)=1
    If bereits(1) And bereits(2) And bereits(3) And bereits(4)
      Break
    EndIf
   
    Select mrichtung
      Case 1:
        If cy>1
          If zelle(cx,cy-1,5)=0
            zelle(cx,cy,1)=1
            cy=cy-1
            erfolg=1
          EndIf
        EndIf
      Case 2:
        If cx<breite
          If zelle(cx+1,cy,5)=0
            zelle(cx,cy,2)=1
            cx=cx+1
            erfolg=1
          EndIf
        EndIf
      Case 3:
        If cy<hoehe
          If zelle(cx,cy+1,5)=0
            zelle(cx,cy,3)=1
            cy=cy+1
            erfolg=1
          EndIf
        EndIf
      Case 4:
        If cx>1
          If zelle(cx-1,cy,5)=0
            zelle(cx,cy,4)=1
            cx=cx-1
            erfolg=1
          EndIf
        EndIf
    EndSelect
  Wend
 
  If rndness>=maxrnd
    rndness=0
  EndIf
 
 
  For i = 1 To 4: bereits(i)=0: Next i
  If erfolg=0
    Repeat
      cx=Int(Random(breite-1)+1)
      cy=Int(Random(hoehe-1)+1)
    Until zelle(cx, cy,5)=1
    rndness=0
    deadends=deadends+1
  EndIf
 
EndProcedure



Procedure makesomeloops()
 
  For krass = 1 To Int(breite/2)
    ; dead ends suchen
    Repeat
      cx=Int(Random(breite-1)+1)
      cy=Int(Random(hoehe-1)+1)
      If zelle(cx,cy,1)+zelle(cx,cy,2)+zelle(cx,cy,3)+zelle(cx,cy,4)=1
        Break
      EndIf
      cnt2=cnt2+1
      If cnt2>=300
        umrechnenfinal()
      EndIf
    ForEver
   
   
    ; dead end zum loop machen
     
      Repeat
        i=Int(Random(3))+1
      Until zelle(cx,cy,i)=0
     
      zelle(cx,cy,i)=1
      Select i
        Case 1: cy=cy-1: zelle(cx,cy,3)=1
        Case 2: cx=cx+1: zelle(cx,cy,4)=1
        Case 3: cy=cy+1: zelle(cx,cy,1)=1
        Case 4: cx=cx-1: zelle(cx,cy,2)=1
      EndSelect
   
  Next krass
  umrechnenfinal()
EndProcedure




Procedure removesomedeadends()
 
  For krass = 1 To Int(breite/2)
    ; dead ends suchen
    Repeat
      cx=Int(Random(breite-1)+1)
      cy=Int(Random(hoehe-1)+1)
      If zelle(cx,cy,1)+zelle(cx,cy,2)+zelle(cx,cy,3)+zelle(cx,cy,4)=1
        Break
      EndIf
    ForEver
   
    ; dead end removen
    Repeat
     
      For i = 1 To 4
        If zelle(cx,cy,i)
          Break
        EndIf
      Next i
     
      zelle(cx,cy,i)=0
      zelle(cx,cy,5)=0
      Select i
        Case 1: cy=cy-1: zelle(cx,cy,3)=0
        Case 2: cx=cx+1: zelle(cx,cy,4)=0
        Case 3: cy=cy+1: zelle(cx,cy,1)=0
        Case 4: cx=cx-1: zelle(cx,cy,2)=0
      EndSelect
     
    Until zelle(cx,cy,1)+zelle(cx,cy,2)+zelle(cx,cy,3)+zelle(cx,cy,4)>1
 
  Next krass
 
  makesomeloops()
 
EndProcedure


Procedure makesomerooms()
  roomanzahl=Int(Random(breite*hoehe*0.08))+2
  For i = 1 To roomanzahl
    roomwidth=Int(Random(breite/2-4))+3
    roomheight=Int(Random(hoehe/2-4))+3
    roomx=Int(Random(breite*2-roomwidth-2))+1
    roomy=Int(Random(hoehe*2-roomheight-2))+1
   
    For j = 1 To roomwidth
      For k = 1 To roomheight
        maze(roomx+j,roomy+k)=1
      Next k
    Next j
   
  Next i
 
  FlipBuffers()
  mazefertig=1
EndProcedure


Procedure WaitForKey()
  Repeat
    ExamineKeyboard()
  Until KeyboardReleased(#PB_Any)
EndProcedure


Procedure ClearAll()
  breite = 20
  hoehe = 15
  cx = 1
  cy = 1
  cnt = 0
  mazefertig=0
  mrichtung=0
  deadends=0
  modus=0
  rndness=0
  maxrnd=0
  LoadFont(1,"arial",7)
  LoadFont(2,"arial",5)
 
  For i = 0 To 1001
    For j = 0 To 1001
      maze(i,j)=0
    Next j
  Next i
 
  For i = 0 To 500
    For j = 0 To 500
      For k = 0 To 5
        zelle(i,j,k)=0
      Next k
    Next j
  Next i
 
  For i = 0 To 4
    bereits(i)=0
  Next i
 
  For i = 0 To 100
    MuniX(i)=0
    MuniY(i)=0
  Next i
 
  PlayerX=0
  PlayerY=0
 
  BlueX=0
  BlueY=0

  TheButtonX=0
  TheButtonY=0
  
  ShotX=0
  ShotY=0
 
  ExitX=0
  ExitY=0
 
  For i = 0 To 500
    GegnerX(i)=0
    GegnerY(i)=0
  Next i
EndProcedure



Procedure main()
  ClearAll()
 
  ClearScreen(40,60,80)
  StartDrawing(ScreenOutput())
  FrontColor(255,255,255)
  DrawingMode(1)
  DrawingFont(UseFont(1))
  Locate(113,80)
  DrawText("M A Z E   M I S S I O N")
  Locate(100,120)
  DrawText("© 2005 by Christian Gleinser")
  StopDrawing()
  FlipBuffers()
  WaitForKey()
 
  ClearScreen(40,60,80)
  StartDrawing(ScreenOutput())
  FrontColor(255,255,255)
  DrawingMode(1)
  DrawingFont(UseFont(1))
  Locate(113,80)
  DrawText("M A Z E   M I S S I O N")
  Locate(130,120)
  DrawText("F1 - tiny maze")
  Locate(130,140)
  DrawText("F2 - medium maze")
  Locate(130,160)
  DrawText("F3 - giant maze")
  StopDrawing()
  FlipBuffers()
  Repeat
    ExamineKeyboard()
    If KeyboardReleased(#PB_Key_F1)
      breite=15
      hoehe=15
      Break
    EndIf
    If KeyboardReleased(#PB_Key_F2)
      breite=25
      hoehe=15
      Break
    EndIf
    If KeyboardReleased(#PB_Key_F3)
      breite=35
      hoehe=25
      Break
    EndIf
    If KeyboardReleased(#PB_Key_Escape)
      ClearScreen(40,60,80)
      FlipBuffers()
      Delay(500)
      End
    EndIf
  ForEver
 
  ClearScreen(40,60,80)
  StartDrawing(ScreenOutput())
  FrontColor(255,255,255)
  DrawingMode(1)
  DrawingFont(UseFont(1))
  Locate(113,80)
  DrawText("M A Z E   M I S S I O N")
  Locate(130,120)
  DrawText("patience please...")
  StopDrawing()
  FlipBuffers()
 
  MakeSomeSprites()
 
  Repeat
    calcmaze()
    ExamineKeyboard()
    If KeyboardPushed(#PB_Key_Escape)
      End
    EndIf
  Until mazefertig
 
  init()
  game()
 
  End
EndProcedure



Procedure game()
  newgame=1
 
  Repeat
    Display()
    Controls()
   
    If mission<9
      Player()
      Enemies()
    Else
      mission=mission+1
      If mission=100
        gameover()
      EndIf
    EndIf
   
    Delay(8)
   
    If mission=2
      ZeitCnt=ZeitCnt+1
      If ZeitCnt=100
        Zeit=Zeit-1
        ZeitCnt=0
      EndIf
      If Zeit=0
        explode()
      EndIf
    EndIf
   
    If IsWindow(0)
      WindowEvent()
    EndIf
   
  ForEver
 
EndProcedure


Procedure gameover()
  For i = 321 To 200 Step -1
    ClearScreen(40,60,80)
    StartDrawing(ScreenOutput())
    FrontColor(255,255,255)
    DrawingMode(1)
    DrawingFont(UseFont(1))
    Locate(i,200)
    DrawText("game over")
    StopDrawing()
    FlipBuffers()
    Delay(10)
  Next i
  WaitForKey()
 
  main()
EndProcedure


Procedure missioncomplete()
  Delay(700)
 
  ClearScreen(40,60,80)
  StartDrawing(ScreenOutput())
  FrontColor(255,255,255)
  DrawingMode(1)
  DrawingFont(UseFont(1))
  Locate(95,80)
  DrawText("C O N G R A T U L A T I O N S !")
  Locate(136,100)
  DrawText("you made it!")
  StopDrawing()
  FlipBuffers() 
  Delay(2000)
  ExamineKeyboard()
  WaitForKey()
  ClearScreen(0,0,0)
  FlipBuffers()
  Delay(700)
 
  main()
EndProcedure


Procedure explode()
  GrabSprite(666,60,40,200,160)
  For i = 50 To 4 Step -1
    ClearScreen(40,60,80)
    DisplaySprite(666,60+Int(Random(i/2)),40+Int(Random(i/2)))
    FlipBuffers()
    Delay(16)
    ClearScreen(40,60,80)
    DisplaySprite(666,60+Int(Random(i/2)),40+Int(Random(i/2)))
    FlipBuffers()
    Delay(16)
  Next i
 
  ExamineKeyboard()
 
  gameover()
EndProcedure


Procedure Display()
  ClearScreen(0,0,0)
 
  DisplayMaze()
  DisplayItems()
  DisplayPlayer()
  DisplayEnemies()
 
  StartDrawing(ScreenOutput())
  Box(0,0,320,40,RGB(40,60,80))
  Box(0,200,320,40,RGB(40,60,80))
  Box(0,0,60,240,RGB(40,60,80))
  Box(260,0,60,240,RGB(40,60,80))
  FrontColor(255,255,255)
  DrawingMode(1)
  DrawingFont(UseFont(1))
  Locate(17,17)
  DrawText("Bullets: "+Str(Munition))
 
  Locate(190,17)
  Select mission
    Case 0: DrawText("Find the blueprints!")
    Case 1: DrawText("Find self-destruction switch!")
    Case 2: DrawText("Get out of here!")
      If Zeit<11
        FrontColor(255,0,0)
      EndIf
      Locate(190,27): DrawText(Str(Zeit)+" seconds left")
  EndSelect
 
  If mission>9
    FrontColor(255,0,0):DrawText("They got you!")
  EndIf
 
  If newgame
    FrontColor(0,255,0)
    Locate(140,70)
    DrawText("get ready")
  EndIf
 
  StopDrawing()
  FlipBuffers()
 
  If newgame
    newgame=0
    Delay(1000)
  EndIf
 
EndProcedure

Procedure DisplayMaze()
  For x = 0 To 11
    For y = 0 To 9
      bx=x*20+60-PlayerX%20-10
      by=y*20+40-PlayerY%20-10
     
      ox=(PlayerX/20)+x-5
      oy=(PlayerY/20)+y-4
      If ox>=0 And oy>=0 And ox<=breite*2 And oy<=hoehe*2
        If maze(ox,oy)
          DisplaySprite(1,bx,by)
        Else
          DisplaySprite(2,bx,by)
        EndIf
      Else
        DisplaySprite(2,bx,by)
      EndIf
    Next y
  Next x
EndProcedure

Procedure DisplayItems()
  For i = 0 To MuniAnzahl
    ox=MuniX(i)-PlayerX-10+160
    oy=MuniY(i)-PlayerY-10+120
    DisplayTransparentSprite(301,ox,oy)
  Next i
 
  ox=BlueX-PlayerX-10+160
  oy=BlueY-PlayerY-10+120
  DisplayTransparentSprite(303,ox,oy)
 
  ox=TheButtonX-PlayerX-10+160
  oy=TheButtonY-PlayerY-10+120
  DisplayTransparentSprite(304,ox,oy)
 
  ox=ExitX-PlayerX-10+160
  oy=ExitY-PlayerY-10+120
  DisplayTransparentSprite(305,ox,oy)
EndProcedure

Procedure DisplayPlayer()
  If walk=0
    anicnt=0
  EndIf
 
  anicnt=anicnt+6
  If anicnt>200
    anicnt=0
  EndIf
 
  ClipSprite(100,Int(anicnt/100)*20,richtung%2*20,20,20)
  DisplayTransparentSprite(100,150,110)
 
  If Shoot
    ox=ShotX-PlayerX-10+160
    oy=ShotY-PlayerY-10+120
    DisplayTransparentSprite(302,ox,oy)
  EndIf
 
EndProcedure

Procedure DisplayEnemies()
  ganicnt=ganicnt+6
  If ganicnt>200
    ganicnt=0
  EndIf
 
  For i = 0 To GegnerAnzahl
    ox=GegnerX(i)-PlayerX-10+160
    oy=GegnerY(i)-PlayerY-10+120
   
    If GegnerRichtung(i)>=5 And GegnerRichtung(i)<40
      GegnerRichtung(i)=GegnerRichtung(i)+1
      DisplayTransparentSprite(201,ox,oy)
    EndIf
    If GegnerRichtung(i)<5
      ClipSprite(200,Int(ganicnt/100)*20,GegnerRichtung(i)%2*20,20,20)
      DisplayTransparentSprite(200,ox,oy)
    EndIf
   
  Next i
EndProcedure

Procedure Controls()
  Static dauerfeuergibtshiernicht.b
 
  ExamineKeyboard()
  If KeyboardPushed(#PB_Key_Escape)
    End
  EndIf
  If KeyboardReleased(#PB_Key_F1)
    MakeSomeSprites()
  EndIf
  If KeyboardReleased(#PB_Key_F2)
    map()
  EndIf
 
  If KeyboardPushed(#PB_Key_Left)
    richtung=#links
    Blickrichtung=#links
    walk=1
  EndIf
  If KeyboardPushed(#PB_Key_Right)
    richtung=#rechts
    Blickrichtung=#rechts
    walk=1
  EndIf
  If KeyboardPushed(#PB_Key_Up)
    richtung=#hoch
    Blickrichtung=#hoch
    walk=1
  EndIf
  If KeyboardPushed(#PB_Key_Down)
    richtung=#runter
    Blickrichtung=#runter
    walk=1
  EndIf
  If KeyboardPushed(#PB_Key_Space)
    If Shoot=0 And Munition>0 And dauerfeuergibtshiernicht=0
      Shoot=1
      ShootRichtung=Blickrichtung
      Munition=Munition-1
      ShotX=PlayerX
      ShotY=PlayerY
      dauerfeuergibtshiernicht=1
    EndIf
  EndIf
  If KeyboardReleased(#PB_Key_Space)
    dauerfeuergibtshiernicht=0
  EndIf
 
  If KeyboardReleased(#PB_Any)
    walk=0
  EndIf
 
EndProcedure


Procedure Player()
  If walk
    nx1 = Int(PlayerX / 20)
    nx2 = Int((PlayerX + 19) / 20)
    ny1 = Int(PlayerY / 20)
    ny2 = Int((PlayerY + 19) / 20)
   
    Select richtung
      Case #links:
        If maze(nx2-1,ny1)<>1: hoscheisse=1: EndIf
        If maze(nx2-1,ny2)<>1: ruscheisse=1: EndIf
        If hoscheisse=0 And ruscheisse=1: richtung=#hoch: EndIf
        If hoscheisse=1 And ruscheisse=0: richtung=#runter: EndIf
        If hoscheisse=1 And ruscheisse=1: walk=0: EndIf
      Case #rechts:
        If maze(nx1+1,ny1)<>1: hoscheisse=1: EndIf
        If maze(nx1+1,ny2)<>1: ruscheisse=1: EndIf
        If hoscheisse=0 And ruscheisse=1: richtung=#hoch: EndIf
        If hoscheisse=1 And ruscheisse=0: richtung=#runter: EndIf
        If hoscheisse=1 And ruscheisse=1: walk=0: EndIf
      Case #hoch:
        If maze(nx1,ny2-1)<>1: lischeisse=1: EndIf
        If maze(nx2,ny2-1)<>1: rescheisse=1: EndIf
        If lischeisse=0 And rescheisse=1: richtung=#links: EndIf
        If lischeisse=1 And rescheisse=0: richtung=#rechts: EndIf
        If lischeisse=1 And rescheisse=1: walk=0: EndIf
      Case #runter:
        If maze(nx1,ny1+1)<>1: lischeisse=1: EndIf
        If maze(nx2,ny1+1)<>1: rescheisse=1: EndIf
        If lischeisse=0 And rescheisse=1: richtung=#links: EndIf
        If lischeisse=1 And rescheisse=0: richtung=#rechts: EndIf
        If lischeisse=1 And rescheisse=1: walk=0: EndIf
    EndSelect
  EndIf
 
  If walk
    Select richtung
      Case #links: PlayerX=PlayerX-1
      Case #rechts: PlayerX=PlayerX+1
      Case #hoch: PlayerY=PlayerY-1
      Case #runter: PlayerY=PlayerY+1
    EndSelect
  EndIf
     
  ;einsammeln
  For i = 0 To MuniAnzahl
    If PlayerX>=MuniX(i)-6 And PlayerX<=MuniX(i)+6
      If PlayerY>=MuniY(i)-6 And PlayerY<=MuniY(i)+6
        Munition=Munition+4
        MuniX(i)=-500
      EndIf
    EndIf
  Next i
 
  If PlayerX>=BlueX-8 And PlayerX<=BlueX+8
    If PlayerY>=BlueY-8 And PlayerY<=BlueY+8
      BlueX=-500
      mission=1
    EndIf
  EndIf
 
  If PlayerX>=TheButtonX-8 And PlayerX<=TheButtonX+8
    If PlayerY>=TheButtonY-8 And PlayerY<=TheButtonY+8
      If mission=1
        mission=2
        Zeit=breite*2
        ClearScreen(255,255,255)
        FlipBuffers()
        Delay(20)
      EndIf
    EndIf
  EndIf
     
  If PlayerX>=ExitX-8 And PlayerX<=ExitX+8
    If PlayerY>=ExitY-8 And PlayerY<=ExitY+8
      If mission=2
        missioncomplete()
      EndIf
    EndIf
  EndIf
 
 
 
  ;schießen
  If Shoot
    ox=ShotX-PlayerX-10+160
    oy=ShotY-PlayerY-10+120

    Select ShootRichtung
      Case #links: ShotX=ShotX-5
      Case #rechts: ShotX=ShotX+5
      Case #hoch: ShotY=ShotY-5
      Case #runter: ShotY=ShotY+5
    EndSelect
    If ox<20 Or ox>300 Or oy<20 Or oy>220
      Shoot=0
    EndIf
   
    For i = 0 To GegnerAnzahl
      If GegnerRichtung(i)<5
        If ShotX>=GegnerX(i)-10 And ShotX<=GegnerX(i)+10
          If ShotY>=GegnerY(i)-10 And ShotY<=GegnerY(i)+10
            GegnerRichtung(i)=5
            Shoot=0
          EndIf
        EndIf
      EndIf
    Next i
   
    If maze(Int(ShotX/20),Int(ShotY/20))<>1
      If Shoot<>2
        Shoot=Shoot+1
      Else
        Shoot=0
      EndIf
    EndIf
   
  EndIf
EndProcedure


Procedure Enemies()
  For i = 0 To GegnerAnzahl
    nx = Int(GegnerX(i) / 20)
    nxx = Int((GegnerX(i) + 19) / 20)
    ny = Int(GegnerY(i) / 20)
    nyy = Int((GegnerY(i) + 19) / 20)
   
    Repeat
      r=0
      Select GegnerRichtung(i)
        Case #links
          If GegnerX(i)%20=0
            If maze(nxx-1,ny)<>1
              GegnerRichtung(i)=Int(Random(3))
              r=1
            EndIf
          EndIf
          If r=0
            GegnerX(i)=GegnerX(i)-1
          EndIf
         
        Case #rechts
          If GegnerX(i)%20=0
            If maze(nx+1,ny)<>1
              GegnerRichtung(i)=Int(Random(3))
              r=1
            EndIf
          EndIf
          If r=0
            GegnerX(i)=GegnerX(i)+1
          EndIf
         
        Case #hoch
          If GegnerY(i)%20=0
            If maze(nx,nyy-1)<>1
              GegnerRichtung(i)=Int(Random(3))
              r=1
            EndIf
          EndIf
          If r=0
            GegnerY(i)=GegnerY(i)-1
          EndIf
         
        Case #runter
          If GegnerY(i)%20=0
            If maze(nx,ny+1)<>1
              GegnerRichtung(i)=Int(Random(3))
              r=1
            EndIf
          EndIf
          If r=0
            GegnerY(i)=GegnerY(i)+1
          EndIf
      EndSelect
    Until r=0
   
    If GegnerRichtung(i)<5
      ;Kollision
      If GegnerX(i)>=PlayerX-6 And GegnerX(i)<=PlayerX+6
        If GegnerY(i)>=PlayerY-9 And GegnerY(i)<=PlayerY+9
          mission=9
        EndIf
      EndIf
    EndIf
   
  Next i
 
EndProcedure


Procedure Richtungswechsel(i.l)
  GegnerRichtung(i)=Int(Random(3))
EndProcedure


Procedure map()
  ClearScreen(0,0,0)
  ox=160-breite*3
  oy=120-hoehe*3
 
  StartDrawing(ScreenOutput())
  For x = 0 To breite*2
    For y = 0 To hoehe*2
      If maze(x,y)=0
        Box(x*3+ox,y*3+oy,3,3,RGB(0,128,255))
      EndIf
    Next y
  Next x
 
  For i = 0 To GegnerAnzahl
    Plot(GegnerX(i)/20*3+1+ox,GegnerY(i)/20*3+1+oy,RGB(255,0,0))
  Next i
 
  Box(PlayerX/20*3+ox,PlayerY/20*3+oy,3,3,RGB(255,255,0))
  StopDrawing()
  FlipBuffers()
  WaitForKey()
EndProcedure



Procedure init()
  While maze(PlayerX,PlayerY)=0
    PlayerX=Int(Random(breite*2))
    PlayerY=Int(Random(hoehe*2))
  Wend
  PlayerX=PlayerX*20
  PlayerY=PlayerY*20
  Blickrichtung=#links
 
  GegnerAnzahl=breite*hoehe/15
  ;GegnerAnzahl=49
 
  For i = 0 To GegnerAnzahl
    While maze(GegnerX(i),GegnerY(i))=0
      GegnerX(i)=Int(Random(breite*2))
      GegnerY(i)=Int(Random(hoehe*2))
    Wend
    GegnerX(i)=GegnerX(i)*20
    GegnerY(i)=GegnerY(i)*20
    GegnerRichtung(i)=Int(Random(3))
   
    If GegnerX(i)>=PlayerX-50 And GegnerX(i)<=PlayerX+50
      If GegnerY(i)>=PlayerY-50 And GegnerY(i)<=PlayerY+50
        GegnerX(i)=0
        GegnerY(i)=0
        i=i-1
      EndIf
    EndIf
  Next i
 
  Munition=2
  MuniAnzahl=breite*hoehe/100
 
  For i = 0 To MuniAnzahl
    While maze(MuniX(i),MuniY(i))=0
      MuniX(i)=Int(Random(breite*2))
      MuniY(i)=Int(Random(hoehe*2))
    Wend
    MuniX(i)=MuniX(i)*20
    MuniY(i)=MuniY(i)*20
  Next i
 
  While maze(BlueX,BlueY)=0 Or BlueX=PlayerX/20 And BlueY=PlayerY/20
    BlueX=Int(Random(breite*2))
    BlueY=Int(Random(hoehe*2))
  Wend
  BlueX=BlueX*20
  BlueY=BlueY*20
 
  While maze(TheButtonX,TheButtonY)=0 Or TheButtonX=PlayerX/20 And TheButtonY=PlayerY/20
    TheButtonX=Int(Random(breite*2))
    TheButtonY=Int(Random(hoehe*2))
  Wend
  TheButtonX=TheButtonX*20
  TheButtonY=TheButtonY*20
 
  While maze(ExitX,ExitY)=0 Or ExitX=PlayerX/20 And ExitY=PlayerY/20
    ExitX=Int(Random(breite*2))
    ExitY=Int(Random(hoehe*2))
  Wend
  ExitX=ExitX*20
  ExitY=ExitY*20
 
  mission=0
EndProcedure


Procedure MakeSomeSprites()
  StartDrawing(ScreenOutput())
  Box(0,0,20,20,RGB(0,128,255))
  Line(0,0,20,0,RGB(220,230,255))
  Line(0,0,0,20,RGB(220,230,255))
  Line(1,19,20,0,RGB(0,96,192))
  Line(19,0,0,20,RGB(0,96,192))
  If Int(Random(1))
    Line(3,3,14,0,RGB(0,96,192))
    Line(3,3,0,14,RGB(0,96,192))
    Line(4,16,13,0,RGB(220,230,255))
    Line(16,3,0,14,RGB(220,230,255))
    If Int(Random(1))
      Box(4,4,12,12,RGB(100,200,255))
    EndIf
    If Int(Random(1))
      Box(4,4,12,12,RGB(0,0,0))
    EndIf
  EndIf
  If Int(Random(1))
    Line(8,8,4,0,RGB(220,230,255))
    Line(8,8,0,5,RGB(220,230,255))
    Line(9,12,4,0,RGB(0,96,192))
    Line(12,8,0,4,RGB(0,96,192))
    If Int(Random(1))
      Box(9,9,3,3,RGB(100,200,255))
    EndIf
    If Int(Random(1))
      Box(9,9,3,3,RGB(0,0,0))
    EndIf
    If Int(Random(1))
      Box(9,9,3,3,RGB(0,128,255))
    EndIf
  EndIf
  StopDrawing()
  GrabSprite(2,0,0,20,20)
 
  StartDrawing(ScreenOutput())
  Box(0,0,20,20,RGB(0,20,40))
  StopDrawing()
  GrabSprite(1,0,0,20,20)
 
  ; SPIELFIGUR
  StartDrawing(ScreenOutput())
  Box(0,0,40,40,RGB(0,0,0))
  Circle(10,5,2,RGB(255,255,0))
  Line(10,7,0,4,RGB(255,255,0))
  Line(10,11,-1,4,RGB(255,255,0))
  Line(10,11,1,6,RGB(255,255,0))
  Line(10,7,-2,4,RGB(255,255,0))
  Line(10,7,2,5,RGB(255,255,0))
 
  Circle(20+10,5,2,RGB(255,255,0))
  Line(20+10,7,0,4,RGB(255,255,0))
  Line(20+10,11,-3,6,RGB(255,255,0))
  Line(20+10,11,3,4,RGB(255,255,0))
  Line(20+10,7,-2,5,RGB(255,255,0))
  Line(20+10,7,2,4,RGB(255,255,0))
 
  Circle(11,20+5,2,RGB(255,255,0))
  Line(10,20+7,0,4,RGB(255,255,0))
  Line(10,20+11,-1,4,RGB(255,255,0))
  Line(10,20+11,1,6,RGB(255,255,0))
  Line(10,20+7,-2,4,RGB(255,255,0))
  Line(10,20+7,2,5,RGB(255,255,0))
 
  Circle(20+11,20+5,2,RGB(255,255,0))
  Line(20+10,20+7,0,4,RGB(255,255,0))
  Line(20+10,20+11,-3,6,RGB(255,255,0))
  Line(20+10,20+11,3,4,RGB(255,255,0))
  Line(20+10,20+7,-2,5,RGB(255,255,0))
  Line(20+10,20+7,2,4,RGB(255,255,0))
 
  StopDrawing()
  GrabSprite(100,0,0,40,40)
  TransparentSpriteColor(-1,0,0,0)
 
  ; GEGNER
  StartDrawing(ScreenOutput())
  Box(0,0,40,40,RGB(0,0,0))
  Circle(10,5,2,RGB(255,0,0))
  Line(10,7,0,4,RGB(255,0,0))
  Line(10,11,-1,4,RGB(255,0,0))
  Line(10,11,1,6,RGB(255,0,0))
  Line(10,7,-2,4,RGB(255,0,0))
  Line(10,7,2,5,RGB(255,0,0))
 
  Circle(20+10,5,2,RGB(255,0,0))
  Line(20+10,7,0,4,RGB(255,0,0))
  Line(20+10,11,-3,6,RGB(255,0,0))
  Line(20+10,11,3,4,RGB(255,0,0))
  Line(20+10,7,-2,5,RGB(255,0,0))
  Line(20+10,7,2,4,RGB(255,0,0))
 
  Circle(11,20+5,2,RGB(255,0,0))
  Line(10,20+7,0,4,RGB(255,0,0))
  Line(10,20+11,-1,4,RGB(255,0,0))
  Line(10,20+11,1,6,RGB(255,0,0))
  Line(10,20+7,-2,4,RGB(255,0,0))
  Line(10,20+7,2,5,RGB(255,0,0))
 
  Circle(20+11,20+5,2,RGB(255,0,0))
  Line(20+10,20+7,0,4,RGB(255,0,0))
  Line(20+10,20+11,-3,6,RGB(255,0,0))
  Line(20+10,20+11,3,4,RGB(255,0,0))
  Line(20+10,20+7,-2,5,RGB(255,0,0))
  Line(20+10,20+7,2,4,RGB(255,0,0))
  StopDrawing()
  GrabSprite(200,0,0,40,40)
 
  ;GEGNER TOT
  StartDrawing(ScreenOutput())
  Box(0,0,40,40,RGB(0,0,0))
  Line(5,5,10,10,RGB(255,0,0))
  Line(14,5,-10,10,RGB(255,0,0))
  Line(5,10,10,0,RGB(255,0,0))
  Line(10,5,0,10,RGB(255,0,0))
  Circle(10,10,3,RGB(0,0,0))
  StopDrawing()
  GrabSprite(201,0,0,20,20)
 
  ; ITEMS
  StartDrawing(ScreenOutput())
  Box(0,0,20,20,RGB(0,0,0))
  Line(5,5,0,3,RGB(255,0,0))
  Line(7,5,0,3,RGB(255,0,0))
  Line(9,5,0,3,RGB(255,0,0))
  Line(11,5,0,3,RGB(255,0,0))
  Plot(5,8,RGB(255,255,0))
  Plot(7,8,RGB(255,255,0))
  Plot(9,8,RGB(255,255,0))
  Plot(11,8,RGB(255,255,0))
  StopDrawing()
  GrabSprite(301,0,0,20,20)
 
  StartDrawing(ScreenOutput())
  Box(0,0,20,20,RGB(0,0,0))
  Circle(10,10,4,RGB(255,0,0))
  Circle(10,10,2,RGB(255,255,0))
  StopDrawing()
  GrabSprite(302,0,0,20,20)
 
  StartDrawing(ScreenOutput())
  Box(0,0,20,20,RGB(0,0,0))
  Box(3,3,14,14,RGB(255,255,255))
  Box(4,4,12,12,RGB(0,30,170))
  Circle(7,7,3,RGB(255,255,255))
  Circle(7,7,2,RGB(0,30,170))
  Line(5,12,5,0,RGB(255,255,255))
  Line(5,14,4,0,RGB(255,255,255))
  Line(12,5,0,10,RGB(255,255,255))
  Line(12,12,3,0,RGB(255,255,255))
  Line(12,14,4,0,RGB(255,255,255))
  StopDrawing()
  GrabSprite(303,0,0,20,20)
 
  StartDrawing(ScreenOutput())
  Box(0,0,20,20,RGB(0,0,0))
  Box(4,4,11,11,RGB(80,80,80))
  Line(4,4,11,0,RGB(120,120,120))
  Line(4,4,0,11,RGB(120,120,120))
  Line(15,4,0,11,RGB(50,50,50))
  Line(15,15,-11,0,RGB(50,50,50))
  Circle(10,10,4,RGB(0,0,0))
  Circle(10,10,3,RGB(255,0,0))
  Circle(10,10,2,RGB(200,0,0))
  StopDrawing()
  GrabSprite(304,0,0,20,20)
 
  StartDrawing(ScreenOutput())
  Box(0,0,20,20,RGB(0,0,0))
  Box(2,2,16,16,RGB(0,180,0))
  Box(4,4,12,12,RGB(0,50,0))
  DrawingFont(UseFont(2))
  DrawingMode(1)
  FrontColor(255,255,255)
  Locate(2,7)
  DrawText("EXIT")
  StopDrawing()
  GrabSprite(305,0,0,20,20)
 
  ClearScreen(40,60,80)
EndProcedure









Procedure StartWindowed()
  If OpenWindow(0,0,0,640,480,#PB_Window_ScreenCentered,"Maze Mission")
    If OpenWindowedScreen(WindowID(0),0,0,320,240,1,0,0)
      main()
    EndIf
  EndIf
EndProcedure

Procedure StartFullscreen()
  If OpenScreen(320,240,32,"Maze Mission")
    main()
  Else
    MessageRequester("Fehler", "Fullscreen-Mode scheint nicht zu gehen. Nun muß eben der Fenstermodus genügen :)")
    StartWindowed()
  EndIf
EndProcedure



StartFullscreen()           ;hier könnt ihr wählen, welchen Modus ihr wollt
;StartWindowed() 


EDIT: Hab grad noch 'nen kleinen Bug entfernt...
Zuletzt geändert von ZeHa am 07.06.2005 10:27, insgesamt 1-mal geändert.
orange-blue
Beiträge: 556
Registriert: 04.09.2004 22:23
Kontaktdaten:

Beitrag von orange-blue »

:shock:
geiles spiel ZeHa!
Benutzeravatar
Lukas-P
Beiträge: 262
Registriert: 07.10.2004 12:03

Beitrag von Lukas-P »

seh ich genauso :allright:
Benutzeravatar
Andre
PureBasic Team
Beiträge: 1765
Registriert: 11.09.2004 16:35
Computerausstattung: MacBook Core2Duo mit MacOS 10.6.8
Lenovo Y50 i7 mit Windows 10
Wohnort: Saxony / Deutscheinsiedel
Kontaktdaten:

Beitrag von Andre »

Kann mich nur anschließen, ZeHa :allright:

Bereits fürs CodeArchiv gespeichert. :D
Bye,
...André
(PureBasicTeam::Docs - PureArea.net | Bestellen:: PureBasic | PureVisionXP)
Benutzeravatar
Batze
Beiträge: 1492
Registriert: 03.06.2005 21:58
Wohnort: Berlin
Kontaktdaten:

Beitrag von Batze »

Wow :o da weiß ich ja garnicht mehr ob ich mein Spiel noch reinstellen soll.
Da hab ich wohl keine Chance!
Ich hab wohl aber auch nicht so viel Ausdauer wie ZeHa.

@Plankton:
Du musst hinter dem [c]MessageRequester()[/c] noch ein [c]End[/c] einfügen, sonst stürzt das Programm am Ende ab.

Ich versuch noch'n par bugs wegzukriegen, dann kommt meins.
Benutzeravatar
Epyx
Beiträge: 247
Registriert: 29.08.2004 01:40
Computerausstattung: AMD64 X2 DualCore 6000+ , 3GB Ram , WinXP sp3
2x Ati Radeon HD4800 ~ CrossFireX
Kontaktdaten:

Beitrag von Epyx »

Yo, nun auch hier mein bescheidener Beitrag, ist ein Clone eines Uralten Spieles :)
Gesteuert wird mit den Cursor Tasten, CursorTasten und SPace um die Kisten zu bewegen. F1 um die Szene zurück zusetzen und neu zu starten, Escape um aufzugeben :D
Um eine exe variante inklusive source zu ziehen einfach mal hier klicken, Boxy 28K

Echt super Arbeit Zeha, da kommt richtiges Retro Feeling auf :)

Greetz Epyx


;*****************************************************************************
;** **
;** Boxy a Sokoban Clone written by Epyx 06/2005 **
;** No Ressources are included, all grafix and Sounds are runtime generated **
;** **
;** epyx@FlashArts.de Http://www.FlashArts.de **
;** No idea who have written the Procedure to create Sounds at runtime **
;** but i found it here ... **
;** http://www.purebasic-lounge.de/viewtopi ... ght=sounds **
;** **
;*****************************************************************************

Declare Create_Sprites()
Declare Draw_Map(Mode.l)
Declare Init()
Declare GenSFX(nr,Frequency, Duration,Mode)
Declare CloseSFX(nr)

If InitSprite()=0 : MessageRequester("Boxy - DirectX Error","You need at least DirectX 7 to run this game",#MB_ICONERROR) : End : EndIf
If InitSprite3D()=0 : MessageRequester("Boxy - 3D Error","You need at least a Direct3D Card to run this game",#MB_ICONERROR) : End : EndIf
If InitSound()=0 : MessageRequester("Boxy - Sound Error","Cant activating your SoundCard",#MB_ICONERROR) : End : EndIf


X= InitKeyboard()

Title_Window$ = "Boxy" : #pi = 3.1415
Fullscreen=1 : Screen_X=640 : Screen_Y=480
Dim Map.l(20,14) : Dim SMap(20,14)

Global FigurX,FigurY,Finish_Points,PoCol,Crate_on_finish


Init() : GenSFX(1,22610,50,0) : GenSFX(2,44610,100,1) : GenSFX(3,810,300,2) : GenSFX(4,810,300,2)

SoundVolume(1, 30) : SoundVolume(2, 100)


If Fullscreen=0
hWnd=OpenWindow(0,0,0,Screen_X,Screen_Y,#PB_Window_ScreenCentered ,Title_Window$)
X=OpenWindowedScreen(hWnd,0,0,Screen_X,Screen_Y,0,0,0)
Else
X= OpenScreen(Screen_X, Screen_Y, 32, Title_Window$)
EndIf


Create_Sprites()

Structure Info_ST
image.l
x.l
y.l
SinX.f
SinY.f
SinXS.l
SinYS.l
SinXA.f
SinYA.f
SinSA.f
Size.l
SizeS.f
Rot.f
EndStructure
NewList Partikel.Info_ST()



Menu:
ClearList(Partikel())
For t = 0 To 19
AddElement(Partikel())
Partikel()\image = 50 + Random(2)
Partikel()\x = 0 : Partikel()\y = 0
Partikel()\SinX = 0 + (t*2)
Partikel()\SinY = 0 + (t*2)
Partikel()\SizeS= Random(360)
Partikel()\SinXA= Random(1000000) / 1000000.0
Partikel()\SinYA= Random(1000000) / 1000000.0
Partikel()\SinSA= Random(1000000) / 1000000.0
Partikel()\SinXS = 320 : Partikel()\SinYS = 240
Next t

Restore Intro
For Y = 1 To 14 : For X = 1 To 20
ShAd=0 : Read ima : If ima=2 : Finish_Points+1 : EndIf
Map(X,Y) = ima : SM=ima : If ima>2 : SM=1 : EndIf
SMap(X,Y) = SM : Next X : Next Y
FigurX=-200 : FigurY=-200 : Taste=0



; #########################################
; ### Menu Loop ###
; #########################################
Repeat

ClearScreen(0,0,0)

If Fullscreen=0
Event = WindowEvent()
Select Event
Case #PB_Event_CloseWindow
End
EndSelect
Delay(10)
EndIf

Draw_Map(0)

StartDrawing(ScreenOutput())
DrawingMode(1) : FrontColor(255, 200, 200)
Locate(230, 310) : DrawText("a Game written by Epyx 2005")
Locate(440, 377) : DrawText("Press Enter to Start the Game")
Locate(440, 409) : DrawText("Escape to exit this Game")
FrontColor(255, 0, 0)
Locate(0, 377) : DrawText("Cursor keys to move the cone head")
Locate(0, 393) : DrawText("Cursor keys and space to push the crates")
Locate(0, 409) : DrawText("F1 to reset the scene and try again")
Locate(0, 425) : DrawText("Escape jumps to the menu")
StopDrawing()

ExamineKeyboard()
If KeyboardReleased(#PB_Key_Escape)
CloseSFX(1) : CloseSFX(2) : End
EndIf

Taste= KeyboardPushed(#PB_Key_Return)
FlipBuffers()
Until (Taste<>0)



Map_number=0 : Taste=0
Start:
Seconds_to_Run=125 : Turns_needed=0

Reset:
Finish_Points=0


If Map_number=0 : Restore Level0 : EndIf
If Map_number=1 : Restore Level1 : EndIf
If Map_number=2 : Restore Level2 : EndIf
If Map_number=3 : Restore Level3 : EndIf
If Map_number=4 : Restore Level4 : EndIf
If Map_number=5 : Restore Level5 : EndIf
If Map_number=6 : Restore Level6 : EndIf
If Map_number=7 : Restore Level7 : EndIf
If Map_number=8 : Restore Level8 : EndIf
If Map_number=9 : Goto Menu : EndIf

For Y = 1 To 14
For X = 1 To 20
ShAd=0
Read ima
If ima=2 Or ima=5 : Finish_Points+1 : EndIf
Map(X,Y) = ima : SM=ima
If ima>2 : SM=1 : EndIf
SMap(X,Y) = SM
If ima=5 : Map(X,Y) =4 : SMap(X,Y) =2 : EndIf
Next X
Next Y
Read FigurX : Read FigurY : Read Epyx



; #########################################
; ### Main Loop ###
; #########################################
Repeat

ClearScreen(0,0,0)

JTime = timeGetTime_()
If (JTime-LTime) > 999
LTime = timeGetTime_()
If Seconds_to_Run<11 : SoundFrequency(3, 30000) : PlaySound(3,0) : SoundFrequency(4, 15000): PlaySound(4,0): EndIf
Seconds_to_Run -1
Else
SFPS + 1
EndIf


If Fullscreen=0
Event = WindowEvent()
Select Event
Case #PB_Event_CloseWindow
End
EndSelect
Delay(10)
EndIf

ExamineKeyboard() : Taste = KeyboardReleased(#PB_Key_Escape)

If RCol=0 : PoCol +2 : If PoCol> 100 : RCol=1 : EndIf : EndIf
If RCol=1 : PoCol -2 : If PoCol< 10 : RCol=0 : EndIf : EndIf
Crate_on_finish=0

Start3D()
Sprite3DBlendingMode(5,7)
ResetList(Partikel())
While NextElement(Partikel())

Sprite3DQuality(1)
Partikel()\x = ((Screen_X/2)-16)+(Sin(Partikel()\SinX * #pi/180) * Partikel()\SinXS)
Partikel()\y = ((Screen_Y/2)-16)+(Sin(Partikel()\SinY * #pi/180) * Partikel()\SinYS)

Partikel()\Size = (Sin(Partikel()\SizeS * #pi/180) * 255)
ZoomSprite3D(Partikel()\image, Partikel()\Size, Partikel()\Size)
RotateSprite3D(Partikel()\image, Partikel()\Rot, 0)
DisplaySprite3D(Partikel()\image, Partikel()\x, Partikel()\y, 155)

Partikel()\SinX+Partikel()\SinXA : Partikel()\SinY+Partikel()\SinYA : Partikel()\SizeS+Partikel()\SinSA : Partikel()\Rot+ 0.5
Wend
Stop3D()

Draw_Map(1)


If KeyboardPushed(#PB_Key_F1) : Goto Reset : EndIf
If KeyboardPushed(#PB_Key_Space) : Space_me=1 : Else : Space_me=0 : EndIf

If KeyboardPushed(#PB_Key_left) And Taschte=0 : FigurX-1 : Taschte=1 : Turns_needed+1 : PlaySound(1,0)
If (Map(FigurX,FigurY)=4) And (Map(FigurX-1,FigurY)<3) And (Space_me=1)
Map(FigurX-1,FigurY)=4 : Map(FigurX,FigurY)=SMap(FigurX,FigurY): PlaySound(2,0) : EndIf
If Map(FigurX,FigurY)>2 : FigurX+1 : Turns_needed-1 : EndIf : EndIf

If KeyboardPushed(#PB_Key_Right) And Taschte=0 : FigurX+1 : Taschte=1 : Turns_needed+1 : PlaySound(1,0)
If (Map(FigurX,FigurY)=4) And (Map(FigurX+1,FigurY)<3) And (Space_me=1)
Map(FigurX+1,FigurY)=4 : Map(FigurX,FigurY)=SMap(FigurX,FigurY): PlaySound(2,0) : EndIf
If Map(FigurX,FigurY)>2 : FigurX-1 : Turns_needed-1 : EndIf : EndIf

If KeyboardPushed(#PB_Key_Up) And Taschte=0 : FigurY-1 : Taschte=1 : Turns_needed+1 : PlaySound(1,0)
If (Map(FigurX,FigurY)=4) And (Map(FigurX,FigurY-1)<3) And (Space_me=1)
Map(FigurX,FigurY-1)=4 : Map(FigurX,FigurY)=SMap(FigurX,FigurY) : PlaySound(2,0) : EndIf
If Map(FigurX,FigurY)>2 : FigurY+1 : Turns_needed-1 : EndIf : EndIf

If KeyboardPushed(#PB_Key_Down) And Taschte=0 : FigurY+1 : Taschte=1 : Turns_needed+1 : PlaySound(1,0)
If (Map(FigurX,FigurY)=4) And (Map(FigurX,FigurY+1)<3) And (Space_me=1)
Map(FigurX,FigurY+1)=4 : Map(FigurX,FigurY)=SMap(FigurX,FigurY): PlaySound(2,0) : EndIf
If Map(FigurX,FigurY)>2 : FigurY-1 : Turns_needed-1 : EndIf : EndIf


If KeyboardPushed(#PB_Key_Down)=0 And KeyboardPushed(#PB_Key_Up)=0 And KeyboardPushed(#PB_Key_Right)=0 And KeyboardPushed(#PB_Key_Left)=0 : Taschte=0 : EndIf

StartDrawing(ScreenOutput())
DrawingMode(1) : FrontColor(255, 255, 255)
Locate(90,00) : DrawText("Time: "+Str(Seconds_to_Run))
Locate(178,00) : DrawText("Level: "+Str(Map_number+1))
Locate(260,00) : DrawText("Turns: "+Str(Turns_needed))
Locate(520,00) : DrawText("Epyx Turns: "+Str(Epyx))
StopDrawing()

FlipBuffers()

If Crate_on_finish=Finish_Points
SoundFrequency(3, 22000) : PlaySound(3,0) : Delay(100)
SoundFrequency(4, 16000) : PlaySound(4,0) : Delay(100)
SoundFrequency(3, 11000) : PlaySound(3,0) : Delay(100)
SoundFrequency(4, 20000) : PlaySound(4,0) : Delay(300)
SoundFrequency(3, 15000) : PlaySound(3,0) : Delay(100)
SoundFrequency(4, 15000) : PlaySound(4,0) : Delay(200)
Delay(2000) : Map_number+1 : Goto Start : EndIf
If Seconds_to_Run<0 : Taste=1 : EndIf

Until (Taste<>0)

Goto Menu


DataSection

Intro:

Data.l 3,3,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data.l 3,1,3,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data.l 3,3,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data.l 3,1,3,3,1,1,1,3,3,1,1,3,1,3,3,1,3,1,1,3
Data.l 3,1,1,3,3,1,3,1,3,3,1,3,1,3,3,1,3,1,1,3
Data.l 3,1,1,3,3,1,3,1,3,3,1,1,3,3,1,1,3,3,3,3
Data.l 3,1,1,3,3,1,3,1,3,3,1,3,1,3,3,1,1,3,3,1
Data.l 3,3,3,3,1,1,1,3,3,1,1,3,1,3,3,1,1,3,3,1
Data.l 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data.l 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data.l 1,1,1,1,1,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3,3,3,3,0,0,0,0,0,0,0
Data.l 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data.l 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data.l 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data.l 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data.l 8,7,40

Level8:

Data.l 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data.l 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data.l 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data.l 0,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,0,0,0
Data.l 0,0,0,0,0,0,3,3,1,2,1,1,3,0,0,0,0,0,0,0
Data.l 0,0,0,0,0,0,3,1,4,1,4,1,3,0,0,0,0,0,0,0
Data.l 0,0,0,0,0,0,3,2,1,5,1,2,3,0,0,0,0,0,0,0
Data.l 0,0,0,0,0,0,3,1,4,1,4,1,3,0,0,0,0,0,0,0
Data.l 0,0,0,0,0,0,3,3,1,2,1,3,3,0,0,0,0,0,0,0
Data.l 0,0,0,0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0
Data.l 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data.l 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data.l 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data.l 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Data.l 12,7,200
EndDataSection


EndDataSection

Procedure Create_Sprites()

; #########################################
; ### Create all needed Grafix ###
; #########################################
;###### Bodenplatten
CreateSprite(1,32, 32,0)
StartDrawing(SpriteOutput(1)): Box(0, 0, 32, 32 , RGB(70,0,0))
For t=0 To 20 : Y1= Random(31) : Y2= Random(6)+1 : C1= Random(40)
Box(0, Y1, 32, Y2 , RGB(50+C1,0,0)) : Next t : Base=0
For i=0 To 1
For t=0 To 2
iX=(t*16) : lX=(i*16)
LineXY(Base+0+iX, 0+lX, Base+13+iX, 0+lX , RGB(150,60,60)) : LineXY(Base+0+iX, 0+lX, Base+0+iX, 13+LX , RGB(150,60,60))
LineXY(Base+0+iX, 13+lX, Base+13+iX, 13+lX , RGB(8,0,0)) : LineXY(Base+13+iX, 13+lX, Base+13+iX, 0+lX , RGB(8,0,0))
Next t : Base-6 : Next i : StopDrawing()


;###### Wände
CreateSprite(3,32, 64,0)
StartDrawing(SpriteOutput(3)): Box(0, 32, 32, 40 , RGB(70,70,70)) : Box(0, 16, 32, 16 , RGB(170,170,170))
For t=0 To 20 : Y1= 32+ Random(31) : Y2= Random(6)+1 : C1= Random(40)
Box(0, Y1, 32, Y2 , RGB(50+C1,50+C1,50+C1)) : Next t : Base=0
For i=0 To 4 : For t=0 To 3
iX=(t*16) : lX=(i*7)
LineXY(Base+0+iX, 32+lX, Base+13+iX, 32+lX , RGB(130,130,130)) : LineXY(Base+0+iX, 32+lX, Base+0+iX, 37+LX , RGB(130,130,130))
LineXY(Base+0+iX, 37+lX, Base+13+iX, 37+lX , RGB(8,0,0)) : LineXY(Base+13+iX, 37+lX, Base+13+iX, 32+lX , RGB(8,8,8))
Next t : Base-6 : Next i
FrontColor(200, 200, 200) : LineXY(0, 16, 16, 22) : LineXY(16, 22, 32, 16) : LineXY(0, 16, 32, 16) :FillArea(16, 17,RGB(200, 200, 200))
FrontColor(140, 140, 140) : LineXY(0, 32, 16, 23) : LineXY(16, 23, 32, 32) : LineXY(0, 32, 32, 32) :FillArea(16, 25,RGB(140, 140, 140))
FrontColor(120, 120, 120) : LineXY(17,22, 32, 16) : LineXY(17, 23, 32, 32) : LineXY(32, 16, 32, 32):FillArea(25, 22,RGB(120, 120, 120))
StopDrawing()

CreateSprite(2,64,64,#PB_Sprite_Texture) : StartDrawing(SpriteOutput(2)): Circle(16, 16, 16 , RGB(255,255,255)) : StopDrawing()

CreateSprite(4,32, 64,0) : StartDrawing(SpriteOutput(4)) : Box(0, 32, 32, 40 , RGB(170,140,0)) : Box(0, 14, 32, 18 , RGB(200,170,0))
LineXY(0, 32, 32, 32,RGB(250, 200, 0)) : LineXY(0, 63, 16, 63,RGB(100, 50, 0)) : LineXY(32, 32, 32,64,RGB(100, 50, 0))
For t= 0 To 4 : iX=(t*8) : LineXY(0+iX, 32, 0+iX, 64,RGB(250, 200, 0)) : LineXY((-1)+iX, 32, (-1)+iX, 64,RGB(100, 50, 0)) : Next t
For t= 0 To 8 : LineXY(0+t, 57, 23+t, 38,RGB(170,140,0)) : Next t : LineXY(0, 57, 23, 38,RGB(250, 200, 0)) : LineXY(8, 57, 32, 38,RGB(100, 50, 0)) : LineXY(8, 58, 32, 39,RGB(100, 50, 0) )
Base=0 : For o = 0 To 1 : For t= 0 To 5 : LineXY(1, 36+t+Base, 31, 36+t+Base,RGB(170,140,0)) : Next t
LineXY(1, 36+Base, 31, 36+Base,RGB(250,200,0)) : LineXY(1, 41+Base, 31, 41+Base,RGB(100,50,0)) : LineXY(1, 42+Base, 31, 42+Base,RGB(120,70,0))
Base+19 : Next o
ito=2 : For t= 0 To 3
iX=(t*ito) : LineXY(1, 16+iX, 31, 16+iX,RGB(150, 100, 0)) : LineXY (1,16+iX+1, 31, 16+iX+1 ,RGB(255, 225,100)) : ito+1 :Next t
LineXY(0, 14, 0, 32,RGB(255, 225,100)) : LineXY(31, 14, 31, 32,RGB(150, 100, 0))
Base=0 : For o=0 To 10 : For t = 0 To 6 : LineXY(4+t+Base, 15, 4+t+Base, 31,RGB(200,170,0)) : Next t
LineXY(4+Base , 14, 4+Base, 31,RGB(255, 225,100)) : LineXY(9+Base, 14, 9+Base, 31,RGB(150, 100, 0)) : LineXY(10+Base, 14, 10+Base, 31,RGB(150, 100, 0))
Base+18 : Next o : StopDrawing()

CreateSprite(10,64,64,#PB_Sprite_Texture) : UseBuffer(10) : ClearScreen(8,8,8) : UseBuffer(-1)
CreateSprite3D(10, 10) : CreateSprite3D(2, 2)

;###### Spielfigur
CreateSprite(8,32, 64,0)
StartDrawing(SpriteOutput(8)): FrontColor(0, 0, 255)
Ellipse(16, 52, 16,9) : LineXY(16, 0, 0, 50) : LineXY(17, 0, 32, 50) : FillArea(16, 5,RGB(0, 0, 255))
For t= 0 To 14 : tr=t*7
LineXY(16, 1, 16-t,58-(t*0.3) , RGB(100-tr,100-tr,255)) : LineXY(16, 1, 16+t,58-(t*0.3) , RGB(100-tr,100-tr,255))
Next t
StopDrawing()

CreateSprite(50,256, 256,#PB_Sprite_Texture) : StartDrawing(SpriteOutput(50)) : For t = 0 To 128 : Circle(128, 128, 128-t, RGB(0,0,(t))) : Next t
StopDrawing() : CreateSprite3D(50,50)
CreateSprite(51,256, 256,#PB_Sprite_Texture) : StartDrawing(SpriteOutput(51)) : For t = 0 To 128 : Circle(128, 128, 128-t, RGB(t,0,0)) : Next t
StopDrawing() : CreateSprite3D(51,51)
CreateSprite(52,256, 256,#PB_Sprite_Texture) : StartDrawing(SpriteOutput(52)) : For t = 0 To 128 : Circle(128, 128, 128-t, RGB(0,(t),0)) : Next t
StopDrawing() : CreateSprite3D(52,52)

EndProcedure

Procedure Draw_Map(Mode.l)
For Y = 1 To 14
For X = 1 To 20
SPR = Map(X,Y)

If SPR=3 : siz=4 : Kolo.l = RGB(200,200,200)
ElseIf SPR=1 : siz=4 : Kolo.l = RGB(60,0,0)
ElseIf SPR=4 : siz=4 : Kolo.l = RGB(250,250,0)
ElseIf SPR=0 : siz=2 : Kolo.l = RGB(0,0,0)
ElseIf SPR=2 : siz=4 : Kolo.l = RGB(PoCol,PoCol,PoCol) : EndIf
If (X=FigurX) And (Y=FigurY) : siz=4 : Kolo.l = RGB(0,0,250) : EndIf

If SPR=4 And SMap(X,Y)=2 : Crate_on_finish+1 : EndIf


If Mode=1
StartDrawing(ScreenOutput())
Box((X*4), (Y*4), siz, siz, Kolo.l)
StopDrawing()
EndIf

ShD=0 : If SPR=1 Or SPR=2
SH_Y = Y-1 : If SH_Y>0 : If Map(X,SH_Y)>2 : ShD=1 : EndIf
EndIf : EndIf


If SPR>2 : Panning=32 : Else : Panning=0 : EndIf
If SPR=1 Or SPR>2: DisplayTransparentSprite(SPR ,(X-1)*32,(Y*32)-Panning) : EndIf
If SPR = 2 : DisplayTransparentSprite(1,(X-1)*32,(Y*32)) : EndIf

If ShD= 1
Start3D()
DisplaySprite3D(10, (X-1)*32,(Y*32), 100)
Stop3D()
EndIf

If SPR = 2
Start3D()
DisplaySprite3D(2, (X-1)*32,(Y*32), PoCol)
Stop3D()
EndIf

If (X=FigurX) And (Y=FigurY)
DisplayTransparentSprite(8,(FigurX-1)*32,(FigurY*32)-32)
EndIf

Next X
Next Y
EndProcedure

Procedure Init()
Structure WAVE
wFormatTag.w
nChannels.w
nSamplesPerSec.l
nAvgBytesPerSec.l
nBlockAlign.w
wBitsPerSample.w
cbSize.w
EndStructure

EndProcedure

Procedure GenSFX(nr,Frequency, Duration,Mode)
SoundValue.b
w.f

#Mono = $0001
#SampleRate = 11025
#RiffId$ = "RIFF"
#WaveId$ = "WAVE"
#FmtId$ = "fmt "
#DataId$ = "data"


WaveFormatEx.WAVE
WaveFormatEx\wFormatTag = #WAVE_FORMAT_PCM
WaveFormatEx\nChannels = #Mono
WaveFormatEx\nSamplesPerSec = #SampleRate
WaveFormatEx\wBitsPerSample = $0008
WaveFormatEx\nBlockAlign = (WaveFormatEx\nChannels * WaveFormatEx\wBitsPerSample) / 8
WaveFormatEx\nAvgBytesPerSec = WaveFormatEx\nSamplesPerSec * WaveFormatEx\nBlockAlign
WaveFormatEx\cbSize = 0

DataCount = (Duration * #SampleRate)/1000
RiffCount = 4 + 4 + 4 + SizeOf(WAVE) + 4 + 4 + DataCount

start=AllocateMemory(RiffCount+100)
MS=start

PokeS(MS,#RiffId$):MS+4
PokeL(MS,RiffCount):MS+4
PokeS(MS,#WaveId$):MS+4
PokeS(MS,#FmtId$):MS+4
TempInt = SizeOf(WAVE)
PokeL(MS,TempInt):MS+4

PokeW(MS,WaveFormatEx\wFormatTag):MS+2
PokeW(MS,WaveFormatEx\nChannels):MS+2
PokeL(MS,WaveFormatEx\nSamplesPerSec):MS+4
PokeL(MS,WaveFormatEx\nAvgBytesPerSec):MS+4
PokeW(MS,WaveFormatEx\nBlockAlign):MS+2
PokeW(MS,WaveFormatEx\wBitsPerSample):MS+2
PokeW(MS,WaveFormatEx\cbSize):MS+2

PokeS(MS,#DataId$):MS+4
PokeL(MS,DataCount):MS+4

w = 2 * #pi * Frequency
For i = 0 To DataCount - 1
Select Mode
Case 0
SoundValue = 127 + 32 * Sin(i * w / #SampleRate)*1.55*35
Case 1
SoundValue = #SampleRate+Random(100)
Case 2
SoundValue = 127 + 127 * Sin(i * w / #SampleRate)
EndSelect

PokeB(MS,SoundValue):MS+1;
Next

CatchSound(nr,start)
EndProcedure

Procedure CloseSFX(nr)
StopSound(nr)
FreeSound(nr)
FreeMemory(nr)
EndProcedure




Edit// ich habe mal die Smilies deaktiviert <g>
Zuletzt geändert von Epyx am 07.06.2005 20:20, insgesamt 2-mal geändert.
If you can't make it good, at least make it look good.
Bill Gates
Benutzeravatar
Batze
Beiträge: 1492
Registriert: 03.06.2005 21:58
Wohnort: Berlin
Kontaktdaten:

Beitrag von Batze »

Und hier ist mein (kleiner :!: ) Beitrag:

Code: Alles auswählen

; Explo - Biliard
; 
; #########################################
; #  Steuerung: Mit der Maus Kugeln zur   #
; #             Explosion bringen.        #
; #  Beenden:   [Escape] - Taste          #
; #                                       #
; #  Punkte:  Rot            = 100 P.     #
; #           Blau           = 110 P.     #
; #           Gelb           = 120 P.     #
; #           Grün           = 130 P.     #
; #           Mein Highscore = 895 P.     #
; #########################################

If InitSprite() = 0 Or InitKeyboard() = 0 Or InitMouse() = 0 Or InitPalette() = 0
 MessageRequester("Fehler!", "DirectX - Initialisierung fehlgeschalgen.")
 End
EndIf

Structure Kugel
 X.f             ; X-Position
 Y.f             ; Y-Position
 Sx.f            ; Geschwindigkeit X
 Sy.f            ; Geschwindigkeit Y
 C.b             ; Farbe
EndStructure

#Pi = 3.14159
NewList Kugel.Kugel ()
NewList Explosion.Kugel()

Procedure.b Collision(X1.f, Y1.f, X2.f, Y2.f, Abst.f)
 X1 - X2 : Y1 - Y2 
 If X1 = 0 And Y1 = 0 : ProcedureReturn -1 : EndIf 
 If X1*X1 + Y1*Y1 <= Abst*Abst
  ProcedureReturn 1
 EndIf
 ProcedureReturn 0
EndProcedure

Procedure.b Abstand(X1.f, Y1.f, X2.f, Y2.f)
 X1 - X2 : Y1 - Y2 
 ProcedureReturn Sqr(X1*X1 + Y1*Y1)
EndProcedure

Procedure CreateExplosion(X.f, Y.f, C.l)
 AddElement(Explosion())
  Explosion()\X  = X
  Explosion()\Y  = Y
  Explosion()\C  = C
  Explosion()\Sx = 0
  Explosion()\Sy = 0.5  
EndProcedure

Enumeration
 #Tisch
 #Kugel
 #Cursor
EndEnumeration


For i=1 To 12

 Repeat  
  X = Random(1024-130) + 65
  Y = Random( 768-130) + 65 
  OK = 1
  ForEach Kugel()
   If Collision(X, Y, Kugel()\X, Kugel()\Y, 83) : OK = 0 : EndIf
  Next
 Until OK = 1
  
 AddElement(Kugel())
 Kugel()\X  = X
 Kugel()\Y  = Y
 Kugel()\Sx = 0
 Kugel()\Sy = 0
 Kugel()\C  = i % 4
 
Next

OpenScreen(1024, 768, 8, "Explo - Billiard")
 CreatePalette(0)
  For i=0 To 9
   SetPaletteColor(i, PeekL(?Col + i*4) )
  Next  
 UsePalette(0)

 CreateSprite(#Tisch, 1024, 768)
 StartDrawing(SpriteOutput(#Tisch))
  Box   (   0,   0, 1024, 768, $870000)
  Box   (  20,  20,  984, 728, $4B95FF)
  Circle(   0,   0,       120, $000066)
  Circle(1024,   0,       120, $000066)
  Circle(   0, 768,       120, $000066)
  Circle(1024, 768,       120, $000066)  
 StopDrawing()

 CreateSprite(#Kugel, 80, 80*4)
 StartDrawing(SpriteOutput(#Kugel))
  For i=0 To 3
   Circle(40, 40+i*80, 40, $FFFFFF)
   Circle(40, 40+i*80, 38, PeekL(?Ball+i*4))
  Next
 StopDrawing()

 CreateSprite(#Cursor, 30, 41)
 StartDrawing(SpriteOutput(#Cursor))
  LineXY( 0,  0, 29, 25, $FFFFFF)
  LineXY( 0,  0,  5, 40, $FFFFFF)
  LineXY( 5, 40, 29, 25, $FFFFFF)
  FillArea(10, 20, $FFFFFF, $0F4C85)  
 StopDrawing()

MouseLocate(1024/2, 768/2)

Repeat
 
 ExamineMouse()
 ExamineKeyboard()
 DisplaySprite(#Tisch, 0, 0)
 ForEach Kugel()
  If Kugel()\X > 1024-60 Or Kugel()\X < 60 : Kugel()\Sx * -1 : EndIf  
  If Kugel()\Y >  768-60 Or Kugel()\Y < 60 : Kugel()\Sy * -1 : EndIf
  Kugel()\X + Kugel()\Sx : Kugel()\Sx * 0.999
  Kugel()\Y + Kugel()\Sy : Kugel()\Sy * 0.999
  *Ball.Kugel = @Kugel()
  ForEach Kugel()
   If Collision(*Ball\X, *Ball\Y, Kugel()\X, Kugel()\Y, 80) = 1
    Kugel()\Sx * 0.99 : Kugel()\Sy * 0.99
    *Ball\Sx   * 0.99 : *Ball\Sy   * 0.99
   EndIf   
  Next 
  ChangeCurrentElement(Kugel(), *Ball)
  If Collision(Kugel()\X, Kugel()\Y, 0, 0, 125) Or Collision(Kugel()\X, Kugel()\Y, 1024, 0, 125) Or Collision(Kugel()\X, Kugel()\Y, 0, 768, 125) Or Collision(Kugel()\X, Kugel()\Y, 1024, 768, 125) 
   Punkte + (Kugel()\C + 10) * 10
   DeleteElement(Kugel()) : Continue
  EndIf
  ClipSprite(#Kugel, 0, Kugel()\C * 80, 80, 80)
  DisplayTransparentSprite(#Kugel, Kugel()\X-40, Kugel()\Y-40)
 Next
 DisplayTransparentSprite(#Cursor, MouseX(), MouseY())
 
 If MouseButton(1)
  ForEach Kugel()
   If Collision(Kugel()\X, Kugel()\Y, MouseX(), MouseY(), 39)
    X = Kugel()\X
    Y = Kugel()\Y
    Punkte + 15 - Kugel()\C*2
    CreateExplosion(X, Y, Kugel()\C)    
    DeleteElement(Kugel())
    ForEach Kugel()
     Kugel()\Sx + (Kugel()\X - X) / Abstand(Kugel()\X, Kugel()\Y, X, Y)
     Kugel()\Sy + (Kugel()\Y - Y) / Abstand(Kugel()\X, Kugel()\Y, X, Y)
    Next    
    Break
   EndIf
  Next
 EndIf
 
 StartDrawing(ScreenOutput())
  DrawingMode(1 | 4)
  ForEach Explosion()
   For i=0 To Int(Explosion()\Sx)  
    Circle(Explosion()\X, Explosion()\Y, i*i, PeekL(?Ball + Explosion()\C*4))
   Next
   Explosion()\Sx + Explosion()\Sy
   If Explosion()\Sx > 35 : DeleteElement(Explosion()) : EndIf          
  Next
 
  FrontColor($FF,$FF,$00)
  Locate(150 , 0)
  DrawText("Punkte:  "+Str(Punkte) + "   /   Bälle:  "+Str(CountList(Kugel())) )
 StopDrawing()
 
 FlipBuffers()
  
Until KeyboardPushed(#PB_Key_Escape) Or CountList(Kugel()) = 0

CloseScreen()
If CountList(Kugel()) = 0
 Gosub Highscore
EndIf

DataSection
 Col:
 Data.l $000000, $870000, $4B95FF, $000066
 Ball:
 Data.l $0000FF, $FF4141, $00FFFF, $418D4B
 Data.l $FF00FF, $0F4C85
 
EndDataSection

End



;- Highscore
Highscore:
OpenWindow(0, 1, 1, 330, 320, #PB_Window_ScreenCentered, "Highscore - ExploBilliard")
 CreateGadgetList(WindowID(0))
  OpenFile(0, "Billiard.dat")
  If Lof() < 15 
   For i=1 To 10 : WriteLong(20-i) : WriteStringN("Niemand") : Next
   FileSeek(0)
  EndIf
        
  ButtonGadget (   0, 105, 290, 120, 20, "Eintragen ("+Str(Punkte)+" P.)")
  For i=1 To 10
   Points = ReadLong()
   Name.s = ReadString()
   If Punkte > Points
    TextGadget  (10+i,  20, 25*i,  80, 20, Str(Punkte), #PB_Text_Center) : Punkte = -11111
    StringGadget(   i, 110, 25*i, 200, 20,          "", #PB_String_BorderLess)
    Activate = i
    i+1
   EndIf
   TextGadget  (10+i,  20, 25*i,  80, 20, Str(Points), #PB_Text_Center)
   StringGadget(   i, 110, 25*i, 200, 20,        Name, #PB_String_BorderLess | #PB_String_ReadOnly)
  Next
  
  CloseFile(0)
  UseWindow(0) : ActivateWindow()
  ActivateGadget(Activate)
  
  
 Repeat
 Until WaitWindowEvent() = #PB_Event_Gadget And EventGadgetID() = 0

 CreateFile(0, "Billiard.dat")
  
 For i=1 To 10
  WriteLong    (Val(GetGadgetText(10+i)))
  WriteStringN (    GetGadgetText(   i) )
 Next
 
Return
Wer Bugs findet bitte bescheidsagen. :mrgreen:
Benutzeravatar
zigapeda
Beiträge: 1753
Registriert: 06.03.2005 17:22
Wohnort: Kaufbeuren
Kontaktdaten:

Beitrag von zigapeda »

So jetzt noch mein spiel. Ist auch nicht gerade das längste aber bei mir ist aktion geboten! (3. und 4. level bei 3. oder 4. geschwindigkeitsstufe)
Steuerung mit den cursorTasten, ESC ist abbrechen bzw. zurück und Enter ist auswählen. Im startmenü die buttons (Leveleditor und Level Spielen hab ich nur eingebaut das ich das nicht später noch machen muss wenn ich das spiel weiterentwickle sozusagen als platzhalter)
Gegen die Wände darf man "fahren" (=die grauen blöcke), der rote block mit dem grünen punkt ist ein punkt und der rote block mit dem orangen punkt ist eine falle also ein leben weniger.
Mit 100, 200 und 400 punkten (je nach level auch 600, 700 900 usw.) erhöht sich die geschwindigkeit um das doppelte und man bekommt ein leben dazu (Ich würde euch empfehlen leben zu sammeln weil die braucht man später für level 3 und 4^^

Code: Alles auswählen

;*****************************************
;*                                       *
;*  Author: zigapeda                     *
;*  Seite:  http://zigapeda.de           *
;*                                       *
;*****************************************

InitSprite()
InitKeyboard()

OpenScreen(1024,768,16,"Minigame")

Dim map.b(31,23)
Dim pos(3,1)
Dim pointpos(1)
Global gameover.b
Global direction.b
Global speed.f
Global collo.b
Global movetime.l
Global lives.b
Global points.l
Global nextlevel.l
Global standartpoints.l
Global level.s

nextlevel = 100
speed = 100

;-Wall
CreateSprite(0,32,32)
StartDrawing(SpriteOutput(0))
  FillArea(0,0,RGB(255,255,255),RGB(150,150,150))
  Line(31,0,-32,32,RGB(50,50,50))
  FillArea(31,31,RGB(50,50,50),RGB(50,50,50))
  Line(0,0,32,32,RGB(90,90,90))
StopDrawing()

;-Point
CreateSprite(1,32,32)
StartDrawing(SpriteOutput(1))
  Box(0,0,32,32,RGB(150,0,0))
  Ellipse(16,16,7,7,RGB(0,50,0))
StopDrawing()

;-Snake
CreateSprite(2,16,16)
StartDrawing(SpriteOutput(2))
  FillArea(0,0,RGB(255,255,255),RGB(0,55,0))
  FrontColor(155,0,0)
  Line(6,1,4,0)
  Line(6,14,4,0)
  Line(1,6,0,4)
  Line(14,6,0,4)
  Line(4,2,-3,3)
  Line(4,3,-2,2)
  Plot(4,4)
  Line(2,11,3,3)
  Line(3,11,2,2)
  Plot(4,11)
  Line(11,2,3,3)
  Line(11,3,2,2)
  Plot(11,4)
  Line(13,11,-3,3)
  Line(12,11,-2,2)
  Plot(11,11)
  Box(7,5,2,6)
  Box(5,7,6,2)
StopDrawing()

;-Trap
CreateSprite(4,32,32)
StartDrawing(SpriteOutput(4))
  FillArea(0,0,RGB(255,255,255),RGB(0,155,0))
  Box(0,0,32,32,RGB(200,0,0))
  Circle(16,16,8,RGB(255,153,0))
StopDrawing()

Procedure resetpos()
  For a = 0 To 3
    For b = 0 To 1
      pos(a,b) = 2
    Next b
  Next a
  direction = 3
EndProcedure

Procedure createpoint()
  Repeat
    a = Random(31)
    b = Random(23)
    If map(a,b) = 0
      Pointpos(0) = a
      Pointpos(1) = b
      pointplaced = 1
    EndIf
  Until pointplaced = 1
  pointplaced = 0
EndProcedure

Procedure move()
  collo = 1
  If movetime <= ElapsedMilliseconds()
    Repeat
      StartDrawing(ScreenOutput())
        Select direction
          Case 0
            If Point(pos(0,0)*16,(pos(0,1) - 1)*16) = 148 Or Point(pos(0,0)*16,(pos(0,1) - 1)*16) = 12288
              createpoint()
              points = points + 10
              collo = 0
            ElseIf Point(pos(0,0)*16,(pos(0,1) - 1)*16) <> 39424
              direction = Random(3)
              collis = collis + 1
              If Point(pos(0,0)*16,(pos(0,1) - 1)*16) = 206 Or Point(pos(0,0)*16,(pos(0,1) - 1)*16) = 39679
                trap = 1
              EndIf
            Else
              collo = 0
            EndIf
          Case 1
            If Point(pos(0,0)*16,(pos(0,1) + 1)*16) = 148 Or Point(pos(0,0)*16,(pos(0,1) + 1)*16) = 12288
              createpoint()
              points = points + 10
              collo = 0
            ElseIf Point(pos(0,0)*16,(pos(0,1) + 1)*16) <> 39424
              direction = Random(3)
              collis = collis + 1
              If Point(pos(0,0)*16,(pos(0,1) + 1)*16) = 206 Or Point(pos(0,0)*16,(pos(0,1) + 1)*16) = 39679
                trap = 1
              EndIf
            Else
              collo = 0
            EndIf
          Case 2
            If Point((pos(0,0) - 1)*16,pos(0,1)*16) = 148 Or Point((pos(0,0) - 1)*16,pos(0,1)*16) = 12288
              createpoint()
              points = points + 10
              collo = 0
            ElseIf Point((pos(0,0) - 1)*16,pos(0,1)*16) <> 39424
              direction = Random(3)
              collis = collis + 1
              If Point((pos(0,0) - 1)*16,pos(0,1)*16) = 206 Or Point((pos(0,0) - 1)*16,pos(0,1)*16) = 39679
                trap = 1
              EndIf
            Else
              collo = 0
            EndIf
          Case 3
            If Point((pos(0,0) + 1)*16,pos(0,1)*16) = 148 Or Point((pos(0,0) + 1)*16,pos(0,1)*16) = 12288
              createpoint()
              points = points + 10
              collo = 0
            ElseIf Point((pos(0,0) + 1)*16,pos(0,1)*16) <> 39424
              direction = Random(3)
              collis = collis + 1
              If Point((pos(0,0) + 1)*16,pos(0,1)*16) = 206 Or Point((pos(0,0) + 1)*16,pos(0,1)*16) = 39679
                trap = 1
              EndIf
            Else
              collo = 0
            EndIf
        EndSelect
        If collis = 100
          resetpos()
        EndIf
      StopDrawing()
    Until collo = 0
    If trap = 1
      lives = lives - 1
      trap = 0
    EndIf
    Select direction
      Case 0
        pos(3,0) = pos(2,0)
        pos(2,0) = pos(1,0)
        pos(1,0) = pos(0,0)
        pos(3,1) = pos(2,1)
        pos(2,1) = pos(1,1)
        pos(1,1) = pos(0,1)
        pos(0,1) = pos(0,1) - 1
      Case 1
        pos(3,0) = pos(2,0)
        pos(2,0) = pos(1,0)
        pos(1,0) = pos(0,0)
        pos(3,1) = pos(2,1)
        pos(2,1) = pos(1,1)
        pos(1,1) = pos(0,1)
        pos(0,1) = pos(0,1) + 1
      Case 2
        pos(3,0) = pos(2,0)
        pos(2,0) = pos(1,0)
        pos(1,0) = pos(0,0)
        pos(3,1) = pos(2,1)
        pos(2,1) = pos(1,1)
        pos(1,1) = pos(0,1)
        pos(0,0) = pos(0,0) - 1
      Case 3
        pos(3,0) = pos(2,0)
        pos(2,0) = pos(1,0)
        pos(1,0) = pos(0,0)
        pos(3,1) = pos(2,1)
        pos(2,1) = pos(1,1)
        pos(1,1) = pos(0,1)
        pos(0,0) = pos(0,0) + 1
    EndSelect
    movetime = ElapsedMilliseconds() + speed
  EndIf
EndProcedure

Procedure createlevelsprite()
  Select level
    Case "level1"
      Restore level1
      For a = 0 To 23
        For b = 0 To 31
          Read map(b,a)
        Next b
      Next a
    Case "level2"
      Restore level2
      For a = 0 To 23
        For b = 0 To 31
          Read map(b,a)
        Next b
      Next a
    Case "level3"
      Restore level3
      For a = 0 To 23
        For b = 0 To 31
          Read map(b,a)
        Next b
      Next a
    Case "level4"
      Restore level4
      For a = 0 To 23
        For b = 0 To 31
          Read map(b,a)
        Next b
      Next a
  EndSelect
  CreateSprite(3,1024,768)
  TransparentSpriteColor(3,0,0,0)
  UseBuffer(3)
  For a = 0 To 23
    For b = 0 To 31
      Select map(b,a)
        Case 1
          DisplaySprite(0,b*32,a*32)
        Case 2
          DisplaySprite(4,b*32,a*32)
      EndSelect
    Next b
  Next a
  UseBuffer(-1)
EndProcedure

Procedure msg(message.s)
  Repeat
  ExamineKeyboard()
  ClearScreen(0,155,0)
  StartDrawing(ScreenOutput())
    Locate(100,200)
    DrawingMode(1)
    DrawText(message)
  StopDrawing()
  FlipBuffers()
  Until KeyboardPushed(1)
EndProcedure

Procedure startlevel()
  createlevelsprite()
  createpoint()
  speed = 100
  nextlevel = 100
  punkte = 400
  Repeat
  ExamineKeyboard()
  ClearScreen(0,155,0)
  DisplaySprite(2,pos(0,0)*16,pos(0,1)*16)
  DisplaySprite(2,pos(1,0)*16,pos(1,1)*16)
  DisplaySprite(2,pos(2,0)*16,pos(2,1)*16)
  DisplaySprite(2,pos(3,0)*16,pos(3,1)*16)
  DisplayTransparentSprite(3,0,0)
  DisplaySprite(1,pointpos(0)*32,pointpos(1)*32)
  StartDrawing(ScreenOutput())
    Locate(0,0)
    DrawText("Leben: " + Str(lives) + "   Punkte: " + Str(points))
  StopDrawing()
  If points - standartpoints = nextlevel
    speed = speed / 2
    nextlevel = nextlevel * 2
    lives = lives + 1
  EndIf
  If points - standartpoints = 500
    Select level
      Case "level1"
        standartpoints = 500
        level = "level2"
        resetpos()
        startlevel()
      Case "level2"
        standartpoints = 1000
        level = "level3"
        resetpos()
        startlevel()
      Case "level3"
        standartpoints = 1500
        level = "level4"
        resetpos()
        startlevel()
      Case "level4"
        msg("Sie haben alle 4 Level geschaft d.h. sie haben einen Punktestand von 2000 erreicht (weiter mit ESC)")
        gameover = 1
    EndSelect
  EndIf
  move()
  If KeyboardPushed(#pb_key_escape)
    gameover = 1
  EndIf
  If KeyboardPushed(#pb_key_up)
    direction = 0
  EndIf
  If KeyboardPushed(#pb_key_down)
    direction = 1
  EndIf
  If KeyboardPushed(#pb_key_left)
    direction = 2
  EndIf
  If KeyboardPushed(#pb_key_right)
    direction = 3
  EndIf
  If lives < 0
    msg("Das Spiel ist zuende. Sie haben einen Punktestand von " + Str(points) + " Punkten erreicht. (weiter mit ESC)")
    gameover = 1
  EndIf
  FlipBuffers()
  Until gameover = 1
  gameover = 0
EndProcedure

Repeat
ExamineKeyboard()
ClearScreen(0,155,0)
StartDrawing(ScreenOutput())
  DisplaySprite(2,500,500)
  If menu = 0
    Box(40,40,200,40,RGB(200,0,0))
  Else
    Box(40,40,200,40,RGB(0,0,200))
  EndIf
  If menu = 1
    Box(40,120,200,40,RGB(200,0,0))
  Else
    Box(40,120,200,40,RGB(0,0,200))
  EndIf
  If menu = 2
    Box(40,200,200,40,RGB(200,0,0))
  Else
    Box(40,200,200,40,RGB(0,0,200))
  EndIf
  If menu = 3
    Box(40,280,200,40,RGB(200,0,0))
  Else
    Box(40,280,200,40,RGB(0,0,200))
  EndIf
  FrontColor(0,0,0)
  DrawingMode(1)
  Locate(50,50)
  DrawText("Neues Spiel")
  Locate(50,130)
  DrawText("Level Spielen")
  Locate(50,210)
  DrawText("Level Editor")
  Locate(50,290)
  DrawText("Beenden")
StopDrawing()
If KeyboardPushed(#pb_key_down) <> 0 And menu < 3 And change = 0
  menu = menu + 1
  change = 1
EndIf
If KeyboardPushed(#pb_key_up) <> 0 And menu > 0 And change = 0
  menu = menu - 1
  change = 1
EndIf
If KeyboardReleased(#pb_key_up) Or KeyboardReleased(#pb_key_down)
  change = 0
EndIf
If KeyboardPushed(#pb_key_return)
  Select menu
    Case 0
      movetime = ElapsedMilliseconds() + speed
      lives = 5
      points = 0
      standartpoints = 0
      level = "level1"
      resetpos()
      startlevel()
    Case 1
      msg("Leider kann man noch keine Externen Levels spielen weil in dem Contest keine Externen dateien erlaubt sind (weiter mit ESC)")
    Case 2
      msg("Leider geht der Level Editor noch nicht weil in dem Contest keine Externen dateien erlaubt sind (weiter mit ESC)")
    Case 3
      quit = 1
  EndSelect
EndIf
FlipBuffers()
Until quit = 1

End

DataSection

level1:
Data.b 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Data.b 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
Data.b 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,2
Data.b 2,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,2
Data.b 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2
Data.b 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2
Data.b 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2

EndDataSection
kluger Mann + kluge Frau = Romanze | dummer Mann + dumme Frau = Schwangerschaft
kluger Mann + dumme Frau = Affäre | dummer Mann + kluge Frau = Shopping <)
Antworten