Requirements¶
Pyskool requires Python (version 2.7)and Pygame (version 1.8+).
On Linux/*BSD, Python and Pygame are available via the package managementsystem. Python is in the python package on all systems; Pygame is in thepython-pygame package on Debian-based distros and openSUSE, the pygamepackage on Fedora, the devel/py-game port on FreeBSD and NetBSD, and thedevel/pygame port on OpenBSD.
Windows and Mac OS X users should take care to select the Pygame installer thatmatches the version of Python that is installed.
Installing Pyskool¶
There are various ways to install the latest stable release of Pyskool:
- from the zip archive or tarball available atpyskool.ca
- from the DEB package or RPM package available at pyskool.ca
- from PyPI by usingeasy_install orpip
If you choose the zip archive or tarball, note that Pyskool can be usedwherever it is unpacked: it does not need to be installed in any particularlocation.
However, if you would like to install Pyskool as a Python package, you can doso by using the supplied setup.py script. After installation, the requiredimages, ini files and sound files for each game will need to be created. Thiscan be done by using the --setup option; for example:
$ skool_daze.py --setup
Windows¶
To install Pyskool as a Python package on Windows, open a command prompt,change to the directory where Pyskool was unpacked, and run the followingcommand:
> setup.py install
This should install the Pyskool game launcher scripts inC:\Python2X\Scripts (assuming you have installed Python in C:\Python2X),which means you can run them from anywhere (assuming you have addedC:\Python2X\Scripts to the Path environment variable).
Linux/*BSD/Mac OS X¶
To install Pyskool as a Python package on Linux/*BSD/Mac OS X, open a terminalwindow, change to the directory where Pyskool was unpacked, and run thefollowing command as root:
# ./setup.py install
This should install the Pyskool game launcher scripts in /usr/local/bin (orsome other suitable location in your PATH), which means you can run themfrom anywhere.
Running Pyskool¶
Windows¶
To run Pyskool in Skool Daze mode, double-click the skool_daze.py file inthe Pyskool directory. To run Pyskool in Back to Skool mode, double-clickback_to_skool.py.
If that doesn’t work, try the command line. Open a command prompt, change tothe Pyskool directory, and do:
> skool_daze.py
to run Pyskool in Skool Daze mode; or, to run Pyskool in Back to Skool mode:
> back_to_skool.py
Linux/*BSD/Mac OS X¶
To run Pyskool in Skool Daze mode, open a terminal window, change to thePyskool directory, and do:
$ ./skool_daze.py
or, to run Pyskool in Back to Skool mode:
$ ./back_to_skool.py
Pyskool data files¶
When skool_daze.py, back_to_skool.py or one of the other game launcherscripts is executed, it looks for the following things:
- a file named pyskool.ini (the main ini file)
- a directory named images
- a directory named sounds
- a directory named ini/<game_name> (where <game_name> is skool_daze,back_to_skool, or whatever)
Each of these things must be present in one of the following directories inorder for Pyskool to find it:
- the current working directory
- $HOME/.pyskool
- the directory containing the game launcher script
- /usr/share/pyskool
- $PACKAGE_DIR/data
$HOME refers to the user’s home directory. On Windows this is typicallyC:\Users\username or C:\Documents and Settings\username.
$PACKAGE_DIR refers to the directory in which the pyskool package isinstalled (as shown by the --package-dir command line option).
When you need a reminder of the locations that Pyskool searches for data files,run one of the game launcher scripts with the --search-dirs option.
If Pyskool doesn’t start, run the game launcher script from the command lineand read the diagnostic messages that are printed to the console for cluesabout what’s going wrong.
When Pyskool is running, it will dump screenshots to, save games to, and loadgames from either $HOME/.pyskool (if it exists or can be created), or thecurrent working directory.
Command line options¶
skool_daze.py, back_to_skool.py and the other game launcher scripts supportthe following command line options:
- --version - show the version number of Pyskool and exit
- -h or --help - show a summary of the available options
- -c or --cheat - enable cheat keys; equivalent to--config=Cheat,1, this option overrides the Cheat parameter in the[GameConfig] section
- --config=P,V - set the value of the configuration parameter P toV; this option may be used multiple times
- --create-images - create the images required by the game and exit
- --create-ini - create the ini files required by the game in$HOME/.pyskool/ini/<game_name> and exit
- --create-sounds - create the sound files required by the game in$HOME/.pyskool/sounds and exit
- --force - overwrite existing images, ini files and sound files (whenusing the --create-images, --create-ini, --create-sounds or--setup option)
- -i INIDIR or --inidir=INIDIR - use ini files from a specifieddirectory
- -l SAVEFILE or --load=SAVEFILE - load a previously saved game
- --package-dir - show the path to the pyskool package directory and exit
- -q or --quick-start - start the game quickly by skipping thescroll-skool-into-view and theme tune sequence; equivalent to--config=QuickStart,1, this option overrides the QuickStart parameterin the [GameConfig] section
- -r SAVEDIR or --load-last=SAVEDIR - load the most recently saved gamefrom the specified directory
- --sample-rate=RATE - set the sample rate of the sound files created by--create-sounds (default: 44100)
- -s SCALE or --scale=SCALE - set the scale of the display; equivalentto --config=Scale,SCALE, this option overrides the Scale parameter inthe [ScreenConfig] section
- --search-dirs - show the locations that Pyskool searches for data filesand exit
- --setup - create the images, ini files and sound files required by thegame in $HOME/.pyskool and exit
The --create-images option first looks for Skool Daze and Back to Skooltape or snapshot files by the following names in $HOME/.pyskool:
- skool_daze.tzx
- skool_daze.sna
- skool_daze.z80
- skool_daze.szx
- back_to_skool.tzx
- back_to_skool.sna
- back_to_skool.z80
- back_to_skool.szx
If no such files are found, TZX files are downloaded from one of the sourceslisted in images.ini and saved to $HOME/.pyskool. Then the required imagesare built from the tape or snapshot files and saved to the appropriatesubdirectories under $HOME/.pyskool/images/originalx1.