Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Odd plasma affect.,

Author
Message
Munin
22
Years of Service
User Offline
Joined: 19th Oct 2002
Location:
Posted: 16th Mar 2003 13:15
A year and a half ago I was trying to build a plasma affect, when I eventually got there the effect looked "rough" so my friend and I tried to make it smoother but it went wrong, take a look

sync on : sync rate 20


dim grid(50,50)

for x = 1 to 50
y = 50
g = (rnd(50))+100
b = (rnd(50))+100
ink rgb(r,g,b),1
col = rgb(r,g,b)
grid(x,y)=col

next x


do
gosub warpus
gosub array
sync
loop


warpus:
for x = 1 to 50
y = 50
g = (rnd(150))+100
b = (rnd(150))+100
ink rgb(r,g,b),1
col = rgb(r,g,b)
grid(x,y)=col

next x

return



array:
for x = 1 to 50
for y = 2 to 50
refx = x
refy = y

rem extract colours
col = grid(x,y)
green = rgbg(col)
blue = rgbb(col)

rem smooth it baby!!!!
if x > 1 then col2 = grid(x-1,y)
green2 = rgbg(col2)
blue2 = rgbb(col2)
if green2 > (green + 5) then green2 = green2 - 5
if green2 > (green + 5) then green2 = green2 - 5
if blue2 blue then ngreen = green - rnd(7)
if blue + rnd(20) > green then nblue = blue - rnd(7)
if ngreen 100 then ngreen = ngreen - 7
if nblue > 100 then nblue = nblue - 7


rem mix up
mix = rnd(3)
if mix = 1 AND refx > 2 then refx = refx - 1
if mix = 2 AND refx 0 then refy = refy - 1
if ymix = 2 AND refy
Munin
22
Years of Service
User Offline
Joined: 19th Oct 2002
Location:
Posted: 16th Mar 2003 13:17
ok, that failed, lets try again:

Munin
22
Years of Service
User Offline
Joined: 19th Oct 2002
Location:
Posted: 21st Mar 2003 13:52
x-d :-s [b])

Come on guys I need some input here, work with me on this one,
hehe
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 21st Mar 2003 13:56
Well.. it's different Not exactly plasma, but looks nice all the same (if a bit chunky).

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
firestarter
21
Years of Service
User Offline
Joined: 26th Dec 2002
Location: Norway
Posted: 22nd Mar 2003 00:25
It`s not plasma at all, it`s more like an fire effect.
Syrinth
21
Years of Service
User Offline
Joined: 21st Mar 2003
Location:
Posted: 22nd Mar 2003 19:33


What do you get in an evil garden? A Bush!

Login to post a reply

Server time is: 2024-11-24 04:27:45
Your offset time is: 2024-11-24 04:27:45