Screensaver

Post here your demos and examples with the source files.
Forum rules
Always post the games with a screenshot.
The file must have the ged and data files (complete game source)
Use the forum attachment to post the files.
It is always better to use the first post to put the game files

Screensaver

Postby JimJamJom56 » Sat Sep 17, 2011 12:35 pm

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
Don't be surprised if I say something Pocket PC related :P

Press any key to continue, or any other key to cancel.
User avatar
JimJamJom56
 
Posts: 36
Joined: Fri Jun 24, 2011 3:48 pm
Location: Behind You
Score: 2 Give a positive score

Re: Screensaver

Postby Hblade » Sat Sep 17, 2011 5:28 pm

Neat! :)
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Screensaver

Postby lcl » Sun Sep 18, 2011 4:00 pm

That's awesome, we can have games as screensavers! xD :D
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Screensaver

Postby CoFFiN6 » Sun Sep 18, 2011 8:21 pm

I like this one. I'm going to make one where my screen looks all futuristic or nasa-ish..hehe just to show off.
Don't run faster then the dragon, run faster than your friends :P
User avatar
CoFFiN6
 
Posts: 49
Joined: Sun Sep 11, 2011 8:17 pm
Location: South Africa
Score: 4 Give a positive score

Re: Screensaver

Postby savvy » Sun Sep 18, 2011 9:10 pm

epic, nice to know! shame i dont use screen savers... PC is on or off or standbye, no screensaver :(
--> For my help, i ask for a simple +1 if it helps! ^-^
--> I dont code, I type art which you dont understand.
--> I keep winning the 3D model challenge at college, teacher says: "you keep winning im not giving you prizes".
User avatar
savvy
 
Posts: 494
Joined: Wed Jun 03, 2009 11:55 am
Location: England
Score: 44 Give a positive score

Re: Screensaver

Postby Jagmaster » Mon Sep 19, 2011 12:23 am

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!
User avatar
Jagmaster
 
Posts: 875
Joined: Sun May 08, 2011 4:14 pm
Location: Not where you think.
Score: 82 Give a positive score

Re: Screensaver

Postby tintran » Sat Oct 15, 2011 12:53 am

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. :)
Attachments
lines.png
8lines.ged
(5.12 KiB) Downloaded 225 times
PC Clock.exe
(1.42 MiB) Downloaded 231 times
User avatar
tintran
 
Posts: 157
Joined: Fri Dec 24, 2010 1:34 am
Score: 30 Give a positive score

Re: Screensaver

Postby Game A Gogo » Sat Oct 15, 2011 2:50 am

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
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: Screensaver

Postby EvanBlack » Sat Oct 15, 2011 3:25 am

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.
(\__/) ( Soon... The world)
(O.o )< will be mine!____)
(> < )
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bunny Overlord 2012!
EvanBlack
 
Posts: 202
Joined: Fri Sep 30, 2011 10:17 am
Score: 19 Give a positive score

Re: Screensaver

Postby Game A Gogo » Sat Oct 15, 2011 2:02 pm

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();
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: Screensaver

Postby EvanBlack » Sat Oct 15, 2011 5:39 pm

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.
(\__/) ( Soon... The world)
(O.o )< will be mine!____)
(> < )
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bunny Overlord 2012!
EvanBlack
 
Posts: 202
Joined: Fri Sep 30, 2011 10:17 am
Score: 19 Give a positive score

Re: Screensaver

Postby Game A Gogo » Sat Oct 15, 2011 6:37 pm

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
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: Screensaver

Postby EvanBlack » Sat Oct 15, 2011 7:53 pm

@8 lines screensaver

There seems to be a stuck pixel up in the top left corner.
(\__/) ( Soon... The world)
(O.o )< will be mine!____)
(> < )
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bunny Overlord 2012!
EvanBlack
 
Posts: 202
Joined: Fri Sep 30, 2011 10:17 am
Score: 19 Give a positive score

Re: Screensaver

Postby tintran » Sat Oct 15, 2011 7:58 pm

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];
}
Last edited by tintran on Sat Oct 15, 2011 8:12 pm, edited 1 time in total.
User avatar
tintran
 
Posts: 157
Joined: Fri Dec 24, 2010 1:34 am
Score: 30 Give a positive score

Re: Screensaver

Postby EvanBlack » Sat Oct 15, 2011 8:02 pm

Ahh very nice. It works great. Only issue is that the pixel is still there until all the lines get drawn out.
(\__/) ( Soon... The world)
(O.o )< will be mine!____)
(> < )
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bunny Overlord 2012!
EvanBlack
 
Posts: 202
Joined: Fri Sep 30, 2011 10:17 am
Score: 19 Give a positive score

Next

Return to Game Demos

Who is online

Users browsing this forum: No registered users and 1 guest

cron