Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Addding your own screensavers Sticky

A topic by Paradise created Sep 15, 2023 Views: 251 Replies: 1
Viewing posts 1 to 2
Developer (3 edits) (+2)

Add Screensaver or Executable

Put them in the launchers "screensaversforlauncher" folder in your documents. The launcher looks through subfolders as well so you can organize them however you want!

Normally the launcher will add all .exe, .scr and .bat files it finds in the folder to its random screensaver roatation. If you don't want some of the files placed in the folder to be chosen randomly add a "dontrun-" prefix to their name (e.g. dontrun-emulator.exe)

If you are adding a unity project - delete the CrashHandler.exe as it is not necessary to function and will be included in the launchers random selection.

If you are renaming a unity executable - the data folder next to it must have the same name for it to work!

How to add something tricky

Some screensaver ideas involve things other than exes, or you might want to add a screensaver of something you don't have the source files for. That's what the .bat files are for! 

You can make a .bat file by creating a .txt with notepad, then renaming it to .bat. When run a bat file will run whatever is inside of it as if manually entered into cmd, which can be used to open files of whatever extensions you fancy, run other apps with arguments (like running an emulator in fullscreen with a path to a rom).

If what you want to do can't be done by a .bat file - use it to run a .vbs(visual basic) or a different script that will do whatever it is that you need. Possibilities are endless! 

Make your own screensavers!

  1. Make an exe of your screensaver in whatever way is easiest for you.
  2. Change the file extension from exe to scr.
  3. Put it in the folder for the launcher or System32 if you want to select it directly. 
  4. You're done!

A few things to keep in mind:

Screensavers won't quit on their own when mouse is moved or keys are pressed, you need to program that in yourself, use Alt+F4 to close them, or add some interactive stuff instead!

Screensavers seem to be non-transparent. If you can get a window to be transparent when running an .exe or .scr directly - they still wont be transparent if windows runs them as a screensavers after inactivity. This includes default screensavers like bubbles as well. We are painfully aware of how many fun ideas involve transparent overlays. There were attempts at taking a screenshot before running and using that as a backdrop instead of real transparency with mixed results. If you figure out a way to make them actually transparent - please share with us!!

Developer (1 edit) (+2)

Adding a screensaver with extra steps

For this example I'll be adding Flowers Synchrony Demo as a screensaver for the launcher.


These are the files that you can download from its page. Trying to use them as is reveals two problems: 

  • UnityCrashHandler64.exe is included in the random file rotation and doesn't do anything when run on its own
  • the game opens with this window, requiring a confirmation after it has loaded

To solve the first - remove the crash handler altogether as it's not crucial for it to work.

The second part is harder - there are no commandline arguments that disable the quality selection popup (I have looked far and wide). So instead we will use a workaround!


Rename the executable to dontrun-C2_Visuals.exe so it gets excluded by the launcher, rename the data folder as well so that they match and unity can find the corresponding data folder.

Now in a folder next to it I added 2 files:

flowers.vbs and flowers.bat


flowers.bat is the file that gets picked by the launcher and executed. All it does is run:

start .\flowers.vbs

launching the visual basic script flowers.vbs:

with createobject("wscript.shell")
.run ".\flowers-synchrony-demo\dontrun-C2_Visuals.exe"
wscript.sleep 10000
.AppActivate "C2_Visuals Configuration"
.sendkeys "{enter}" 
end with

which:

  • runs the executable itself,
  • waits for 10 000 ms (10 seconds) (how long my laptop takes to load the demo and for the popup to appear)
  • switches to that window to focus it
  • simulates pressing enter (on the already selected by default "Play" button)

This ends up skipping the configuration window and the waiting part goes unnoticed when the screensaver starts itself while I'm away from the computer!


I later wanted to set up Fast Machine to also be used as a screensaver.

For that all the steps were quite similar with one exception: Fast Machine contains a bunch of different visualizers you switch between using your keyboard keys.

To do that the .vbs script which launches it 

with createobject("wscript.shell")
.run ".\fastmachine\dontrun-FastMachine.exe"
wscript.sleep 12500
.AppActivate "Experiment_Unity Configuration"
.sendkeys "{enter}" 
wscript.sleep 7500
max=12
min=1
Randomize
startat = Int((max-min+1)*Rnd+min)
.sendkeys Mid("qwertyuiopas",startat, 1) 
end with

waits for 7 more seconds after hitting enter on the graphics popup and then randomly chooses and presses one of the keys that switch the displayed scene.


I hope this gives you ideas for how to integrate other apps you might want to launch as a screensaver! And if you have any questions about your specific situation I would be glad to help!