~->Ping Pong Extrem<-~
Hier hab ihr mein Programm "Ping Pong Extrem" :multikiller:
zumindest den Code ^^ das spielbare Programm folgt in wenigen Tagen XD
[code]AppTitle"Spiel1"
Graphics 640,480
SetBuffer BackBuffer()
SeedRnd MilliSecs()
a$=Input("Welches level?(schwer,normal,mittel,leicht)")
If a$="mittel" Then
t=CreateTimer(75)
ElseIf a$="normal" Then
t=CreateTimer(50)
ElseIf a$="leicht" Then
t=CreateTimer(25)
If a$="schwer" Then
t=CreateTimer(200)
Else t=CreateTimer(10000)
EndIf
Global bunter.schweif
Type schweif
Field sx
Field sy
Field r
Field g
Field b
End Type
h=0
x=320
y=240
bx=320
by=240
s1x=0
s1y=240
s1p=0
s2x=630
s2y=240
s2p=0
s3x=320
s3y=0
s3p=20
s4x=320
s4y=470
s4p=0
Repeat
xx=Rand(-5,5)
yy=Rand(-5,5)
bxx=Rand(-5,5)
byy=Rand(-5,5)
Until xx<>0 And yy<>0 And byy<>0 And bxx<>0
Ball=LoadImage ("C:BbBall.bmp")
Schlaeger=LoadImage("C:BbSchlaeger.bmp")
schlaegerin=LoadImage("C:BbSchlaeger2.bmp")
hinter=LoadImage("C:Bbhinter.bmp")
ClsColor 0,0,255
Color 0,0,0
Repeat
x=xx+x
y=yy+y
ay=y
ax=x
bx=bx+bxx
by=by+byy
h=h+1
If h<100 Then
bunter.schweif=New schweif
bunter
=Rand(255)
bunterg=Rand(255)
bunter=Rand(255)
EndIf
If ImagesOverlap (Ball,x,y, Schlaeger,s1x,s1y) Or ImagesOverlap (Ball,x,y, Schlaeger,s2x,s2y) Then
xx=xx*-1
EndIf
If ImagesOverlap (Ball,x,y, schlaegerin,s3x,s3y) Or ImagesOverlap (Ball,x,y, schlaegerin,s4x,s4y)Then
yy=yy*-1
EndIf
If ImagesOverlap (Ball,bx,by, Schlaeger,s1x,s1y) Or ImagesOverlap (Ball,bx,by, Schlaeger,s2x,s2y) Then
bxx=bxx*-1
EndIf
If ImagesOverlap (Ball,bx,by, schlaegerin,s3x,s3y) Or ImagesOverlap (Ball,bx,by, schlaegerin,s4x,s4y)Then
byy=byy*-1
EndIf
If x<0 Then
s1p=s1p+1
xx=Rand(1,5)
yy=Rand(1,5)
x=320
y=240
EndIf
If x>640 Then
s2p=s2p+1
xx=Rand(1,5)
yy=Rand(1,5)
x=320
y=240
EndIf
If by>480 Then
s4p=s4p+1
bxx=Rand(1,5)
byy=Rand(1,5)
bx=320
by=240
EndIf
If by<0 Then
s3p=s3p-1
bxx=Rand(1,5)
byy=Rand(1,5)
bx=320
by=240
EndIf
If bx<0 Then
s1p=s1p+1
bxx=Rand(1,5)
byy=Rand(1,5)
bx=320
by=240
EndIf
If bx>640 Then
s2p=s2p+1
bxx=Rand(1,5)
byy=Rand(1,5)
bx=320
by=240
EndIf
If y>480 Then
s4p=s4p+1
xx=Rand(1,5)
yy=Rand(1,5)
x=320
y=240
EndIf
If y<0 Then
s4p=s3p-1
xx=Rand(1,5)
yy=Rand(1,5)
x=320
y=240
EndIf
If KeyDown (200) Then
s2y=s2y-5
EndIf
If KeyDown (208) Then
s2y=s2y+5
EndIf
If KeyDown (17) Then
s1y=s1y-5
EndIf
If KeyDown (31) Then
s1y=s1y+5
EndIf
If KeyDown (17) Then
s3y=s3y-5
EndIf
If KeyDown (31) Then
s3y=s3y+5
EndIf
If s1y<0 Then s1y=640
If s1y>480 Then s1y=0
If s2y<0 Then s2y=640
If s2y>480 Then s2y=0
If s3y<0 Then s3y=640
If s3y>480 Then s3y=0
;SPIELER 1 KI
If x<bx Then
If s1yy Then s1y=s1y-5
EndIf
If x>bx Then
If s1yby Then s1y=s1y-5
EndIf
;SPIELER 3 KI
If y<by Then
If s3xx Then s3x=s3x-5
EndIf
If y>by Then
If s3xbx Then s3x=s3x-5
EndIf
;SPILER 4KI
If y>by Then
If s4xx Then s4x=s4x-5
EndIf
If y<by Then
If s4xbx Then s4x=s4x-5
EndIf
Flip
Cls
Color 125,125,125
Text s2x-20,s2y,s2p
Text s1x+40,s1y,s1p
Text s3x,s3y+40,s3p
Text s4x,s4y-10,s4p
For bunter.schweif <=Each schweif
axx=buntersx
ayy=buntersy
buntersx=ax
buntersy=ay
ax=axx
ay=ayy
Color bunter
,bunterg,bunter
Oval buntersx,buntersy,10,10
Next
DrawImage Ball,bx,by
DrawImage Ball,x,y
DrawImage Schlaeger,s1x,s1y
DrawImage Schlaeger,s2x,s2y
DrawImage schlaegerin,s3x,s3y
DrawImage schlaegerin,s4x,s4y
WaitTimer(t)
Forever
;><)))>
;~><)))>~><)))>
;><)))>~><)))>~><)))>
[/code]