Page 1 of 4

Screensaver

PostPosted: Sat Sep 17, 2011 12:35 pm
by JimJamJom56
I have made a clock screensaver.
I have attached the .ged.

Its Easy!
To make a screensaver (Windows) save your .ged as a .exe. Then go to windows explorer and rename the .exe. Change the file extension from .exe to .scr.
Then, right click on the file and click Install.

For more help, visit http://www.wikihow.com/Convert-an-Executable-File-Into-a-Screensaver

The .scr:
http://www.mediafire.com/?fsmzbz5vbvly3f6
The .ged:
PC Clock.ged
(2.22 KiB) Downloaded 269 times

Re: Screensaver

PostPosted: Sat Sep 17, 2011 5:28 pm
by Hblade
Neat! :)

Re: Screensaver

PostPosted: Sun Sep 18, 2011 4:00 pm
by lcl
That's awesome, we can have games as screensavers! xD :D

Re: Screensaver

PostPosted: Sun Sep 18, 2011 8:21 pm
by CoFFiN6
I like this one. I'm going to make one where my screen looks all futuristic or nasa-ish..hehe just to show off.

Re: Screensaver

PostPosted: Sun Sep 18, 2011 9:10 pm
by savvy
epic, nice to know! shame i dont use screen savers... PC is on or off or standbye, no screensaver :(

Re: Screensaver

PostPosted: Mon Sep 19, 2011 12:23 am
by Jagmaster
Frankly I never knew that a screen saver was basically just an exe program. I generally don't use screen savers either but now I might start using them!

Now I know why people should be cautious about downloading random screensavers from the internet. I read that somewhere but didn't know why. :lol:
Of course, you should always be cautious when downloading anything from the internet. I've been recently reading about people sending files with fake extensions in the name to novice computer users (files like Picture.jpeg.exe yes, this is possible) so watch out! It can be a dangerous place out there!

Anywho, Thanks Jimjamjom for the cool idea!

Re: Screensaver

PostPosted: Sat Oct 15, 2011 12:53 am
by tintran
upload of above .ged as .exe to test on a windows machine.
testing under Linux Wine, Escape key did not exit.
edit: works in WIndows, just had to change resolution to match screen settings.
I'll just add my 8-lines (bouncing around) screensaver here i guess. :)

Re: Screensaver

PostPosted: Sat Oct 15, 2011 2:50 am
by Game A Gogo
tintran wrote:testing under Linux Wine, Escape key did not exit.


Make it so when you move your mouse it quits :)
have two variable lxm and lym.

Code: Select all
lxm=xmouse;
lym=ymouse;

on create actor

Code: Select all
if(lxm!=xmouse||lym!=ymouse)ExitGame();
lxm=xmouse;
lym=ymouse;

on draw actor

btw, going to use your 8lines :D might modify it a bit so it changes colors differently. Took a couple of minutes to adapt it to 1680x1050 screen size XD

Re: Screensaver

PostPosted: Sat Oct 15, 2011 3:25 am
by EvanBlack
can you set to if ANY KEY was hit then exit?

Sometimes you don't have a mouse :D or any buttons available. A lot of people prefer using the shift key to exit their screen savers.


Any way to make a program in gE that actually reduces power usage and even displays activity on the screen during the screen saver? Such as if you leave your internet connected it can show the stream or show temp or other various things, while minimizing power and cpu usage. Probably out of the reach of gE and better off used with motherboard hacking.

But I would like to see a game as a screen saver! That would be awesome, specially if it was a self-playing Asteroids or Galaga. That when you hit "spacebar" you can start playing.

Re: Screensaver

PostPosted: Sat Oct 15, 2011 2:02 pm
by Game A Gogo
EvanBlack wrote:can you set to if ANY KEY was hit then exit?

Sometimes you don't have a mouse :D or any buttons available. A lot of people prefer using the shift key to exit their screen savers.


Any way to make a program in gE that actually reduces power usage and even displays activity on the screen during the screen saver? Such as if you leave your internet connected it can show the stream or show temp or other various things, while minimizing power and cpu usage. Probably out of the reach of gE and better off used with motherboard hacking.

But I would like to see a game as a screen saver! That would be awesome, specially if it was a self-playing Asteroids or Galaga. That when you hit "spacebar" you can start playing.


Unfortunately no, the only things GE can read from your computer is Time, What OS you're running and serial of your PDA (As far as I know).
You could have a text that has this kind of script in global code:
Code: Select all
short unsigned int AvgFps[64], FCount;
unsigned int TotalAvg;


and in draw actor of your text:
Code: Select all
int k;
AvgFps[FCount]=real_fps;
FCount++;
TotalAvg=0;
for(k=0; k<64; k++)
{
    TotalAvg+=AvgFps[k];
}
if(FCount>=64)
{
   sprintf(text,"Processing unit usage:%.2f%%",((float)TotalAvg/4096)*100);//4096 here is 64^2
    FCount=0;
}

make sure your max fps is 64

which could give you an approximation of how much processing is being used... if you have a strong computer, perhaps having 128 as a frame rate could be more significant, as the program has to lag if there is any CPU used. So if you're going to change the FPS, make sure to change all the "64" values to your new fps, even that 4096, where you'd do 128^2 if you were using that as a new FPS, which would be 16384. Although this reading is kinda far from showing your actual CPU usage... it will show you the amount of lag the screen saver has

As for the anykey, sure! Add Event -> KeyDown(Right click so it gives in Any Key) -> script
Code: Select all
ExitGame();

Re: Screensaver

PostPosted: Sat Oct 15, 2011 5:39 pm
by EvanBlack
Oh cool thanks!

So you could make a Screensaver/game. That as long as its not in game mode Any Key would exit the game, but if you hit a certain key you could disable the Any Key exit event and then use ESC or some other key to quit the game.

Pretty neat!

I could think of some practical screen savers that have hidden games in them. Such as, it looks like a normal screen saver, but then you hit a button or button combination and a game starts. That way not anyone can just come up and start the game but they would assume its just a normal screen saver. XD Awesome. Work Time Wasters.

Re: Screensaver

PostPosted: Sat Oct 15, 2011 6:37 pm
by Game A Gogo
haha, indeed! Also, I modified a bit your 8lines

Code: Select all
#define LINES 30

int Tick;
int X[2],Y[2];
int incx[2],incy[2];
int R[LINES],G[LINES],B[LINES];
int X1[LINES],Y1[LINES],X2[LINES],Y2[LINES];
int i;
double whr=view.width/view.height;
double hwr=view.height/view.width;
void init()
{
    X[0] = rand(view.width);
    Y[0] = rand(view.height);
    X[1] = rand(view.width);
    Y[1] = rand(view.height);
    incx[0] = rand(10)+3;
    incy[0] = rand(10)+3;
    incx[1] = rand(10)+3;
    incy[1] = rand(10)+3;
}

void run()
{
    int p1x,p1y,p2x,p2y;
 
    X[0]+= incx[0]; X[1]+= incx[1];
    Y[0]+= incy[0]; Y[1]+= incy[1];
    R[0]=(cos(degtorad(Tick))+1)*128;
    G[0]=(sin(degtorad(Tick)*1.6)+1)*128;
    B[0]=255-((cos(degtorad(Tick)*1.3)+1)*128);
    Tick++;
 
 
    if(X[0]>view.width){ X[0] = view.width; incx[0] = -rand(10)-3;}
    if(X[1]>view.width){ X[1] = view.width; incx[1] = -rand(10)-3;}
    if(X[0]<0)         { X[0] = 0;          incx[0] =  rand(10)+3;}
    if(X[1]<0)         { X[1] = 0;          incx[1] =  rand(10)+3;}
 
    if(Y[0]>view.height){ Y[0] = view.height; incy[0] = -rand(10)-3;}
    if(Y[1]>view.height){ Y[1] = view.height; incy[1] = -rand(10)-3;}
    if(Y[0]<0)         { Y[0] = 0;          incy[0] =  rand(10)+3;}
    if(Y[1]<0)         { Y[1] = 0;          incy[1] =  rand(10)+3;}
 
 
    for (i=LINES-1;i>0;i--)
    {
       X1[i] = X1[i-1];X2[i] = X2[i-1];
       Y1[i] = Y1[i-1];Y2[i] = Y2[i-1];
       R[i] = R[i-1];G[i] = G[i-1];B[i] = B[i-1];
       if (i==LINES-1)
       {
           setpen(0,0,0,0,5);
       }else{
           setpen(R[i],G[i],B[i],0,5);
       }
       p1x = X1[i]/2;
       p1y = Y1[i] * X1[i]/1280;
       p2x = X2[i]/2;
       p2y = Y2[i] * X2[i]/1280;
 
       putpixel(p1x,p1y);
       putpixel(p2x,p2y);
       putpixel(p1y*whr,p1x*hwr);
       putpixel(p2y*whr,p2x*hwr);
 
 
       moveto(p1x,p1y);
       lineto(p2x,p2y);
       moveto(p1y*whr,p1x*hwr);
       lineto(p2y*whr,p2x*hwr);
 
       // mirror horizontally
       moveto(p1x,view.height-p1y);
       lineto(p2x,view.height-p2y);
       moveto(p1y*whr,view.height-p1x*hwr);
       lineto(p2y*whr,view.height-p2x*hwr);
 
       // mirror vertically
       moveto(view.width-p1x,p1y);
       lineto(view.width-p2x,p2y);
       moveto(view.width-p1y*whr,p1x*hwr);
       lineto(view.width-p2y*whr,p2x*hwr);
       moveto(view.width-p1x,view.height-p1y);
       lineto(view.width-p2x,view.height-p2y);
       moveto(view.width-p1y*whr,view.height-p1x*hwr);
       lineto(view.width-p2y*whr,view.height-p2x*hwr);
 
    }
    X1[0] = X[0]; X2[0] = X[1];
    Y1[0] = Y[0]; Y2[0] = Y[1];
}


Now it changes color smoothly, and rarely is it ever the same! and worry not, since Tick is an int, when it will go beyond 2147483647 it's just gonna warp to -2147483648 :) you'll probably notice a jump in the colors when that happens

Re: Screensaver

PostPosted: Sat Oct 15, 2011 7:53 pm
by EvanBlack
@8 lines screensaver

There seems to be a stuck pixel up in the top left corner.

Re: Screensaver

PostPosted: Sat Oct 15, 2011 7:58 pm
by tintran
moved
whr and hwr to init() to restore 8lines instead of 4lines
that stuck pixel is the other 4lines that aren't showing.
nice color change. (can you explain how Tick works a little? I get the using it as a degree to cycle but i am unsure why the values 128,1.3,1.6 and +1 are used.)
Code: Select all
#define LINES 30

int Tick;
int X[2],Y[2];
int incx[2],incy[2];
int R[LINES],G[LINES],B[LINES];
int X1[LINES],Y1[LINES],X2[LINES],Y2[LINES];
int i;
double whr;
double hwr;

void init()
{
    X[0] = rand(view.width);
    Y[0] = rand(view.height);
    X[1] = rand(view.width);
    Y[1] = rand(view.height);
    incx[0] = rand(10)+3;
    incy[0] = rand(10)+3;
    incx[1] = rand(10)+3;
    incy[1] = rand(10)+3;
    whr=1.0*view.width/view.height;
    hwr=1.0*view.height/view.width;
}

void run()
{
    int p1x,p1y,p2x,p2y;

    X[0]+= incx[0]; X[1]+= incx[1];
    Y[0]+= incy[0]; Y[1]+= incy[1];
    R[0]=(cos(degtorad(Tick))+1)*128;
    G[0]=(sin(degtorad(Tick)*1.6)+1)*128;
    B[0]=255-((cos(degtorad(Tick)*1.3)+1)*128);
    Tick++;


    if(X[0]>view.width){ X[0] = view.width; incx[0] = -rand(10)-3;}
    if(X[1]>view.width){ X[1] = view.width; incx[1] = -rand(10)-3;}
    if(X[0]<0)         { X[0] = 0;          incx[0] =  rand(10)+3;}
    if(X[1]<0)         { X[1] = 0;          incx[1] =  rand(10)+3;}

    if(Y[0]>view.height){ Y[0] = view.height; incy[0] = -rand(10)-3;}
    if(Y[1]>view.height){ Y[1] = view.height; incy[1] = -rand(10)-3;}
    if(Y[0]<0)         { Y[0] = 0;          incy[0] =  rand(10)+3;}
    if(Y[1]<0)         { Y[1] = 0;          incy[1] =  rand(10)+3;}


    for (i=LINES-1;i>0;i--)
    {
       X1[i] = X1[i-1];X2[i] = X2[i-1];
       Y1[i] = Y1[i-1];Y2[i] = Y2[i-1];
       R[i] = R[i-1];G[i] = G[i-1];B[i] = B[i-1];
       if (i==LINES-1)
       {
           setpen(0,0,0,0,5);
       }else{
           setpen(R[i],G[i],B[i],0,5);
       }
       p1x = X1[i]/2;
       p1y = Y1[i] * X1[i]/2/view.width;
       p2x = X2[i]/2;
       p2y = Y2[i] * X2[i]/2/view.width;

       moveto(p1x,p1y);
       lineto(p2x,p2y);
       moveto(p1y*whr,p1x*hwr);
       lineto(p2y*whr,p2x*hwr);

       // mirror horizontally
       moveto(p1x,view.height-p1y);
       lineto(p2x,view.height-p2y);
       moveto(p1y*whr,view.height-p1x*hwr);
       lineto(p2y*whr,view.height-p2x*hwr);

       // mirror vertically
       moveto(view.width-p1x,p1y);
       lineto(view.width-p2x,p2y);
       moveto(view.width-p1y*whr,p1x*hwr);
       lineto(view.width-p2y*whr,p2x*hwr);
       moveto(view.width-p1x,view.height-p1y);
       lineto(view.width-p2x,view.height-p2y);
       moveto(view.width-p1y*whr,view.height-p1x*hwr);
       lineto(view.width-p2y*whr,view.height-p2x*hwr);
    }
    X1[0] = X[0]; X2[0] = X[1];
    Y1[0] = Y[0]; Y2[0] = Y[1];
}

Re: Screensaver

PostPosted: Sat Oct 15, 2011 8:02 pm
by EvanBlack
Ahh very nice. It works great. Only issue is that the pixel is still there until all the lines get drawn out.