DarkBASIC Pro
Versão de Avaliação
Patch 5.7
USB Dongle
Forum
Indique
Lista de Email
Diário Antigo
Outros Produtos
Cartography Shop
DarkMatter
Local DBPro Sites
Italy
UK
Visualizador de Código Fonte
Este é o Código Fonte de "Fast 3D!".
Cor:
Verde
Laranja
Branco
Tam. Fonte:
Padrão
Grande
` This code is copyright Dark Basic Software Limited 2002 Rem Project: LotsOfFast3D Rem Created: 19/08/2002 22:07:36 rem Set init state of a fast ride sync on : sync rate 0 : backdrop off rem Load images set image colorkey 0,0,0 load image "backdrop.jpg",1 load image "sphereball.jpg",2 load image "logo.jpg",3 rem Backdrop sphere make object sphere 123,2000 scale object 123,100,100,10 position object 123,0,0,1000 texture object 123,1 scale object texture 123,300,300 rem Make some objects for o=1 to 100 if o-(int(o/10)*10)=1 make object cube o,128 ghost object on o,2 texture object o,3 else make object sphere o,128,6,6 ghost object on o,2 set object cull o,0 texture object o,2 endif next o rem Set blobbies type xyztype x# y# z# a# az# endtype dim blob(10) as xyztype for s=0 to 9 blob(s).x#=rnd(400)-200 blob(s).y#=rnd(400)-200 blob(s).z#=300+rnd(300) blob(s).a#=rnd(359) blob(s).az#=rnd(359) obj=1+(s*10) sc=50+rnd(100) for o=0 to 9 scale object obj+o,sc,sc,sc next o next s rem Set font text set text font "Courier" set text size 18 ink rgb(255,255,255),0 rem Load and loop sound load music "a.mp3",1 : loop music 1 : set music speed 1,10 load music "b.mp3",2 : loop music 2 : set music speed 2,20 load music "c.mp3",3 : loop music 3 : set music speed 3,30 load music "d.mp3",4 : loop music 4 : set music speed 4,40 rem Set camera position camera 0,0,0 rotate camera 0,0,0 rem Main loop do rem Softglide glide#=wrapvalue(glide#+0.1) scale object 123,130+cos(glide#)*30,130+sin(glide#)*30,10 rem Spin spin#=wrapvalue(spin#+0.2) rem Object display for s=0 to 9 obj=1+(s*10) x#=blob(s).x# : blob(s).x#=blob(s).x#+(cos(spin#+(s*20))*0.3) y#=blob(s).y# : blob(s).y#=blob(s).y#+(cos(spin#-(s*20))*0.3) z#=blob(s).z# a#=blob(s).a# : blob(s).a#=blob(s).a#+1.0 az#=blob(s).az# : blob(s).az#=blob(s).az#+1 for o=0 to 9 r#=(o*36.0)+spin# position object obj+o,x#+(cos(r#)*200),y#-(cos(r#+a#)*50),z#+(sin(r#)*200) rotate object obj+o,0,o*20,az# next o next s rem Description of Demo fps=screen fps() set cursor 16,8 : print 7200*fps;" POLYGONS A SECOND (W=TOGGLE)" if inkey$()="w" if tog=0 tog=1 stat=1-stat if stat=0 for o=1 to 100 set object wireframe o,0 next o set object wireframe 123,0 backdrop off endif if stat=1 for o=1 to 100 set object wireframe o,1 next o set object wireframe 123,1 backdrop on endif endif else tog=0 endif rem Screen FPS Prompt desc$="SCREEN FPS : "+str$(fps) text screen width()-text width(desc$)-24,screen height()-30,desc$ rem Update screen sync rem End loop loop
Selecionar todo o Código
Ver este Download
Copyright © 2003 Dark Basic Software Limited.
Virtual Object Informática Ltda.®