January 24, 2021, 12:40:29 PM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Forum
Help
Search
Gallery
Login
Register
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
3D Graphics - Effects
»
[bb] quick deathstar effect (tm) by Rob [ 1+ years ago ]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: [bb] quick deathstar effect (tm) by Rob [ 1+ years ago ] (Read 533 times)
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
;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
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
3D Graphics - Effects
»
[bb] quick deathstar effect (tm) by Rob [ 1+ years ago ]
SimplePortal 2.3.6 © 2008-2014, SimplePortal