Page 1 of 1

Radial Gradiant BG code

PostPosted: Wed May 02, 2007 12:38 am
by Game A Gogo
here is a radial BG code that you can place in a canvas actor of any size!

first, create a var name "i" and make it real.
then add this into the create actor event in a canvas actor.
Code: Select all
for(j=0; j<25120; j++)
{
    setpen(cos(i*5)*255,cos(i*10)*255,cos(i*20)*255,0,1);
    moveto(width/2,height/2);
    lineto(cos(i)*(width*2),sin(i)*(height*2));
    i+=.00025;
}


play whit the *5,*10 and *20, it gives out good result to have factors.

PostPosted: Wed May 02, 2007 4:53 am
by Sgt. Sparky
Nice Work Gogo! :D
Awsome! :D

PostPosted: Wed May 02, 2007 11:30 pm
by Game A Gogo
but if you have a slow computer, it may freeze the game for 1/100 of a sec, depending on your CPU power.

Re: Radial Gradiant BG code

PostPosted: Sun May 03, 2015 2:54 am
by 247wkman
"j" also need to be made real. works for me now.

Re: Radial Gradiant BG code

PostPosted: Wed May 27, 2015 1:41 am
by Zivouhr
Pretty cool coding effect, thanks. 8)