EvanBlack wrote:can you set to if ANY KEY was hit then exit?
Sometimes you don't have a mouse
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();