Skip to content

Commit 32f780e

Browse files
committed
Add screen saver gif thumbnails to README.md
1 parent a2cf869 commit 32f780e

File tree

1 file changed

+39
-27
lines changed

1 file changed

+39
-27
lines changed

README.md

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,27 @@
33
A very simple Python framework that allows you to write official Windows screen savers using
44
Python and the [Arcade](https://github.com/pythonarcade/arcade) 2D video game library.
55

6-
Most Arcade applications that use the class-centric Arcade API (ex: derive a window from `arcade.Window`)
7-
can be made into a Windows screen saver. Usually, it is as simple as adding the framework import to your
8-
existing application and creating your window with `window = screensaver_framework.create_saver_win(MyGameClass)`
6+
Most Arcade scripts that use the class-centric Arcade API (ex: derive a window from `arcade.Window`)
7+
can easily be made into a Windows screen saver with this framework. Often, it is as simple as adding the
8+
framework import to an existing Arcade script and creating your window object with `window = screensaver_framework.create_saver_win(MyGameClass)`
9+
10+
### Examples
11+
12+
A few simple examples are included along with the framework. Flying Lines, Raindrops, and Ovals:
13+
14+
![Flying Lines](https://sirgnip.github.io/repo/arcade_screensaver_framework/flying_lines_30fps_40pct.gif)
15+
![Raindrops](https://sirgnip.github.io/repo/arcade_screensaver_framework/raindrops_30fps_40pct.gif)
16+
![Ovals](https://sirgnip.github.io/repo/arcade_screensaver_framework/ovals_30fps_40pct.gif)
17+
18+
### Features
919

10-
This framework provides your app:
20+
This framework provides your script:
1121
* What it needs to interface with Windows so your Arcade application is seen as an official Windows screen saver.
12-
* Input event handling to automatically exit the application when any keyboard or mouse input is detected.
13-
* Handling of multi-monitor setups (draws screen saver visuals on largest monitor)
22+
* Input event handling to automatically close the script when any keyboard or mouse input is detected.
23+
* Handling of multi-monitor setups (draws screen saver visuals on largest monitor and shows black screen on the others)
1424
* An included installation script that takes your Arcade application and:
15-
* Bundles it into a one-file .exe (via PyInstaller) necessary for Windows screen savers
16-
* Installs the bundle in the appropriate place with the appropriate name so that Windows can find it.
25+
* Bundles your script and its dependencies into a one-file .exe (via PyInstaller) necessary for Windows screen savers
26+
* Copies the bundled executable into the appropriate with the appropriate name so that Windows recognizes it as a screen saver.
1727

1828
# Quick start
1929

@@ -28,8 +38,9 @@ Manually run screen saver examples (`/s` runs app in fullscreen)
2838
python -m arcade_screensaver_framework.examples.oval_screensaver /s
2939
python -m arcade_screensaver_framework.examples.raindrops /s
3040

31-
Create a fully functional Windows screen saver by installing one of the provided example screen savers.
32-
Must run this command from a Command Prompt that was opened with "Run as administrator".
41+
Install one of the included example screen savers as a fully functional Windows screen saver.
42+
Run the command below from a Command Prompt. This Command Prompt **MUST** be run with "Run as administrator". Make
43+
sure the Python environment that you installed the framework to is active.
3344

3445
# The example scripts are often located in a path similar to the following.
3546
# Your actual path may vary...
@@ -40,20 +51,22 @@ After installation, you need to go into Window's "Screen Saver Settings" dialog
4051
select your newly installed screen saver. This is usually accomplished by following steps similar to:
4152

4253
* Right click on the Windows desktop
43-
* Select "Personalilze"
44-
* Click "Lock screen" in left pane
45-
* Scroll to the bottom of the dialog and click link labeled "Screen saver settings"
46-
* In the "Screen Saver Settings" dialog, select your screen saver from the "dropdown"
47-
* Enter a "Wait" time for how long your computer must be idle before it starts the screen saver
54+
* Select "Personalize"
55+
* Click "Lock screen" in the left pane
56+
* Scroll to the bottom of the dialog and click the link labeled "Screen saver settings"
57+
* In the "Screen Saver Settings" dialog, select your newly installed screen saver from the dropdown
58+
* Enter a "Wait" time for how long your computer must be idle before it displays the screen saver
4859
* Click the "Preview" button to see your screen saver
4960

5061
*Note: The "Screen Saver Settings" dialog will feel very sluggish while your have a custom
5162
screen saver selected. This is because Windows is running the screen saver application
5263
in the background as you click through the options in the dialog. Each run of the
53-
application takes a couple seconds to complete.*
64+
application takes a couple seconds to complete. This is because of how PyInstaller bundles Python scripts.*
5465

5566
# Write your own screen saver
5667

68+
## Quick demonstration
69+
5770
Install framework:
5871

5972
pip install git+https://github.com/SirGnip/arcade_screensaver_framework
@@ -77,19 +90,17 @@ Save the following script as "my_test.py"
7790
screensaver_framework.create_screensaver_window(MinimalSaver)
7891
arcade.run()
7992

80-
Run script manually to test (notice how it exists when you cause any input events):
93+
Run script manually to test (notice how it exits when you cause any input events):
8194

8295
python my_test.py /s
8396

84-
Open a Command Prompt terminal with "Run as administrator", make sure the proper Python environment is active and then run:
97+
Open a Command Prompt terminal with "Run as administrator", change directory to where your `my_test.py` script is, active your Python environment, and then run:
8598

8699
install_screensaver my_test.py
87100

88-
As the `arcade_screensaver_framework` handles input events, your code shouldn't have any `on_keyboard_press`, `on_mouse_press`, `on_mouse_motion` event handlers.
89-
90-
# Reference
101+
As the `arcade_screensaver_framework` handles input events for you, your code doesn't need any `on_keyboard_press`, `on_mouse_press`, `on_mouse_motion` event handlers.
91102

92-
## What is required in a screen saver?
103+
## Steps required
93104

94105
To write an Arcade script that can be used as a screen saver, just a few things need to be done in the code.
95106
Refer to the `my_test.py` example above for a concrete illustration of the points below.
@@ -111,20 +122,21 @@ to pass a couple arguments into the `__init__` method:
111122
self.x = 0
112123

113124
Fourth, instead of creating the Arcade window with the typical `win = MyWindow()`, you need to
114-
use the `arcade_screensaver_framework` to create the window for you:
125+
use the `arcade_screensaver_framework` to create the window for you:
115126

116127
win = screensaver_framework.create_screensaver_window(MyWindow)
117128
arcade.run()
118129

119-
## Details:
130+
## Implementation details
120131

121-
### Input Events
132+
### Input events
122133

123-
The framework handles closing the application when receiving input. So, do not
134+
The framework handles closing the application when receiving input. So, do not
124135
try to provide input event handlers like `on_mouse_motion` or `on_keyboard_press`
125136
as these could interfere with arcade_screensaver_framework's operation.
126137

127138
### Resolution selection
139+
128140
When the screen saver is run in fullscreen mode, the framework chooses the most
129141
appropriate screen resolution. This way, your application can run on computers
130142
with screens of any size. This means your screen saver should query the size of
@@ -139,7 +151,7 @@ height and width dynamically.
139151
- second parameter (optional): can specify keyword arguments that will be passed to the
140152
`Windows` constructor
141153

142-
### Windows screen saver interface
154+
### Requirements for an application to function as a Windows screen saver
143155

144156
For an application to be an official Windows screen saver, it must do the following things:
145157

0 commit comments

Comments
 (0)