BlitzCodeCompo #01 - Aufgabe
Übersicht Sonstiges SmalltalkGehe zu Seite Zurück 1, 2, 3 ... , 12, 13, 14 Weiter
StepTiger |
Fr, Apr 06, 2007 0:33 Antworten mit Zitat |
|
---|---|---|
Mit Wand meine ich die komischen Teile, die einem entgegen kommen. Aliens, Wände oder was auch immer das darstellen soll.
Es dauert etwa eine halbe Sekunde, bis ich mit den Viechern kollidiere. Da bleibt nicht wirklich Zeit zum Abschießen. |
||
Noch gestern standen wir am Abgrund, doch heute sind wir schon einen Schritt weiter.
Computer: AMD Sempron 3000+; ATI Radeon 9800 Pro; 512 MB DDR RAM 400Mhz; Asus E7N8X-E Deluxe; Samsung 200GB HD 5.4ns acces t Gewinner: BP Code Compo #2 Π=3.141592653589793238...<--- und das aus dem kopf Seit der Earthlings-Diskussion überzeugter Fleisch(fr)esser. |
porcus |
Fr, Apr 06, 2007 12:10 Antworten mit Zitat |
|
---|---|---|
Mr.HydeNewsposter |
Fr, Apr 06, 2007 12:56 Antworten mit Zitat |
|
---|---|---|
und nochmal zum klicken: http://www.f-once.pri.ee/uploa...Source.zip
kann doch nicht so schwer sein, einen klickbaren Link zu produzieren. Bitteschön. MfG Hyde |
||
BBP News RSS | Chaos Interactive | Watanien 2 Screens, Infos und Download | Watanien 2 Worklog | PuzzleMasters
http://abgeordnetenwatch.de - http://www.regierungs-beratung.de - Der Regierung auf die Finger schauen |
FreetimeCoder |
Sa, Apr 07, 2007 7:16 Antworten mit Zitat |
|
---|---|---|
Ich werd mal meinen Source auch veröffentlichen, sonst verpass ich noch das Abgabedatum
Zitat: Graphics3D 800,600,0,2:SetBuffer BackBuffer():Global Rechts=205,Links=203,Up=200,Down=208,A=30,S=31:Const Player=1,Scene=2:Global Speed#=0.1:Global Ship=CreateSphere():ScaleEntity Ship,0.5,0.2,0.5:EntityColor Ship,255,0,0:Kuppel=CreateSphere():ScaleEntity Kuppel,0.2,0.2,0.2:PositionEntity Kuppel,0,0.2,0:EntityParent Kuppel,Ship:ShipPivot=CreatePivot(Ship):PositionEntity ShipPivot,0,6,-6:EntityType Ship,Player:Kamera=CreateCamera():EntityType Kamera,Player:PositionEntity Kamera,0,5,0:Light=CreateLight():RotateEntity Light,0,45,0
Type Blocker Field Alpha# Field Rotspeed# Field Cube[10] Field Mass End Type Global Gameover=0:SeedRnd MilliSecs():Time=MilliSecs():Global Distanz#=0:Tube=CreateCylinder(20,0):FlipMesh Tube:RotateEntity Tube,90,0,0:ScaleEntity Tube,15,100,15:EntityType Tube,Scene:Cone=CreateCone(20,0):FlipMesh Cone:RotateEntity Cone,90,0,0:ScaleEntity Cone,15,10,15:PositionEntity Cone,0,0,45:Timer=CreateTimer(100):Collisions Player,Scene,2,2 While Not KeyHit(1):Cls:WaitTimer Timer If MilliSecs()-Time>NextBlock/(Speed*10) NextBlock=Rnd(2000,5000):CreateBlocker(50,Rnd(0,360),Rnd(-2,2),Rnd(1,10)):Time=MilliSecs() UpdateBlockers() If KeyDown(Up) MoveEntity Ship,0,0.2,0 If KeyDown(Down) MoveEntity Ship,0,-0.2,0 If KeyDown(Rechts) MoveEntity Ship,0.2,0,0 If KeyDown(Links) MoveEntity Ship,-0.2,0,0 If KeyDown(A) And Speed#<=0.3 Speed#=Speed+0.01 If KeyDown(S) And Speed#>=0.1 Speed#=Speed-0.01 If Gameover=1 GameoverText Distanz=Distanz+Speed:Update_Kamera(Shippivot,Ship,Kamera,0.09) UpdateWorld:RenderWorld:Color 255,0,0 Text GraphicsWidth()/2,0,"Du bist schon "+Int(Distanz)+"m geflogen",1:Text GraphicsWidth()/2,20,"Du bist "+Speed*10+" km/h schnell",1:Text GraphicsWidth()/2,40,"Mit A/S regulierst du deine Geschwindigkeit",1:Text GraphicsWidth()/2,60,"Die Pfeiltasten regeln den Rest",1:Flip:Wend:End Function GameoverText() Cls:FlushKeys():Text GraphicsWidth()/2,GraphicsHeight()/2-10,"Du bist "+Int(Distanz)+"m geflogen",1:Text GraphicsWidth()/2,GraphicsHeight()/2+10,"Drücke Enter zum Neustarten",1 Gameover=0:PositionEntity Ship,0,0,0 For B.Blocker=Each Blocker For i=0 To B\Mass FreeEntity B\Cube[i] Next Delete B Next Flip:WaitKey() If KeyHit(28) Distanz=0:Speed#=0.1:Return Else GameoverText() EndIf End Function Function Update_Kamera(Aim,Target,Objekt,Speed#) x#=EntityX(Aim,1)-EntityX(Objekt,1):y#=EntityY(Aim,1)-EntityY(Objekt,1):z#=EntityZ(Aim,1)-EntityZ(Objekt,1):TranslateEntity Objekt,x*Speed,y*speed,z*speed:PointEntity Objekt,Target End Function Function CreateBlocker(Pos#,Rot#,RotSpeed#,Mass) Ro=Rnd(50,200):Gr=Rnd(50,200):Bl=Rnd(50,200) B.Blocker=New Blocker B\Mass=Mass:B\Rotspeed#=Rotspeed:B\Alpha#=0 For i=0 To Mass B\Cube[i]=CreateCube():PositionMesh B\Cube[i],Rnd(-5,5),Rnd(-5,5),0:PositionEntity B\Cube[i],0,0,Pos:ScaleMesh B\Cube[i],Rnd(1,3),Rnd(1,3),Rnd(1,3):EntityColor B\Cube[i],Ro,Gr,Bl Next End Function Function UpdateBlockers() For B.Blocker=Each Blocker For i=0 To B\Mass TurnEntity B\Cube[i],0,0,B\Rotspeed#:MoveEntity B\Cube[i],0,0,-Speed If EntityZ(B\Cube[i])<10 And EntityZ(B\Cube[i])>-5 If MeshesIntersect(B\Cube[i],Ship) Gameover=1 EndIf EndIf Next If EntityZ(B\Cube[1])<-10 For i=0 To B\Mass FreeEntity B\Cube[i] Next Delete B EndIf Next End Function Klaut doch soviel ihr wollt (und könnt xD) |
||
"Wir haben keine Chance, aber wir werden sie nutzen!"
Projekte: Dexterity Ball (100%) Aquatic Atmosfear (22 % ca 4700 Zeilen) eingefrohren mangels OOP Fähigkeiten von Blitz (ehemals Uboot) PC: Intel D 3 GHz | NVidiaGforce 6700 256 Mb | 1024 Mb DDR RAM 400 Mhz | 2x160 GB S-ATA |
RallimenSieger des 30-EUR-Wettbewerbs |
Sa, Apr 07, 2007 11:16 Antworten mit Zitat |
|
---|---|---|
Hallo, hab das jetzt mit der Highscore drin
läuft nur unter BB3D und BB2D wegen dem Input und Locate Code: [AUSKLAPPEN] Data 4,13,2,7,2,1,2,1,10,1,2,2,5,5,2,1,10,3,2,7,6,0
W1=800B1=600Graphics W1,B1:SetFont LoadFont("BLITZ",25)H=CreateTimer(60)SeedRnd(MilliSecs()) Global Z#,J#,M=1,N,O#=100,K#,L#,B=CreateImage(7,14) Type C Field X,Y,Z,W,V End Type:Type D Field X,Y,H,W,C,N End Type:Type F Field X#,Y#,G,T,S# End Type:Type G Field Z$,E End Type T=23:U=13W=CreateImage(45,26,3)SetBuffer ImageBuffer(W,0)C$FFFF00Oval 0,0,45,20,1Rect 1,25,5,1Rect 39,25,5,1C 0Oval 5,3,35,13C$FFFFFFRect 21,8,2,2Rect 20,11,4,3Line 2,25,8,16Line 4,25,10,16Line 42,25,36,16Line 40,25,34,16C$FFLine 20,3,13,14Line 24,3,31,14C$FFFFFFSetBuffer ImageBuffer(W,1)DrawImage W,0,0,0Rect 10,7,2,2Rect 9,10,4,3SetBuffer ImageBuffer(W,2)DrawImage W,0,0,1Rect 32,7,2,2Rect 31,10,4,3MidHandle(W)SetBuffer ImageBuffer(B)Repeat If F1 F1=0 Else F1=$FFFFFF C F1:Read AZ:If AZ=0 Exit For T1=1 To AZ:Plot X,Y:Y=Y+1If Y>13Y=0X=X+1 Next Forever GA 0SetBuffer BackBuffer()While Not KeyDown(1)V=Z-W1/2 If V>Q-W1 V=Q-W1 If V<0 V=0 Origin-V,0 TP=0For A.D=Each D C A\C:Rect A\X,A\Y,A\W,A\H C$FFFFFFRect A\X,A\Y,A\W,A\H,0Text A\X+A\W/2,500,A\N,1 Next For P.C=Each C If P\W Text 250+V,5,"ZUM HAUS NR. "Text 450+V+TP,5,+P\Z:TP=65Else DrawImage B,P\X,P\Y Next Select SV Case 0Q=1200R =0AL=0AS=4M=1SV=SV+1Case 1Delete Each D:Delete Each C:AL=AL+1Q=Q+300X=0HN=0 While X<Q HN=HN+1A.D=New D:A\N=HN:A\X=X A\W=Rand(65,190)A\Y=Rand(100,500)A\H=B1-A\Y:A\C=Rnd($FFFFF)X=X+A\W-1If X>Q Q=X Wend:A.D=First D A\Y=150+U A\H=B1-A\Y:For T1=0 To Q/300P.C=New C P\X=Rand(99,Q)For A.D=Each D:If P\X=>A\X And P\X<A\X+A\W If P\X=A\X P\X=P\X+10 If P\X+10>A\X+A\W P\X=P\X-10 P\Y=A\Y-14P\Z=Rand(1,HN)P\V=A\N:If P\Z=P\V T1=T1-1:Delete P Exit:EndIf:Next:Next SV=2Case 2If M And Z<400 Z# =33J# =150O=100S# =100AS=AS-1 If AS SV=3:M=0Else AT=240SV=5 Else:Z=Z-5 EndIf Case 3C$80C0Rect 10,120,20,42:c$ff0Text 12,125,"T"If X If ImageRectOverlap(W,Z,J,10,120,20,30) If S<99.5If R>0S=S+.5R=R-3 Else If S<=0 KS 99,100,U:X=0 EndIf If S<=0If R<=0KS 99,100,U EndIf If M Z=Z-1 Else If X If KeyHit(200)X=0 Else If S>0If LF=0K=K+(KeyDown(205)-KeyDown(203))*.03L=L+(KeyDown(208)-KeyDown(200))*.03S=S-.02 L=L+.003*(N+1)EndIf:O1#=Z:Z=Z+K:O2#=J:J=J+L:If Z<T+2 Z=T+2K=0 If Z+T>Q Z=Q-T:K=0 If J<U J=U:L=0 DrawImage W,Z,J,N:For A.D=Each D If A\X+A\W>V And A\X<V+W1 If ImageRectCollide(W,Z,J,0,A\X,A\Y,A\W,A\H) PW=K^2+L^2 If Z-T+1>A\X And Z+T<A\X+A\W X=1Y=A\N J=A\Y-U KS PW,PW*5Else Z=O1 J=O2 KS PW,PW*5+5 L=0:K=0Exit EndIf EndIf Next:EndIf:For P.C=Each C If M If P\W P\W=0 If X If P\W If P\Z=Y R=R+Abs(P\V-P\Z)*90+50N=N-1Delete P:Exit Else If ImagesOverlap(W,Z,J,B,P\X,P\Y)If N<2N=N+1P\W=1Exit EndIf:EndIf:Next:If M SV=2 If First C=Null SV=4 Case 4If Z<100SV=1M=1AS=AS+1Else Text 400+V,20,"SUPER... Auftrag erledigt",1Z=Z-5 Case 5Text 150,50,"ALLE SCHIFFE ZERSTöRT,DU LOOSER!"If AT=240 GA 0Locate 0,0HH.G=New G:HH\Z=Input("Name:")HH\E=R/10For HB.G=Each G:If HH\E>HB\E Insert HH Before HB:Exit Next:HS=1For HH.G=Each G:HS=HS+1:If HS>11 Delete HH Next GA 1EndIf:HS=1For HH. G=Each G:Text 150,100+HS*25,LSet(HS,5)+" "+LSet(HH\Z,9)+RSet(HH\E,9)HS=HS+1Next:AT=AT-1If AT=0 SV=0 End Select:WaitTimer H:C$FF0000:For E.F=Each F E\X=E\X+Cos(E\G)*E\S:E\Y=E\Y+Sin(E\G)*E\S:Rect E\X,E\Y,2,2:If E\T<MilliSecs()Delete E Next:Origin 0,0If O<100 O=O+.03:S=S-.01 If S<=0 O=O-.3 C$C0C0C0Rect 0,550,800,50,1C$8000FFRect 190,560,2*S,30Rect 420,560,2*O,30Rect 630,560,150,30C$0Rect 190,560,200,30,0Rect 420,560,200,30,0Rect 630,560,150,30,0C$FFFF00Text 200,562,"TREIBSTOFF"Text 430,562,"SCHILD"Text 632,562,"$ "+R/10If AS>1 DrawImage W,50,575,0 If AS>2DrawImage W,99,575,0 Text 150,560,AL:Flip 0Cls:Wend:End Function GA(A) S$="HS.R"If A D=WriteFile(S)For H.G=Each G:WriteString D,H\Z:WriteInt D,H\E:Next Else Delete Each G D=ReadFile(S)If D=0 GA 1Return While Not Eof(D)H.G=New G:H\Z=ReadString(D)H\E=ReadInt(D)Wend EndIf CloseFile D End Function Function C(A):Color 0,0,A:End Function Function KS(A,V#=0,B=0) If M=0O=O-V:If O<1A=600O=0M=1N=0 For I=1 To A E.F=New F:E\X=Z:E\Y=J+B:E\T=MilliSecs()+Rnd(1500)E\G=Rand(360)E\S=Rnd(5)Next End Function Hier könnt ihr euch die Exe runterladen! Download exe |
||
[BB2D | BB3D | BB+]
|
sirokuhl |
Sa, Apr 07, 2007 13:15 Antworten mit Zitat |
|
---|---|---|
ich geb auch mal meinen code ab:
Code: [AUSKLAPPEN] Graphics3D 1024,768,32,1:SeedRnd MilliSecs()
be=CreateCube():bt=CreateTexture(32,32):EntityTexture be,bt:HideEntity be:se=CreateCone(8,0):EntityColor se,255,255,100:ScaleEntity se,0.2,10,0.2:HideEntity se:l=CreateLight():RotateEntity l,45,0,0:c=CreateCamera():CameraRange c,0.001,200:CameraFogMode c,1:CameraFogRange c,130,200:Dim g(1),g2(1),gr(1):gtx=CreateTexture(128,128) For i=0 To 1:g(i)=CreateCylinder(8,0,c):EntityTexture g(i),gtx:g2(i)=CreateCylinder(8,1,g(i)):EntityFX g2(i),1:FlipMesh g2(i):EntityColor g2(i),50,50,50:ScaleEntity g2(i),1.2,1,1.2:ScaleEntity g(i),0.2,2,0.2:RotateEntity g(i),90,0,0:PositionEntity g(i),-1+2*i,0,0 Next we=CreatePlane():RotateEntity we,-90,0,0:EntityAlpha we,0.2:wt=CreateTexture(256,256):ScaleTexture wt,500,500:EntityTexture we,wt:st=CreateCube():EntityFX st,1:FlipMesh st:stx=CreateTexture(128,128):ScaleTexture stx,0.3,0.3:EntityTexture st,stx:EntityOrder st,1:sb=CreateSprite():sg=CreateTexture(4,4):EntityTexture sb,sg:ScaleSprite sb,0.4,0.4 Type tb Field e,s#,l End Type Type ts Field s End Type Type ex Field x1,x2,t# End Type Type st Field se End Type SetBuffer TextureBuffer(wt):For i=0 To 256:For o=0 To 256:Color Rnd(50),Rnd(200,255),Rnd(150):Plot i,o:Next:Next SetBuffer TextureBuffer(bt):Color 200,200,200:Rect 0,0,32,32:Color 50,50,50:Rect 0,0,32,3:Rect 0,0,3,32:Rect 0,29,32,3:Rect 29,0,3,32 SetBuffer TextureBuffer(gtx):Color 150,150,150:Rect 0,0,128,128:Color 200,200,200:Rect 32,0,64,128 SetBuffer TextureBuffer(stx):For i=0 To 80:co=Rnd(150,255):Color co,co,co:Plot Rnd(128),Rnd(128):Next SetBuffer TextureBuffer(sg):Color 255,255,255:Oval 0,0,4,4 SetBuffer BackBuffer():h#=200:en#=100:v=20 Repeat mx#=MouseXSpeed():my#=MouseYSpeed():MoveMouse 512,384 If mx>5 mx=5 If my>5 my=5 If mx<-5 mx=-5 If my<-5 my=-5 mp#=mp+my:mj#=mj-mx If mp>225 mp=225 If mp<-225 mp=-225 If mj>225 mj=225 If mj<-225 mj=-225 RotateEntity c,mp/5,mj/5,0 If MouseDown(1) And sz<=0 k.ts=New ts:k\s=CopyEntity(se):EntityType k\s,1:EntityBox k\s,-0.2,-10,-0.2,0.4,20,0.4:RotateEntity k\s,EntityPitch(c)-90,EntityYaw(c),0:PositionEntity k\s,EntityX(c),EntityY(c),EntityZ(c):MoveEntity k\s,1-ss*2,-2,0:sz=20:ss=1-ss:gr(ss)=1 EndIf sz=sz-1 If KeyHit(57) And en>=100 wa=1:ShowEntity we:en=0 If wa=1 MoveEntity we,0,-2,0:For b.tb=Each tb:If EntityZ(b\e)<EntityZ(we) b\l=0 Next:If EntityZ(we)>210 wa=0 Else HideEntity we:If en<100 en=en+0.015:PositionEntity we,0,0,0 EndIf If MouseHit(2) And en>=70 sh=200:en=en-70 If sh>0 sh=sh-1:For i=0 To 1:k.ts=New ts:k\s=CopyEntity(se):EntityType k\s,1:EntityBox k\s,-0.2,-10,-0.2,0.4,20,0.4:RotateEntity k\s,-90,0,0:PositionEntity k\s,Rnd(-20,20),Rnd(-20,20),0 Next For i=0 To 1 If gr(i)=1 MoveEntity g(i),0,-0.05,0 If EntityZ(g(i))<-0.3 gr(i) = 0 If gr(i)=0 And EntityZ(g(i))<0 MoveEntity g(i),0,0.02,0 Next If h>70 h=h-0.02 If Rand(h) = 1 b.tb=New tb:b\e=CopyEntity(be):b\s=Rnd(0.1,0.3):b\l=2:EntityType b\e,2:PositionEntity b\e,Rnd(-20,20),Rnd(-20,20),200 EndIf If Rand(2)=1 sd.st=New st:sd\se=CopyEntity(sb):EntityAlpha sd\se,0.5:PositionEntity sd\se,Rnd(-50,50),Rnd(-50,50),0 EndIf For sd.st=Each st:MoveEntity sd\se,0,0,5:If EntityZ(sd\se)>200 FreeEntity sd\se:Delete sd.st Next:Collisions 1,2,1,1 For b.tb=Each tb MoveEntity b\e,0,0,-b\s:If EntityCollided(b\e,1) b\l=b\l-1 If EntityZ(b\e)<0 b\l=0:v=v-1:p=p-1 If b\l<=0 bu.ex=New ex:bu\x2=CreateSphere():EntityColor bu\x2,255,255,150:PositionEntity bu\x2,EntityX(b\e),EntityY(b\e),EntityZ(b\e):p=p+1:FreeEntity b\e:Delete b.tb Next For k.ts=Each ts MoveEntity k\s,0,-5,0:If EntityCollided(k\s,2) Or EntityZ(k\s)>200 FreeEntity k\s:Delete k.ts Next For bu.ex=Each ex bu\t=bu\t+1:ScaleEntity bu\x2,bu\t/5+1,bu\t/5+1,bu\t/5+1:EntityAlpha bu\x2,(60-bu\t)/60 For b.tb=Each tb If EntityDistance(bu\x2,b\e)<bu\t/5+1 b\l=0 Next If bu\t>60 FreeEntity bu\x2:Delete bu.ex EndIf Next UpdateWorld:RenderWorld Color 255,255,255:Line 502,384,522,384:Line 512,374,512,394:Text 5,5,"Energie:"+Int(en):Text 5,20,"Leben:"+v:Text 5,35,"Punkte:"+p:If v<=0 RuntimeError "Deine Punktzahl:"+p Flip Until KeyHit(1):End |
||
biggicekey |
Sa, Apr 07, 2007 14:10 Antworten mit Zitat |
|
---|---|---|
hier mein Beitrag:
https://www.blitzforum.de/upload/file.php?id=1393 und als code: Code: [AUSKLAPPEN] Graphics3D 640,480:SetBuffer BackBuffer():SeedRnd(MilliSecs()):pla=CreatePlane():EntityColor pla,0,255,0:EntityType pla,1:l2=CreateLight(0):MoveEntity l2,0,1000,1000:cu=CreateCube():MoveEntity cu,0,1,10:EntityType cu,1:HideEntity cu:For d=1 To 50 p.gg=New gg:p\ent=CopyEntity(cu):MoveEntity p\ent,Rnd(-1000,1000),0,Rnd(-1000,1000):Next:Global pl=CreateCube():MoveEntity pl,0,1,0:EntityType pl,2:Global e=100:rotpiv=CreatePivot(pl):MoveEntity rotpiv,0,1,0:rot1=CreateCube(rotpiv):ScaleEntity rot1,3,.1,.1:rot2=CreateCube(rotpiv):ScaleEntity rot2,.1,.1,3:sdw=CreateSphere():EntityColor sdw,0,0,0:ScaleEntity sdw,2,0.1,2:cam=CreateCamera():MoveEntity cam,0,5,-10:PointEntity cam,pl:Collisions 2,1,2,2:Collisions 2,3,2,2 :Collisions 5,1,2,1:Collisions 5,3,2,1:Collisions 5,2,2,1:grv#=-0.98:Global s=CreateSphere():ScaleEntity s,.1,.1,.1:EntityRadius s,.1:EntityType s,5:HideEntity s While Not KeyHit(1) Or w=1 Or r=1:PositionEntity cam,EntityX(pl),EntityY(pl),EntityZ(pl):RotateEntity cam,15,EntityYaw(pl),0:MoveEntity cam,0,2.5,-25:If KeyDown(31):If ysp#<0.98:ysp#=ysp#+.005:ElseIf ysp#>0.98:ysp#=ysp#-.005:EndIf:If EntityPitch(pl)>0.4:TurnEntity pl,-0.4,0,0:ElseIf EntityPitch(pl)<-0.4:TurnEntity pl,+0.4,0,0:ElseIf EntityPitch(pl)<0.4 And EntityPitch(pl)>-0.4:RotateEntity pl,0,EntityYaw(pl),EntityRoll(pl):EndIf:If EntityRoll(pl)>0.4:TurnEntity pl,0,0,-.4:ElseIf EntityRoll(pl)<-0.4:TurnEntity pl,0,0,.4:ElseIf EntityRoll(pl)<0.4 And EntityRoll(pl)>-0.4:RotateEntity pl,EntityPitch(pl),EntityYaw(pl),0:EndIf:EndIf:If KeyDown(200) And EntityY(pl)>1.5:TurnEntity pl,.2,0,0:EndIf:If KeyDown(208) And EntityY(pl)>1.5:TurnEntity pl,-.2,0,0:EndIf:If KeyDown(203):If tu#<0.6:tu#=tu#+0.05:EndIf:tu2#=0.2:EndIf:If KeyDown(205):If tu>-0.6:tu#=tu#-0.05:EndIf:tu2#=-0.2:EndIf:If KeyDown(45):tu2#=0.4:EndIf:If KeyDown(46):tu2#=-0.4:EndIf:If EntityY(pl)>1.5:TurnEntity pl,0,tu#,tu2#:EndIf:If tu#>0:tu#=tu#-.01:EndIf:If tu#<0:tu#=tu#+.01:EndIf:If tu2#>0:tu2#=tu2#-.01:EndIf:If tu2#<0:tu2#=tu2#+.01:EndIf:If EntityRoll(pl)>0:rl#=-EntityRoll(pl)*.008:EndIf:If EntityRoll(pl)<0:rl#=-EntityRoll(pl)*.008:EndIf:If EntityPitch(pl)>0:Pit#=-EntityPitch(pl)*.008:EndIf:If EntityPitch(pl)<0:Pit#=-EntityPitch(pl)*.008:EndIf:If EntityY(pl)>1:TurnEntity pl,pit#,0,rl#:EndIf:If KeyDown(30) And ysp#<1.2:ysp#=ysp#+.005:EndIf:If KeyDown(44)And ysp#>0.0:ysp#=ysp#-0.005:EndIf:MoveEntity pl,0,ysp#,0:TurnEntity rotpiv,0,-10*ysp#*2,0:If KeyDown(29) And MilliSecs()>=tfb:tfb=MilliSecs()+333:cs(pl):EndIf:TranslateEntity pl,0,grv#,0:PositionEntity sdw,EntityX(pl),0,EntityZ(pl) For b.sch=Each sch s(b) Next:For t.sk=Each sk k(t) Next:For p.gg=Each gg g(p) Next:m=0:For p.gg=Each gg m=m+1:Next:UpdateWorld:RenderWorld:Text 0,0,"E:"+e:Text 0,10,"G:"+m:If e<=0:r=1:EndIf:If m<1:w=1:EndIf:Flip:Wend:If w=1:While Not KeyHit(1):Cls:Text 0,0,"Gewonnen"Flip:Wend:End::EndIf:If r=1:While Not KeyHit(1):Cls:Text 0,0,"Verloren"Flip:Wend:End::EndIf:End:Type sch Field ent,t End Type:Function cs.sch(entity):b.sch = New sch:b\ent=CopyEntity (s,entity):EntityParent b\ent,0:b\t=200:EntityType b\ent,0:MoveEntity b\ent,0,0,5:EntityType b\ent,5:Return b:End Function:Function s(b.sch):If CountCollisions(b\ent):For k=1 To CountCollisions(b\ent) If EntityCollided(b\ent,1):For p.gg = Each gg If EntityDistance(b\ent,p\ent)<5:sk(b):FreeEntity p\ent:Delete p:Return:EndIf:Next:sk(b):FreeEntity b\ent:Delete b:Return:EndIf If EntityCollided(b\ent,2 ):sk(b):e=e-5:FreeEntity b\ent:Delete b:Return:EndIf Next:EndIf:MoveEntity b\ent,0,0,1:b\t=b\t-1:If b\t<=0:sk(b):FreeEntity b\ent:Delete b:Return:EndIf:End Function:Type sk Field ap#,ent End Type:Function sk.sk( b.sch ):t.sk=New sk:t\ap=-90:t\ent=CopyEntity(s,b\ent):EntityParent t\ent,0:Return t:End Function:Function k(t.sk):If t\ap<270:sz#=Sin(t\ap)*2+2:ScaleEntity t\ent,sz,sz,sz:RotateEntity t\ent,Rnd(360),Rnd(360),Rnd(360):t\ap=t\ap+10:Else:FreeEntity t\ent:Delete t:EndIf:End Function:Type gg Field ent,tfb End Type:Function g(p.gg):If EntityDistance(p\ent,pl)<200:PointEntity p\ent,pl:If MilliSecs()>= p\tfb:p\tfb = MilliSecs()+333:cs(p\ent):EndIf:EndIf:End Function |
||
#45 www.icekeyunlimited.de www.starcrusade.de
Gewinner BCC#17 !!! mit dotkiller Nothing more to register - you've cleaned us out![/size] |
aMulSieger des Minimalist Compo 01/13 |
Sa, Apr 07, 2007 14:45 Antworten mit Zitat |
|
---|---|---|
Der Abgabetermin ist aber erst morgen, falls mich nicht alles täuscht, oder? Das heißt wenn ich morgen Abend abgebe ist das früh genug, oder? | ||
Panic Pong - ultimate action mashup of Pong and Breakout <= aktives Spiele-Projekt, Downloads mit vielen bunten Farben!
advASCIIdraw - the advanced ASCII art program <= aktives nicht-Spiele-Projekt, must-have für ASCII/roguelike/dungeon-crawler fans! Alter BB-Kram: ThroughTheAsteroidBelt - mit Quelltext! | RGB-Palette in 32²-Textur / Farbige Beleuchtung mit Dot3 | Stereoskopie in Blitz3D | Teleport-Animation Screensaver |
sirokuhl |
Sa, Apr 07, 2007 14:52 Antworten mit Zitat |
|
---|---|---|
@aMul: Angst vor Codeklau? | ||
aMulSieger des Minimalist Compo 01/13 |
Sa, Apr 07, 2007 18:35 Antworten mit Zitat |
|
---|---|---|
Eher Komprimierungsmethodenklau
Mein Code ist 19 Zeilen lang. Und das trotz etlicher Ifs und beinahe keiner EndIfs |
||
Panic Pong - ultimate action mashup of Pong and Breakout <= aktives Spiele-Projekt, Downloads mit vielen bunten Farben!
advASCIIdraw - the advanced ASCII art program <= aktives nicht-Spiele-Projekt, must-have für ASCII/roguelike/dungeon-crawler fans! Alter BB-Kram: ThroughTheAsteroidBelt - mit Quelltext! | RGB-Palette in 32²-Textur / Farbige Beleuchtung mit Dot3 | Stereoskopie in Blitz3D | Teleport-Animation Screensaver |
blastar |
Sa, Apr 07, 2007 19:27 Antworten mit Zitat |
|
---|---|---|
aMul hat Folgendes geschrieben: Der Abgabetermin ist aber erst morgen, falls mich nicht alles täuscht, oder? Das heißt wenn ich morgen Abend abgebe ist das früh genug, oder?
würde mich auch mal interessieren aber ich habe da sgenauso verstanden... Vincent hat sich scheinbar etwas rar gemacht... habe nämlich nochmals ein paar bytes freigeschaufelt (ca 50 und bin jedesmal auf s neue überrascht was so alles geht bzw machbar ist) und würde die gern noch für irgendwas nutzen, das würde mind. bis morgen mittag dauern!? |
||
bombing for freedom is like f**king for viginity! |
- Zuletzt bearbeitet von blastar am Sa, Apr 07, 2007 19:30, insgesamt einmal bearbeitet
Shogo |
Sa, Apr 07, 2007 19:30 Antworten mit Zitat |
|
---|---|---|
Hier ist mein Beitrag
Zip-Datei: klick Hab noch etwas die Grafik verbessert? -Das Raumschiff hat jetzt Booster die etwas flackern da es ja nee Notlandung ist und sie nicht richtig funktionieren(hoffe man kann das sehen.) -Die Stadt wuerd zufällig immer neu erstellt -es gibt ein Meer und nen Mond Und hier der code: Code: [AUSKLAPPEN] Global k,q,p.p,s1,fo,f=800,g=600,n=255:Graphics f,g,16,2:HidePointer:seedrnd=millisecs()
k=CreateImage(f,g):q=createimage(6,6):s1=createimage(800,50):fo=createimage(70,30) SetBuffer ImageBuffer(k):Color n,n,0 For I=0 To 100 w=rnd(0,f):u=rnd(0,g):Plot w,u Next SetBuffer ImageBuffer(q):Color n,n,n:Line 0,3,6,3:Line 3,0,3,6:Line 0,0,6,6:Line 0,6,6,0 SetBuffer ImageBuffer(fo):Color 0,84,n:Rect 0,0,69,22:Rect 0,22,2,8:Rect 0,29,9,1:Rect 30,22,10,8:Rect 23,29,23,1:Rect 68,22,1,8:Rect 61,29,8,1:Color 15,15,15:Oval 9,4,10,10:Oval 30,9,10,13:Oval 50,4,10,10 Type p Field x# Field y# End Type Global ff.ff Type ff Field x Field y Field t End Type Global t=createtimer(60) .nn Global l=1,h=0,h1=millisecs(),x7#=600 .n SetBuffer ImageBuffer(s1) Color 0,0,0:Rect 0,0,800,50 For I=0 To 80 kk=rnd(0,4):kk=kk*10:Color n,n,n Rect I*10,kk,10,50-kk Next SetBuffer BackBuffer() Global x#=365,y#=10,a#=0,a2#=0,am#=1,r,b#=0,b2#=0,bm#,b3#=0,o=400,c#=0.01,d#=0.025,x1,x2,y1,x5,x6,s=1,nl=0,nm=0,e#=100,m,m1=0 Select l Case 1 Restore l1 Case 2 Restore l2 Case 3 Restore l3 Case 4 Restore l4 Case 5 Restore l5 End Select Read r, bm, x1, x2, y1, e y1=y1+Rnd(-50,50) Repeat WaitTimer(t):m=millisecs():Cls:DrawBlock k,0,0:feuer(x+10,y+21,10):feuer(x+50,y+21,10):Color 200,200,25:x7=x7-0.004:Oval x7,50,45,45:DrawImage fo,x,y:Color 36,150,36:Line x1,y1-1,x2,y1-1:DrawImage s1,(x1-800),y1-50:DrawImage s1,x2,y1-50:Color 40,80,155:Rect 0,y1,800,600-y1:p=new p:p\x=Rnd(-1600,3200):p\y=-7 For p=each p p\y=p\y+0.5 If r=1 p\x=p\x+bm Else p\x=p\x-bm EndIf DrawImage q,p\x,p\y:If p\y>610 Delete p Next Color n,n,n:Text 0,0,"Treibstoff: "+e:Text 0,20,"Landen:":z%=(a-a2)*1000:Text 0,40,"Landeg.: " + z + "m/h" If nl<>10 h=(m-h1)/1000 Text 0,60,"Zeit: "+h If x5 And x6 Color 0,n,0 Else Color n,0,0 EndIf Oval 65,20,15,15 If a-a2<0.35 Color 0,n,0 Else Color n,0,0 EndIf Oval 135,40,15,15 If s=1 If KeyDown(200) e=e-0.1 If a<=0 a2=a2+d Else a=a-d EndIf EndIf If a2<=0 a=a+c Else a2=a2-c EndIf b=b+c:If b>=bm b=bm If KeyDown(203) e=e-0.1 If b3<=0 b2=b2+d Else b3=b3-d EndIf ElseIf KeyDown(205) e=e-0.1 If b2<=0 b3=b3+d Else b2=b2-d EndIf Else b2=b2-c If b2<0 b2=0 b3=b3-c If b3<0 b3=0 EndIf If a2>am a2=am:If b2>am b2=am:If b3>am b3=am y=y+a-a2 If r=0 x=x-b2+b3-b ElseIf r=1 x=x+b3-b2+b EndIf EndIf If e<=0 And nl=0 e=0:s=0:nl=6 If x>x1 And x<x2 x5=1 Else x5=0 EndIf If x+70>x1 And x+70<x2 x6=1 Else x6=0 EndIf If nl=0 If y+30>=y1 If x5 And x6 s=0:y=y1-30:nl=4:If x5 And x6 And a-a2<0.35 s=0:y=y1-30:l=l+1:nl=8:If x5 And x6=0 s=0:y=y1-30:nl=2:If x5=0 And x6 s=0:y=y1-30:nl=2 EndIf If IMAGERECTCOLLIDE (s1,(x1-800),y1-50,0,x,y,70,30) s=0:nl=12 If IMAGERECTCOLLIDE (s1,x2,y1-50,0,x,y,70,30) s=0:nl=12 If x<-70 Or x>f s=0:nl=13 EndIf Color n,0,0 If nl<>0 And nm=0 If m1 < m m1 = m+5000:nm=1:If l=6 nl=10 EndIf Select nl Case 2 Text o,300,"Du musst ganz auf der Platform landen!",1,1:If m1<m nl=9 Case 4 Text o,300,"Du warst zu schnell!",1,1 If m1<m nl=9 Case 6 Text o,300,"Treibstoff ist alle!",1,1:If m1<m nl=9 Case 8 Color 0,n,0 Text o,300,"Landung war erfolgreich!",1,1:If m1<m nl=9 Case 9 Goto n Case 10 Color 0,n,0 Text o,300,"Du hast deinen Führerschein in " + h + " Sekunden bestanden",1,1:Text 420,320,"Drücke Enter um neu zu starten.",1,1 Case 12 Text o,300,"Das hat bestimmt ein paar Tode gegeben!",1,1:If m1<m nl=9 Case 13 Text o,300,"Du bist zu weit abgetrieben!",1,1:If m1<m nl=9 End Select If nl <> 0 And nl<>10 Text o, 320, "Weiter geht es in 5s.",1,1 If KeyHit(28) Goto nn Flip Until KeyHit(1) Function feuer(xx,yy,bb) For ff=each ff Color n-(ff\t*12),ff\t*1,0:Plot ff\x,ff\y ff\y=ff\y+1-a2:ff\t=ff\t+1:If ff\t>20 Delete ff Next:b5=bb/2:If KeyDown(200) For I=0 To bb-1 If Rnd(0,1) Then ff=new ff:ff\x=xx+I:ff\y=yy:ff\t=Abs(b5-I) Next:EndIf End Function .l1 Data 1,0,100,300,550,100 .l2 Data 1,0.3,100,220,500,100 .l3 Data 1,0.5,300,390,350,100 .l4 Data 0,1,10,110,540,100 .l5 Data 1,0.9,600,680,510,150 |
||
Eingeproggt |
Sa, Apr 07, 2007 20:53 Antworten mit Zitat |
|
---|---|---|
Ich weiss, die Frage ist eine der unpassendsten, trotzdem:
Warum schreiben alle Code: [AUSKLAPPEN] Type xyz Field a Field b Field c End Type und nicht Code: [AUSKLAPPEN] Type xyz Field a,b,c End Type Damit könnte man ungemein sparen |
||
Gewinner des BCC 18, 33 und 65 sowie MiniBCC 9 |
blastar |
Sa, Apr 07, 2007 21:01 Antworten mit Zitat |
|
---|---|---|
...und warum schreibst du
Code: [AUSKLAPPEN] Type xyz Field a,b,c End Type und nicht Code: [AUSKLAPPEN] Type xyz:Field a,b,c:End Type damit sparst du noch mehr! |
||
bombing for freedom is like f**king for viginity! |
aMulSieger des Minimalist Compo 01/13 |
Sa, Apr 07, 2007 21:14 Antworten mit Zitat |
|
---|---|---|
...und warum schreibst du
Code: [AUSKLAPPEN] Type xyz:Field a,b,c:End Type
und nicht Code: [AUSKLAPPEN] Type xyz Field a,b,c End Type
das sieht viel schöner aus. |
||
Panic Pong - ultimate action mashup of Pong and Breakout <= aktives Spiele-Projekt, Downloads mit vielen bunten Farben!
advASCIIdraw - the advanced ASCII art program <= aktives nicht-Spiele-Projekt, must-have für ASCII/roguelike/dungeon-crawler fans! Alter BB-Kram: ThroughTheAsteroidBelt - mit Quelltext! | RGB-Palette in 32²-Textur / Farbige Beleuchtung mit Dot3 | Stereoskopie in Blitz3D | Teleport-Animation Screensaver |
blastar |
Sa, Apr 07, 2007 21:18 Antworten mit Zitat |
|
---|---|---|
...und bringt auch so unheimlich viel! ...habs nur abgeschaut... habe kein BB sondenr nur BMAX und da ist das anders... | ||
bombing for freedom is like f**king for viginity! |
porcus |
Sa, Apr 07, 2007 22:06 Antworten mit Zitat |
|
---|---|---|
aMul hat Folgendes geschrieben: ...und warum schreibst du
Code: [AUSKLAPPEN] Type xyz:Field a,b,c:End Type
und nicht Code: [AUSKLAPPEN] Type xyz Field a,b,c End Type
das sieht viel schöner aus. Nur zur Info: Ein Leerzeichen braucht 2 Byte, ein Doppelpunkt nur einen. |
||
Dreamora |
Sa, Apr 07, 2007 22:10 Antworten mit Zitat |
|
---|---|---|
Falsch.
Ein Enter braucht unter Windows 2 Byte. das ist aber auch das einzige was 2 braucht. (bei UTF würd alles 2 brauchen) |
||
Ihr findet die aktuellen Projekte unter Gayasoft und könnt mich unter @gayasoft auf Twitter erreichen. |
Thorsten |
Sa, Apr 07, 2007 22:12 Antworten mit Zitat |
|
---|---|---|
porcus hat Folgendes geschrieben: Nur zur Info: Ein Leerzeichen braucht 2 Byte, ein Doppelpunkt nur einen. Mit Doppelpunkten funktioniert es aber nicht in B3D ^^ mfG |
||
ByteCroc |
Sa, Apr 07, 2007 23:36 Antworten mit Zitat |
|
---|---|---|
Hier nun auch mein Endprodukt mit Quellcode im Zip-File.
Da es heißt 2 Wochen bis 8.4. ist nicht ganz klar ob man morgen auch noch abgeben darf, denn es steht nicht da einschließlich. https://www.blitzforum.de/upload/file.php?id=1397 Ich weiß nicht ob ich die Zeit habe am nächsten Contest mitzumachen, würde aber trotzdem den nächsten Ausrichter darum bitten einen Zeichen-Zähler zu benutzen statt die Länge des Codes über die tatsächliche Dateigröße zu ermitteln. Der Code wird gegen Ende zu unübersichtlich und raubt wirklich sehr viel Zeit entweder in den komprimierten Code was einzufügen oder den Code anschließend wieder zu komprimieren. Sollte der Contest z.B. 10kb vorsehen wäre der Zeitaufwand extrem. Ich habe nochmal einen solchen Zähler entworfen, er zählt nur den Code plus ein Zeichen pro Zeile extra, somit hat man keinen Vorteil einen Doppelpunkt zu verwenden. Man kann den Code schön formatieren, denn durch Trim$ werden Leerzeichen und TABs am Anfang und Ende einer Zeile auch noch entfernt, die Leerzeichen dazwischen zählen aber ganz normal. Code: [AUSKLAPPEN] bbfile$= "FormatierterQuellcode.bb" fin = ReadFile(bbfile$) While Not Eof(fin) Zeile$ = ReadLine$(fin) ;Lese Zeile ein Zeile$ = Trim$(Zeile$) ;entferne Leerzeichen und Tab's vorne und hinten gesammt = gesammt+Len(Zeile$) + 1 ;füge Zeilenlänge und eine Zeichenlänge hinzu Wend CloseDir(fin) Print gesammt WaitKey() |
||
Gehe zu Seite Zurück 1, 2, 3 ... , 12, 13, 14 Weiter
Übersicht Sonstiges Smalltalk
Powered by phpBB © 2001 - 2006, phpBB Group