IonicWind Software

IWBasic => Games and Graphics => Topic started by: yujinwunz on January 13, 2009, 05:59:07 PM

Title: cool art or random junk?
Post by: yujinwunz on January 13, 2009, 05:59:07 PM
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
Title: Re: cool art or random junk?
Post by: mrainey on January 13, 2009, 06:28:38 PM
I got a cool black screen.   ???
Title: Re: cool art or random junk?
Post by: yujinwunz on January 13, 2009, 07:48:22 PM
try clicking and dragging before you press a key. its interactive
Title: Re: cool art or random junk?
Post by: RG on January 13, 2009, 08:23:26 PM
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?
Title: Re: cool art or random junk?
Post by: yujinwunz on January 13, 2009, 09:59:09 PM
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)
Title: Re: cool art or random junk?
Post by: aurelCB on January 14, 2009, 12:31:16 AM
Yeah.Weird way but cool :)
Title: Re: cool art or random junk?
Post by: mrainey on January 14, 2009, 05:23:07 AM
Quotetry clicking and dragging before you press a key. its interactive

That made a difference.  Pretty neat.
Title: Re: cool art or random junk?
Post by: RG on January 14, 2009, 11:37:18 AM
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.
Title: Re: cool art or random junk?
Post by: Bruce Peaslee on January 14, 2009, 11:52:02 AM
Trippy.