[bb] quick deathstar effect (tm) by Rob [ 1+ years ago ]

Started by BlitzBot, June 29, 2017, 00:28:40

Previous topic - Next topic

BlitzBot

Title : quick deathstar effect (tm)
Author : Rob
Posted : 1+ years ago

Description : take a peek!

Code :
Code (blitzbasic) Select
;instant space glowing windows & lots of bits effect
; rob cummings (rob@redflame.net)

Graphics3D 640,480,16,2

camera=CreateCamera()
CameraRange camera,1,2000
MoveEntity camera,0,0,-1000
deathstar=CreateSphere(16)
ScaleEntity deathstar,500,500,500
light=CreateLight(2)
MoveEntity light,1000,1000,-1000
AmbientLight 32,32,32

;create crap chunky metal texture
basetex=CreateTexture(256,256,8)
SetBuffer TextureBuffer(basetex)
For i=0 To 511
c=Rnd(64)+128
Color c/2,c/2,c/2
x=Rnd(255):y=Rnd(255)
w=Rnd(64):h=Rnd(64)
Rect x,y,2+w,2+h,1
Color c,c,c
Rect x+2,y+2,w,h,1
Next

;create bright windows texture
windows=CreateTexture(256,256)
SetBuffer TextureBuffer(windows)
For i=0 To 100
Color 255,255,255
Rect Rnd(255),Rnd(255),1+Rnd(4),1+Rnd(2),1
Next


;map the deathstar with these textures
ScaleTexture basetex,0.1,0.2
EntityTexture deathstar,basetex,0,0

ScaleTexture windows,0.5,0.2
TextureBlend windows,3
EntityTexture deathstar,windows,0,1

SetBuffer BackBuffer()
While Not KeyHit(1)
TurnEntity deathstar,0,-.05,0
RenderWorld
Flip
Wend
End


Comments :


Clyde(Posted 1+ years ago)

 I think this is really neat!Welldone mate :)


puki(Posted 1+ years ago)

 Yep, I came across it a couple of days ago - I put it in my 'Elite' style demo - I actually came across it while 'Googling' for other stuff.  The old "Cummings" has produce a nice effect here.  Not sure how long it has been here as the site doesn't log the date when the person submits their code.


Ryudin(Posted 1+ years ago)

 Okay... that is awesome.


slenkar(Posted 1+ years ago)

 yeah its cool