November 28, 2020, 02:41:43 PM

Author Topic: [bb] quick deathstar effect (tm) by Rob [ 1+ years ago ]  (Read 520 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] quick deathstar effect (tm) by Rob [ 1+ years ago ]
« on: June 29, 2017, 12:28:40 AM »
Title : quick deathstar effect (tm)
Author : Rob
Posted : 1+ years ago

Description : take a peek!

Code :
Code: BlitzBasic
  1. ;instant space glowing windows & lots of bits effect
  2. ; rob cummings (rob@redflame.net)
  3.  
  4. Graphics3D 640,480,16,2
  5.  
  6. camera=CreateCamera()
  7. CameraRange camera,1,2000
  8. MoveEntity camera,0,0,-1000
  9. deathstar=CreateSphere(16)
  10. ScaleEntity deathstar,500,500,500
  11. light=CreateLight(2)
  12. MoveEntity light,1000,1000,-1000
  13. AmbientLight 32,32,32
  14.  
  15. ;create crap chunky metal texture
  16. basetex=CreateTexture(256,256,8)
  17. SetBuffer TextureBuffer(basetex)
  18. For i=0 To 511
  19.         c=Rnd(64)+128
  20.         Color c/2,c/2,c/2
  21.         x=Rnd(255):y=Rnd(255)
  22.         w=Rnd(64):h=Rnd(64)
  23.         Rect x,y,2+w,2+h,1
  24.         Color c,c,c
  25.         Rect x+2,y+2,w,h,1
  26. Next
  27.  
  28. ;create bright windows texture
  29. windows=CreateTexture(256,256)
  30. SetBuffer TextureBuffer(windows)
  31. For i=0 To 100
  32.         Color 255,255,255
  33.         Rect Rnd(255),Rnd(255),1+Rnd(4),1+Rnd(2),1
  34. Next
  35.  
  36.  
  37. ;map the deathstar with these textures
  38. ScaleTexture basetex,0.1,0.2
  39. EntityTexture deathstar,basetex,0,0
  40.  
  41. ScaleTexture windows,0.5,0.2
  42. TextureBlend windows,3
  43. EntityTexture deathstar,windows,0,1
  44.  
  45. SetBuffer BackBuffer()
  46. While Not KeyHit(1)
  47.         TurnEntity deathstar,0,-.05,0
  48.         RenderWorld
  49.         Flip
  50. Wend
  51. 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


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal