hi everyone
is this cool art or random junk?
whatever it is it looks awsome
i discovered this effect accidentally when i was makin a game (i dont know if others have found this before me)
here's the source and i have the program as an attachment
'by yujin wu : yujinwunz@hotmail.com
IF CREATESCREEN( 800, 600, 32) < 0
MESSAGEBOX 0,"Error creating screen","error"
END
ENDIF
DECLARE limit(num as float, max as float), float
DEF ex[10000] as float
DEF ey[10000] as float
DEF eb[10000] as float
DEF ee[10000] as float
DEF ees as INT
DO
FILLSCREEN RGB(0,0,0)
IF MOUSEDOWN(1) THEN
eb[ees] = 30
ex[ees] = MOUSEX()
ey[ees] = MOUSEY()
ee[ees] = 255
ees++
ENDIF
IF ees > 5000 THEN ees = 0
FOR i = 0 to 9999
IF ee[i] > 0 THEN
DRAWRECT ex[i]-0.5*eb[i],ey[i]-0.5*eb[i],eb[i], eb[i],RGB(100+(ee[i]/2),ee[i],limit(6*(ee[i]-200),240))
ee[i] = ee[i] - 2
eb[i] = eb[i] * (ee[i] / 15000 + 1)
IF RAND(80) = 1 THEN
eb[ees] = eb[i] * 0.5
ex[ees] = ex[i] + RAND(-eb[i], eb[i])
ey[ees] = ey[i] + RAND(-eb[i], eb[i])
ee[ees] = 150
ees++
ENDIF
ENDIF
NEXT i
FLIP
UNTIL GETKEY <> ""
DO
WRITETEXT 100, 100,"by Yujin Wu, yujinwunz@hotmail.com"
FLIP
UNTIL GETKEY <> ""
CLOSESCREEN
END
SUB limit(num as float, max as float)
DEF num1 as float
num1 = num
IF num1 < 0 THEN num = 0
IF num1> max THEN num = max
RETURN num
ENDSUB
click anywhere to begin and press a key to end
I got a cool black screen. ???
try clicking and dragging before you press a key. its interactive
I liked it :D you can get quite a display going by different combinations of clicking and dragging. are you going to do anything further with it?
its already a main graphics feature in one of my games (which is still in development). what do you think would come of it? (i think it makes a nice screensaver but takes up too much cpu)
Yeah.Weird way but cool :)
Quotetry clicking and dragging before you press a key. its interactive
That made a difference. Pretty neat.
it acts like a particle generator - modifying how fast they are spawned and the number spawned could minimize cpu impact. I could see several types of programs where this could be used.
Trippy.