Lames Spiel
Übersicht

BlitzBasic303Betreff: Lames Spiel |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Hi!
Der Code ist sehr langsam, das liegt an CameraRange hat jemand eine Antwort wie ich das Spiel schneller kriege ![]() Code: [AUSKLAPPEN] Graphics3D 800,600 SetBuffer BackBuffer() camera=CreateCamera() Print "Laden.........." Print "Bitte haben sie Geduld!" j = LoadSound("musik.mp3") LoopSound(j) o = PlaySound(j) burg = LoadMesh("castle1.x") PositionEntity burg, 2000,-18,0 EntityType burg, 2 WireFrame(0) UpdateWorld RenderWorld tex=LoadTexture( "dragon.bmp" ) dragon=LoadMD2( "dragon.md2" ) EntityTexture dragon,tex PositionEntity dragon,2000,60,0 TurnEntity dragon,0,180,0 AnimateMD2 dragon,1,.05,0,40 EntityType dragon, 7 PositionEntity camera, 0, 600, 0 EntityType camera, 1 tex=LoadTexture( "ground.bmp") ScaleTexture tex,10,10 light=CreateLight(1) RotateEntity light,0,0,90 terr=LoadTerrain( "hmap_1024.bmp" ) ScaleEntity terr,20,800,20 PositionEntity terr,-20*512,0,-20*512 EntityFX terr,1 EntityType terr,3 EntityTexture terr, tex CameraRange camera,0.1,1000 tree_sprite=LoadMesh( "tree.3ds") EntityType tree_sprite, 11 For h = 1 To 1000 baumdieerste=CopyEntity (tree_sprite) c = Rnd(-10000,10000) e = Rnd(-10000,10000) PositionEntity baumdieerste,c,0,e Next CameraClsColor camera,0,192,255 CameraRange camera , 0.1,100000 While Not KeyHit(1) UpdateWorld RenderWorld If KeyDown(208) Then MoveEntity camera, 0,0,-1 End If If KeyDown(200) Then MoveEntity camera, 0, 0, 2 MoveEntity camera, 0, 5, 0 MoveEntity camera, 0, -5, 0 End If If KeyDown(203) Then TurnEntity camera, 0, 3, 0 End If If KeyDown(205) Then TurnEntity camera, 0, -3, 0 End If If KeyHit(57) Then MoveEntity camera, 0, 50, 0 MoveEntity camera, 0,-2,0 End If MoveEntity camera,0,-2,0 WireFrame(0) UpdateWorld RenderWorld Flip Collisions 1,2,2,End Collisions 1,3,2,End Collisions 2,3,2,End Collisions 1,7,2,End Collisions 1,6,2,End Collisions 1,5,2,End Collisions 3,5,2,End Collisions 5,3,2,End Collisions 4,5,2,End Collisions 4,5,2,End Collisions 4,5,2,End Collisions 4,2,2,End Collisions 4,6,2,End Collisions 4,5,2,End Collisions 4,3,2,End Wend End Mfg BlitzBasic303 |
||
![]() |
Wild-Storm |
![]() Antworten mit Zitat ![]() |
---|---|---|
weil du....
2mal renderworld benutzt, 2mal updateworld benutzt, die collisionen in der schleife bestimmst (???) weil du 1000 sprites erstellst weil du eine camrange mit 0.1,100000 irgendwas machst, was eigentlich totaler krampf ist und weil du nicht coden kannst..... vertief dich erstmal in die anfangstutorials und spiel nicht mit befehlen rum, deren macht du nicht kennst. ps: tolle website übrigens: www.blitzbase.de |
||
Visit http://www.next-dimension.org
------------------------------------------------- Freeware Modelle, Texturen & Sounds: http://www.blitzforum.de/forum...hp?t=12875 |
erforderlich |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
@ wildstorm
3x updateWorld & 3x RenderWorld 8) |
||
![]() |
Wild-Storm |
![]() Antworten mit Zitat ![]() |
---|---|---|
ja, aber nur zweimal in der schleife | ||
Visit http://www.next-dimension.org
------------------------------------------------- Freeware Modelle, Texturen & Sounds: http://www.blitzforum.de/forum...hp?t=12875 |
TOONY |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
hab mal versucht was zu retten,
ist aber ungetestet! Code: [AUSKLAPPEN] Graphics3D 800,600 SetBuffer BackBuffer() camera=CreateCamera() Print "Laden.........." Print "Bitte haben sie Geduld!" j = LoadSound("musik.mp3") LoopSound(j) o = PlaySound(j) burg = LoadMesh("castle1.x") PositionEntity burg, 2000,-18,0 EntityType burg, 2 tex=LoadTexture( "dragon.bmp" ) dragon=LoadMD2( "dragon.md2" ) EntityTexture dragon,tex PositionEntity dragon,2000,60,0 TurnEntity dragon,0,180,0 AnimateMD2 dragon,1,.05,0,40 EntityType dragon, 7 PositionEntity camera, 0, 600, 0 EntityType camera, 1 CameraRange camera,1,1000 CameraClsColor camera,0,192,255 tex=LoadTexture( "ground.bmp") ScaleTexture tex,10,10 light=CreateLight(1) RotateEntity light,0,0,90 terr=LoadTerrain( "hmap_1024.bmp" ) ScaleEntity terr,20,800,20 PositionEntity terr,-20*512,0,-20*512 EntityFX terr,1 EntityType terr,3 EntityTexture terr, tex tree_sprite=LoadMesh( "tree.3ds") EntityType tree_sprite, 11 For h = 1 To 1000 baumdieerste=CopyEntity (tree_sprite) c = Rnd(-10000,10000) e = Rnd(-10000,10000) PositionEntity baumdieerste,c,0,e Next Collisions 1,2,2,End Collisions 1,3,2,End Collisions 2,3,2,End Collisions 1,7,2,End Collisions 1,6,2,End Collisions 1,5,2,End Collisions 3,5,2,End Collisions 5,3,2,End Collisions 4,5,2,End Collisions 4,5,2,End Collisions 4,5,2,End Collisions 4,2,2,End Collisions 4,6,2,End Collisions 4,5,2,End Collisions 4,3,2,End WireFrame(0) While Not KeyHit(1) cls If KeyDown(208) Then MoveEntity camera, 0,0,-1 If KeyDown(200) Then MoveEntity camera, 0, 0, 2 MoveEntity camera, 0, 5, 0 MoveEntity camera, 0, -5, 0 End If If KeyDown(203) Then TurnEntity camera, 0, 3, 0 If KeyDown(205) Then TurnEntity camera, 0, -3, 0 If KeyHit(57) Then MoveEntity camera, 0, 50, 0 MoveEntity camera, 0,-2,0 End If MoveEntity camera,0,-2,0 UpdateWorld RenderWorld Flip Wend End |
||
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group