Radial Gradiant BG code

Talk about making games.

Radial Gradiant BG code

Postby Game A Gogo » Wed May 02, 2007 12:38 am

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.
Attachments
untitled.JPG
cool radiant thing!
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Sgt. Sparky » Wed May 02, 2007 4:53 am

Nice Work Gogo! :D
Awsome! :D
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Game A Gogo » Wed May 02, 2007 11:30 pm

but if you have a slow computer, it may freeze the game for 1/100 of a sec, depending on your CPU power.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: Radial Gradiant BG code

Postby 247wkman » Sun May 03, 2015 2:54 am

"j" also need to be made real. works for me now.
247wkman
 
Posts: 67
Joined: Mon Dec 13, 2010 3:55 pm
Score: 3 Give a positive score

Re: Radial Gradiant BG code

Postby Zivouhr » Wed May 27, 2015 1:41 am

Pretty cool coding effect, thanks. 8)
City of Rott Game created on Game Editor http://cityofrott.wordpress.com/
User avatar
Zivouhr
 
Posts: 549
Joined: Sat May 17, 2014 2:12 pm
Score: 59 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest