pyskool 1.2__tar.gz → 1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyskool-1.3/MANIFEST.in +3 -0
- pyskool-1.3/PKG-INFO +117 -0
- pyskool-1.3/README.md +38 -0
- {pyskool-1.2 → pyskool-1.3}/back_to_skool.py +2 -3
- {pyskool-1.2 → pyskool-1.3}/back_to_skool_daze.py +2 -3
- {pyskool-1.2 → pyskool-1.3}/ezad_looks.py +2 -3
- pyskool-1.3/man/pyskool.py.rst +140 -0
- {pyskool-1.2 → pyskool-1.3}/pyskool/__init__.py +2 -4
- {pyskool-1.2 → pyskool-1.3}/pyskool/ai.py +27 -18
- {pyskool-1.2 → pyskool-1.3}/pyskool/animal.py +4 -5
- {pyskool-1.2 → pyskool-1.3}/pyskool/animatorystates.py +1 -2
- {pyskool-1.2 → pyskool-1.3}/pyskool/barrier.py +4 -5
- {pyskool-1.2 → pyskool-1.3}/pyskool/bike.py +7 -8
- {pyskool-1.2 → pyskool-1.3}/pyskool/btsini.py +13 -13
- {pyskool-1.2 → pyskool-1.3}/pyskool/btstaps.py +5 -7
- {pyskool-1.2 → pyskool-1.3}/pyskool/cast.py +47 -44
- {pyskool-1.2 → pyskool-1.3}/pyskool/character.py +63 -31
- pyskool-1.3/pyskool/data/images.ini +7 -0
- {pyskool-1.2 → pyskool-1.3}/pyskool/debug.py +1 -2
- {pyskool-1.2 → pyskool-1.3}/pyskool/desklid.py +7 -8
- {pyskool-1.2 → pyskool-1.3}/pyskool/droppable.py +5 -6
- {pyskool-1.2 → pyskool-1.3}/pyskool/eric.py +46 -25
- {pyskool-1.2 → pyskool-1.3}/pyskool/floor.py +3 -4
- {pyskool-1.2 → pyskool-1.3}/pyskool/game.py +32 -21
- {pyskool-1.2 → pyskool-1.3}/pyskool/graphics.py +56 -33
- {pyskool-1.2 → pyskool-1.3}/pyskool/image.py +11 -15
- {pyskool-1.2 → pyskool-1.3}/pyskool/iniparser.py +1 -2
- {pyskool-1.2 → pyskool-1.3}/pyskool/input.py +2 -4
- {pyskool-1.2 → pyskool-1.3}/pyskool/items.py +1 -2
- {pyskool-1.2 → pyskool-1.3}/pyskool/keys.py +5 -2
- {pyskool-1.2 → pyskool-1.3}/pyskool/lesson.py +28 -27
- {pyskool-1.2 → pyskool-1.3}/pyskool/lines.py +1 -2
- {pyskool-1.2 → pyskool-1.3}/pyskool/location.py +1 -2
- {pyskool-1.2 → pyskool-1.3}/pyskool/mutable.py +3 -4
- {pyskool-1.2 → pyskool-1.3}/pyskool/pellet.py +4 -5
- {pyskool-1.2 → pyskool-1.3}/pyskool/plant.py +5 -6
- {pyskool-1.2 → pyskool-1.3}/pyskool/pngwriter.py +2 -5
- {pyskool-1.2 → pyskool-1.3}/pyskool/room.py +19 -14
- {pyskool-1.2 → pyskool-1.3}/pyskool/run.py +6 -8
- {pyskool-1.2 → pyskool-1.3}/pyskool/scoreboard.py +2 -3
- {pyskool-1.2 → pyskool-1.3}/pyskool/sdini.py +11 -13
- {pyskool-1.2 → pyskool-1.3}/pyskool/sdtaps.py +5 -9
- {pyskool-1.2 → pyskool-1.3}/pyskool/skool.py +51 -46
- {pyskool-1.2 → pyskool-1.3}/pyskool/skoolbuilder.py +3 -4
- {pyskool-1.2 → pyskool-1.3}/pyskool/skoolids.py +1 -3
- {pyskool-1.2 → pyskool-1.3}/pyskool/skoolimage.py +2 -4
- {pyskool-1.2 → pyskool-1.3}/pyskool/skoolini.py +6 -8
- {pyskool-1.2 → pyskool-1.3}/pyskool/skoolsound.py +100 -62
- {pyskool-1.2 → pyskool-1.3}/pyskool/skooltaps.py +1 -3
- {pyskool-1.2 → pyskool-1.3}/pyskool/snapshot.py +3 -6
- {pyskool-1.2 → pyskool-1.3}/pyskool/sound.py +2 -3
- {pyskool-1.2 → pyskool-1.3}/pyskool/staircase.py +4 -5
- {pyskool-1.2 → pyskool-1.3}/pyskool/stinkbomb.py +4 -5
- {pyskool-1.2 → pyskool-1.3}/pyskool/timetable.py +2 -3
- {pyskool-1.2 → pyskool-1.3}/pyskool/water.py +4 -7
- pyskool-1.3/pyskool.egg-info/PKG-INFO +117 -0
- pyskool-1.3/pyskool.egg-info/SOURCES.txt +74 -0
- pyskool-1.3/pyskool.egg-info/dependency_links.txt +1 -0
- pyskool-1.3/pyskool.egg-info/top_level.txt +1 -0
- pyskool-1.3/setup.cfg +4 -0
- {pyskool-1.2 → pyskool-1.3}/setup.py +12 -16
- {pyskool-1.2 → pyskool-1.3}/skool_daze.py +2 -3
- {pyskool-1.2 → pyskool-1.3}/skool_daze_take_too.py +2 -3
- pyskool-1.3/tests/test_ai.py +1942 -0
- pyskool-1.3/tests/test_debug.py +399 -0
- pyskool-1.3/tests/test_eric.py +242 -0
- pyskool-1.3/tests/test_game.py +1209 -0
- pyskool-1.3/tests/test_iniparser.py +47 -0
- pyskool-1.3/tests/test_input.py +115 -0
- pyskool-1.3/tests/test_lines.py +550 -0
- pyskool-1.3/tests/test_mods.py +680 -0
- pyskool-1.3/tests/test_replays.py +172 -0
- pyskool-1.3/tests/test_sound.py +186 -0
- pyskool-1.3/tests/test_special_playtimes.py +192 -0
- pyskool-1.2/PKG-INFO +0 -111
- pyskool-1.2/docs/_sources/ai.txt +0 -5
- pyskool-1.2/docs/_sources/animal.txt +0 -5
- pyskool-1.2/docs/_sources/animatorystates.txt +0 -5
- pyskool-1.2/docs/_sources/barrier.txt +0 -5
- pyskool-1.2/docs/_sources/bike.txt +0 -5
- pyskool-1.2/docs/_sources/cast.txt +0 -5
- pyskool-1.2/docs/_sources/changelog.txt +0 -294
- pyskool-1.2/docs/_sources/character.txt +0 -5
- pyskool-1.2/docs/_sources/commands.txt +0 -903
- pyskool-1.2/docs/_sources/debug.txt +0 -5
- pyskool-1.2/docs/_sources/desklid.txt +0 -5
- pyskool-1.2/docs/_sources/droppable.txt +0 -5
- pyskool-1.2/docs/_sources/eric.txt +0 -5
- pyskool-1.2/docs/_sources/examples.txt +0 -343
- pyskool-1.2/docs/_sources/floor.txt +0 -5
- pyskool-1.2/docs/_sources/game.txt +0 -5
- pyskool-1.2/docs/_sources/graphics.txt +0 -5
- pyskool-1.2/docs/_sources/images.txt +0 -64
- pyskool-1.2/docs/_sources/index.txt +0 -71
- pyskool-1.2/docs/_sources/info.txt +0 -71
- pyskool-1.2/docs/_sources/inifile.txt +0 -1762
- pyskool-1.2/docs/_sources/iniparser.txt +0 -5
- pyskool-1.2/docs/_sources/input.txt +0 -5
- pyskool-1.2/docs/_sources/items.txt +0 -5
- pyskool-1.2/docs/_sources/keys.txt +0 -5
- pyskool-1.2/docs/_sources/lesson.txt +0 -5
- pyskool-1.2/docs/_sources/lines.txt +0 -5
- pyskool-1.2/docs/_sources/location.txt +0 -5
- pyskool-1.2/docs/_sources/mainini.txt +0 -120
- pyskool-1.2/docs/_sources/mutable.txt +0 -5
- pyskool-1.2/docs/_sources/pellet.txt +0 -5
- pyskool-1.2/docs/_sources/plant.txt +0 -5
- pyskool-1.2/docs/_sources/play.txt +0 -163
- pyskool-1.2/docs/_sources/room.txt +0 -5
- pyskool-1.2/docs/_sources/run.txt +0 -186
- pyskool-1.2/docs/_sources/scoreboard.txt +0 -5
- pyskool-1.2/docs/_sources/skool.txt +0 -5
- pyskool-1.2/docs/_sources/skoolbuilder.txt +0 -5
- pyskool-1.2/docs/_sources/sound.txt +0 -5
- pyskool-1.2/docs/_sources/staircase.txt +0 -5
- pyskool-1.2/docs/_sources/stinkbomb.txt +0 -5
- pyskool-1.2/docs/_sources/timetable.txt +0 -5
- pyskool-1.2/docs/_sources/water.txt +0 -5
- pyskool-1.2/docs/_sources/whatis.txt +0 -35
- pyskool-1.2/docs/_static/ajax-loader.gif +0 -0
- pyskool-1.2/docs/_static/basic.css +0 -537
- pyskool-1.2/docs/_static/comment-bright.png +0 -0
- pyskool-1.2/docs/_static/comment-close.png +0 -0
- pyskool-1.2/docs/_static/comment.png +0 -0
- pyskool-1.2/docs/_static/default.css +0 -256
- pyskool-1.2/docs/_static/doctools.js +0 -238
- pyskool-1.2/docs/_static/down-pressed.png +0 -0
- pyskool-1.2/docs/_static/down.png +0 -0
- pyskool-1.2/docs/_static/file.png +0 -0
- pyskool-1.2/docs/_static/jquery.js +0 -9404
- pyskool-1.2/docs/_static/minus.png +0 -0
- pyskool-1.2/docs/_static/plus.png +0 -0
- pyskool-1.2/docs/_static/pygments.css +0 -63
- pyskool-1.2/docs/_static/searchtools.js +0 -622
- pyskool-1.2/docs/_static/sidebar.js +0 -159
- pyskool-1.2/docs/_static/underscore.js +0 -1415
- pyskool-1.2/docs/_static/up-pressed.png +0 -0
- pyskool-1.2/docs/_static/up.png +0 -0
- pyskool-1.2/docs/_static/websupport.js +0 -808
- pyskool-1.2/docs/ai.html +0 -3731
- pyskool-1.2/docs/animal.html +0 -372
- pyskool-1.2/docs/animatorystates.html +0 -347
- pyskool-1.2/docs/barrier.html +0 -346
- pyskool-1.2/docs/bike.html +0 -222
- pyskool-1.2/docs/cast.html +0 -1566
- pyskool-1.2/docs/changelog.html +0 -469
- pyskool-1.2/docs/character.html +0 -2181
- pyskool-1.2/docs/commands.html +0 -974
- pyskool-1.2/docs/debug.html +0 -124
- pyskool-1.2/docs/desklid.html +0 -171
- pyskool-1.2/docs/droppable.html +0 -287
- pyskool-1.2/docs/eric.html +0 -785
- pyskool-1.2/docs/examples.html +0 -463
- pyskool-1.2/docs/floor.html +0 -167
- pyskool-1.2/docs/game.html +0 -232
- pyskool-1.2/docs/genindex.html +0 -5542
- pyskool-1.2/docs/graphics.html +0 -934
- pyskool-1.2/docs/images.html +0 -164
- pyskool-1.2/docs/index.html +0 -138
- pyskool-1.2/docs/info.html +0 -176
- pyskool-1.2/docs/inifile.html +0 -1814
- pyskool-1.2/docs/iniparser.html +0 -167
- pyskool-1.2/docs/input.html +0 -195
- pyskool-1.2/docs/items.html +0 -168
- pyskool-1.2/docs/keys.html +0 -371
- pyskool-1.2/docs/lesson.html +0 -628
- pyskool-1.2/docs/lines.html +0 -236
- pyskool-1.2/docs/location.html +0 -132
- pyskool-1.2/docs/mainini.html +0 -230
- pyskool-1.2/docs/mutable.html +0 -356
- pyskool-1.2/docs/pellet.html +0 -247
- pyskool-1.2/docs/plant.html +0 -220
- pyskool-1.2/docs/play.html +0 -275
- pyskool-1.2/docs/py-modindex.html +0 -274
- pyskool-1.2/docs/room.html +0 -574
- pyskool-1.2/docs/run.html +0 -310
- pyskool-1.2/docs/scoreboard.html +0 -168
- pyskool-1.2/docs/search.html +0 -105
- pyskool-1.2/docs/searchindex.js +0 -1
- pyskool-1.2/docs/skool.html +0 -1759
- pyskool-1.2/docs/skoolbuilder.html +0 -132
- pyskool-1.2/docs/sound.html +0 -399
- pyskool-1.2/docs/staircase.html +0 -175
- pyskool-1.2/docs/stinkbomb.html +0 -174
- pyskool-1.2/docs/timetable.html +0 -336
- pyskool-1.2/docs/water.html +0 -193
- pyskool-1.2/docs/whatis.html +0 -144
- pyskool-1.2/man/man6/back_to_skool.py.6 +0 -187
- pyskool-1.2/man/man6/back_to_skool_daze.py.6 +0 -187
- pyskool-1.2/man/man6/ezad_looks.py.6 +0 -187
- pyskool-1.2/man/man6/skool_daze.py.6 +0 -187
- pyskool-1.2/man/man6/skool_daze_take_too.py.6 +0 -187
- pyskool-1.2/pyskool/data/images.ini +0 -7
- {pyskool-1.2 → pyskool-1.3}/COPYING +0 -0
- {pyskool-1.2 → pyskool-1.3}/pyskool/data/pyskool.ini +0 -0
pyskool-1.3/MANIFEST.in
ADDED
pyskool-1.3/PKG-INFO
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pyskool
|
|
3
|
+
Version: 1.3
|
|
4
|
+
Summary: A remake of 'Skool Daze' and 'Back to Skool' using Pygame
|
|
5
|
+
Home-page: https://pyskool.ca
|
|
6
|
+
Author: Richard Dymond
|
|
7
|
+
Author-email: rjdymond@gmail.com
|
|
8
|
+
License: GPLv3
|
|
9
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
10
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Topic :: Games/Entertainment
|
|
14
|
+
Classifier: Topic :: Games/Entertainment :: Arcade
|
|
15
|
+
Classifier: Topic :: Games/Entertainment :: Side-Scrolling/Arcade Games
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
License-File: COPYING
|
|
18
|
+
Dynamic: author
|
|
19
|
+
Dynamic: author-email
|
|
20
|
+
Dynamic: classifier
|
|
21
|
+
Dynamic: description
|
|
22
|
+
Dynamic: home-page
|
|
23
|
+
Dynamic: license
|
|
24
|
+
Dynamic: license-file
|
|
25
|
+
Dynamic: requires-python
|
|
26
|
+
Dynamic: summary
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
Pyskool
|
|
30
|
+
=======
|
|
31
|
+
In 1984, Microsphere published `Skool Daze`_, a game for the
|
|
32
|
+
`Sinclair ZX Spectrum`_. In 1985, the sequel `Back to Skool`_ was published.
|
|
33
|
+
|
|
34
|
+
Each game is based in a boys' school (though Back to Skool adds a playground
|
|
35
|
+
and a girls' school) and revolves around the antics of Eric, the hero. In Skool
|
|
36
|
+
Daze, Eric must steal his report card from the school safe - the combination of
|
|
37
|
+
which must be extracted from the teachers' brains using flashing shields or, in
|
|
38
|
+
the case of the history teacher, post-hypnotic suggestion. In Back to Skool,
|
|
39
|
+
Eric must get his report card back into the school safe, this time with the
|
|
40
|
+
extra help provided by a water pistol, stinkbombs, a bike, mice, a frog and a
|
|
41
|
+
girlfriend.
|
|
42
|
+
|
|
43
|
+
Pyskool is a re-implementation of these classic games in Pygame, with the aim
|
|
44
|
+
of making them easy to customise by editing configuration files or - for more
|
|
45
|
+
advanced customisation - writing some Python code.
|
|
46
|
+
|
|
47
|
+
.. _Skool Daze: https://en.wikipedia.org/wiki/Skool_Daze
|
|
48
|
+
.. _Back to Skool: https://en.wikipedia.org/wiki/Back_to_Skool
|
|
49
|
+
.. _Sinclair ZX Spectrum: https://en.wikipedia.org/wiki/ZX_Spectrum
|
|
50
|
+
|
|
51
|
+
Requirements
|
|
52
|
+
------------
|
|
53
|
+
Pyskool requires Python 3.10+ and `Pygame`_ (version 2.0.2+).
|
|
54
|
+
|
|
55
|
+
On Linux/\*BSD, Pygame is available via the package management system: the
|
|
56
|
+
`python3-pygame` package on most Linux distros, the `devel/py-game` port on
|
|
57
|
+
FreeBSD and NetBSD, and the `devel/pygame` port on OpenBSD.
|
|
58
|
+
|
|
59
|
+
Windows and Mac OS X users should take care to select the Pygame installer that
|
|
60
|
+
matches the version of Python that is installed.
|
|
61
|
+
|
|
62
|
+
.. _Pygame: https://www.pygame.org/download.shtml
|
|
63
|
+
|
|
64
|
+
Running Pyskool
|
|
65
|
+
---------------
|
|
66
|
+
Pyskool is actually five separate games:
|
|
67
|
+
|
|
68
|
+
* Skool Daze (`skool_daze.py`)
|
|
69
|
+
* Back to Skool (`back_to_skool.py`)
|
|
70
|
+
* Skool Daze Take Too (`skool_daze_take_too.py`)
|
|
71
|
+
* Ezad Looks (`ezad_looks.py`)
|
|
72
|
+
* Back to Skool Daze (`back_to_skool_daze.py`)
|
|
73
|
+
|
|
74
|
+
Before playing any of these games for the first time, the required images, ini
|
|
75
|
+
files and sound files will need to be created. This can be done by using the
|
|
76
|
+
``--setup`` option; for example::
|
|
77
|
+
|
|
78
|
+
$ skool_daze.py --setup
|
|
79
|
+
|
|
80
|
+
This will:
|
|
81
|
+
|
|
82
|
+
* download TZX files from the sources listed in `images.ini` and use them to
|
|
83
|
+
create the required images in `~/.pyskool/images`
|
|
84
|
+
* write the required ini files in `~/.pyskool/ini`
|
|
85
|
+
* write the required sound files in `~/.pyskool/sounds`
|
|
86
|
+
|
|
87
|
+
After that, Pyskool can be run in Skool Daze mode::
|
|
88
|
+
|
|
89
|
+
$ skool_daze.py
|
|
90
|
+
|
|
91
|
+
Playing Pyskool
|
|
92
|
+
---------------
|
|
93
|
+
The keys to move Eric around are:
|
|
94
|
+
|
|
95
|
+
* 'q' or up arrow - go up stairs, or continue walking in the same direction
|
|
96
|
+
* 'a' or down arrow - go down stairs, or continue walking in the same direction
|
|
97
|
+
* 'o' or left arrow - left
|
|
98
|
+
* 'p' or right arrow - right
|
|
99
|
+
* 'f' - fire catapult
|
|
100
|
+
* 'h' - hit
|
|
101
|
+
* 'j' - jump
|
|
102
|
+
* 's' - sit/stand
|
|
103
|
+
* 'w' - write on a blackboard (press Enter/Return to finish)
|
|
104
|
+
|
|
105
|
+
Other useful keys are:
|
|
106
|
+
|
|
107
|
+
* Escape - quit the game
|
|
108
|
+
* End - pause/resume
|
|
109
|
+
* Insert - take a screenshot
|
|
110
|
+
* F2 - save the game
|
|
111
|
+
* F6 - load the most recently saved game
|
|
112
|
+
* F11 - switch between full-screen and windowed mode
|
|
113
|
+
* F12 - show/hide the menu
|
|
114
|
+
|
|
115
|
+
For full instructions, see the `documentation`_.
|
|
116
|
+
|
|
117
|
+
.. _documentation: https://pyskool.ca/docs/pyskool/play.html
|
pyskool-1.3/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
Pyskool
|
|
2
|
+
=======
|
|
3
|
+
In 1984, Microsphere published
|
|
4
|
+
[Skool Daze](https://en.wikipedia.org/wiki/Skool_Daze), a game for the
|
|
5
|
+
[Sinclair ZX Spectrum](https://en.wikipedia.org/wiki/ZX_Spectrum). In 1985, the
|
|
6
|
+
sequel [Back to Skool](https://en.wikipedia.org/wiki/Back_to_Skool) was
|
|
7
|
+
published.
|
|
8
|
+
|
|
9
|
+
Each game is based in a boys' school (though Back to Skool adds a playground
|
|
10
|
+
and a girls' school) and revolves around the antics of Eric, the hero. In Skool
|
|
11
|
+
Daze, Eric must steal his report card from the school safe - the combination of
|
|
12
|
+
which must be extracted from the teachers' brains using flashing shields or, in
|
|
13
|
+
the case of the history teacher, post-hypnotic suggestion. In Back to Skool,
|
|
14
|
+
Eric must get his report card back into the school safe, this time with the
|
|
15
|
+
extra help provided by a water pistol, stinkbombs, a bike, mice, a frog and a
|
|
16
|
+
girlfriend.
|
|
17
|
+
|
|
18
|
+
Pyskool is a re-implementation of these classic games in Python and Pygame,
|
|
19
|
+
with the aim of making them easy to customise by editing a configuration file
|
|
20
|
+
or - for more advanced customisation - writing some Python code.
|
|
21
|
+
|
|
22
|
+
See the [documentation](https://skoolkid.github.io/pyskool/) for more details.
|
|
23
|
+
|
|
24
|
+
Playing Pyskool
|
|
25
|
+
---------------
|
|
26
|
+
Before playing Pyskool for the first time from a checkout of this repository,
|
|
27
|
+
you will need to create the game launcher scripts, images, ini files and sound
|
|
28
|
+
files:
|
|
29
|
+
|
|
30
|
+
$ make scripts images ini sounds
|
|
31
|
+
|
|
32
|
+
Then you can run one of the game launcher scripts:
|
|
33
|
+
|
|
34
|
+
$ ./skool_daze.py
|
|
35
|
+
$ ./back_to_skool.py
|
|
36
|
+
$ ./skool_daze_take_too.py
|
|
37
|
+
$ ./ezad_looks.py
|
|
38
|
+
$ ./back_to_skool_daze.py
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
======================
|
|
2
|
+
%{script}
|
|
3
|
+
======================
|
|
4
|
+
|
|
5
|
+
---------------------------------------
|
|
6
|
+
run Pyskool in %{game} mode
|
|
7
|
+
---------------------------------------
|
|
8
|
+
|
|
9
|
+
:Author: Richard Dymond
|
|
10
|
+
:Copyright: 2026, Richard Dymond
|
|
11
|
+
:Version: 1.3
|
|
12
|
+
:Date: 2014-12-08
|
|
13
|
+
:Manual section: 6
|
|
14
|
+
|
|
15
|
+
SYNOPSIS
|
|
16
|
+
========
|
|
17
|
+
``%{script}`` [options]
|
|
18
|
+
|
|
19
|
+
DESCRIPTION
|
|
20
|
+
===========
|
|
21
|
+
``%{script}`` runs Pyskool in %{game} mode. Pyskool is a remake of the classic
|
|
22
|
+
ZX Spectrum games Skool Daze and Back to Skool by Microsphere.
|
|
23
|
+
|
|
24
|
+
OPTIONS
|
|
25
|
+
=======
|
|
26
|
+
--version
|
|
27
|
+
Show Pyskool's version number and exit.
|
|
28
|
+
|
|
29
|
+
-h, --help
|
|
30
|
+
Show a summary of the available options.
|
|
31
|
+
|
|
32
|
+
-c, --cheat
|
|
33
|
+
Enable cheat keys. This option is equivalent to '``--config`` Cheat,1'.
|
|
34
|
+
|
|
35
|
+
--config `P,V`
|
|
36
|
+
Set the value of the configuration parameter `P` to `V`; this option may be
|
|
37
|
+
used multiple times.
|
|
38
|
+
|
|
39
|
+
--create-images
|
|
40
|
+
Create the images required by the game in ``~/.pyskool/images`` and exit.
|
|
41
|
+
|
|
42
|
+
--create-ini
|
|
43
|
+
Create the ini files required by the game in ``~/.pyskool/ini/%{gamedir}``
|
|
44
|
+
and exit.
|
|
45
|
+
|
|
46
|
+
--create-sounds
|
|
47
|
+
Create the sound files required by the game in ``~/.pyskool/sounds`` and
|
|
48
|
+
exit.
|
|
49
|
+
|
|
50
|
+
--force
|
|
51
|
+
Overwrite existing images, ini files and sound files (when using the
|
|
52
|
+
``--create-images``, ``--create-ini``, ``--create-sounds`` or ``--setup``
|
|
53
|
+
option).
|
|
54
|
+
|
|
55
|
+
-i, --inidir `INIDIR`
|
|
56
|
+
Read ini files from this directory instead of ``ini/%{gamedir}``.
|
|
57
|
+
|
|
58
|
+
-l, --load `SAVEFILE`
|
|
59
|
+
Load a saved game from the specified file.
|
|
60
|
+
|
|
61
|
+
--package-dir
|
|
62
|
+
Show the path to the pyskool package directory and exit.
|
|
63
|
+
|
|
64
|
+
-q, --quick-start
|
|
65
|
+
Start the game quickly by skipping the scroll-skool-into-view and theme tune
|
|
66
|
+
sequence. This option is equivalent to '``--config`` QuickStart,1'.
|
|
67
|
+
|
|
68
|
+
-r, --load-last `SAVEDIR`
|
|
69
|
+
Load the most recently saved game in the specified directory.
|
|
70
|
+
|
|
71
|
+
--sample-rate `RATE`
|
|
72
|
+
Set the sample rate of the sound files created by ``--create-sounds``. The
|
|
73
|
+
default sample rate is 44100.
|
|
74
|
+
|
|
75
|
+
-s, --scale `SCALE`
|
|
76
|
+
Scale graphics by this factor (1=original Speccy size). This option is
|
|
77
|
+
equivalent to '``--config`` Scale,SCALE'.
|
|
78
|
+
|
|
79
|
+
--search-dirs
|
|
80
|
+
Show the locations that Pyskool searches for data files and exit.
|
|
81
|
+
|
|
82
|
+
--setup
|
|
83
|
+
Create the images, ini files and sound files required by the game in
|
|
84
|
+
``~/.pyskool`` and exit. This option is equivalent to combining the
|
|
85
|
+
``--create-images``, ``--create-ini`` and ``--create-sounds`` options.
|
|
86
|
+
|
|
87
|
+
FILES
|
|
88
|
+
=====
|
|
89
|
+
When Pyskool starts in %{game} mode, it looks for the following things:
|
|
90
|
+
|
|
91
|
+
|
|
|
92
|
+
| - a file named ``pyskool.ini`` (the main ini file)
|
|
93
|
+
| - a directory named ``images``
|
|
94
|
+
| - a directory named ``sounds``
|
|
95
|
+
| - a directory named ``ini/%{gamedir}``
|
|
96
|
+
|
|
97
|
+
Each of these things must be present in one of the following directories in
|
|
98
|
+
order for Pyskool to find it:
|
|
99
|
+
|
|
100
|
+
|
|
|
101
|
+
| - the current working directory
|
|
102
|
+
| - ``~/.pyskool``
|
|
103
|
+
| - the directory containing ``%{script}``
|
|
104
|
+
| - ``/usr/share/pyskool``
|
|
105
|
+
| - ``$PACKAGE_DIR/data``
|
|
106
|
+
|
|
107
|
+
where ``$PACKAGE_DIR`` is the directory in which the pyskool package is
|
|
108
|
+
installed, as shown by:
|
|
109
|
+
|
|
110
|
+
|
|
|
111
|
+
| ``%{script} --package-dir``
|
|
112
|
+
|
|
113
|
+
When you need a reminder of these locations, run:
|
|
114
|
+
|
|
115
|
+
|
|
|
116
|
+
| ``%{script} --search-dirs``
|
|
117
|
+
|
|
118
|
+
IMAGES
|
|
119
|
+
======
|
|
120
|
+
The ``--create-images`` option first looks for Skool Daze and Back to Skool
|
|
121
|
+
tape or snapshot files by the following names in ``~/.pyskool``:
|
|
122
|
+
|
|
123
|
+
|
|
|
124
|
+
| ``skool_daze.tzx``
|
|
125
|
+
| ``skool_daze.sna``
|
|
126
|
+
| ``skool_daze.z80``
|
|
127
|
+
| ``skool_daze.szx``
|
|
128
|
+
| ``back_to_skool.tzx``
|
|
129
|
+
| ``back_to_skool.sna``
|
|
130
|
+
| ``back_to_skool.z80``
|
|
131
|
+
| ``back_to_skool.szx``
|
|
132
|
+
|
|
133
|
+
If no such files are found, TZX files are downloaded from one of the sources
|
|
134
|
+
listed in ``images.ini`` and saved to ``~/.pyskool``. Then the required images
|
|
135
|
+
are built from the tape or snapshot files and saved to the appropriate
|
|
136
|
+
subdirectories under ``~/.pyskool/images/originalx1``.
|
|
137
|
+
|
|
138
|
+
SEE ALSO
|
|
139
|
+
========
|
|
140
|
+
%{seealso}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
# Copyright 2011-2015 Richard Dymond (rjdymond@gmail.com)
|
|
1
|
+
# © 2011-2016, 2026 Richard Dymond (rjdymond@gmail.com)
|
|
4
2
|
#
|
|
5
3
|
# This file is part of Pyskool.
|
|
6
4
|
#
|
|
@@ -18,7 +16,7 @@
|
|
|
18
16
|
|
|
19
17
|
import os.path
|
|
20
18
|
|
|
21
|
-
version = '1.
|
|
19
|
+
version = '1.3'
|
|
22
20
|
package_dir = os.path.dirname(__file__)
|
|
23
21
|
user_dir = os.path.expanduser(os.path.join('~', '.pyskool'))
|
|
24
22
|
images_subdir = 'images'
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
# Copyright 2008-2012, 2014 Richard Dymond (rjdymond@gmail.com)
|
|
1
|
+
# © 2008-2012, 2014, 2015, 2026 Richard Dymond (rjdymond@gmail.com)
|
|
4
2
|
#
|
|
5
3
|
# This file is part of Pyskool.
|
|
6
4
|
#
|
|
@@ -24,8 +22,8 @@ Classes that implement the commands found in command lists, such as
|
|
|
24
22
|
import sys
|
|
25
23
|
import random
|
|
26
24
|
|
|
27
|
-
from .location import Location
|
|
28
|
-
from
|
|
25
|
+
from pyskool.location import Location
|
|
26
|
+
from pyskool import debug
|
|
29
27
|
|
|
30
28
|
def get_command_class(command_name):
|
|
31
29
|
"""Return the class object for a given command.
|
|
@@ -66,7 +64,7 @@ class CommandList:
|
|
|
66
64
|
a command stack from which commands are popped after they have finished
|
|
67
65
|
executing.
|
|
68
66
|
|
|
69
|
-
:type character: :class:`~character.Character`
|
|
67
|
+
:type character: :class:`~pyskool.character.Character`
|
|
70
68
|
:param character: The character to be controlled (the command list owner).
|
|
71
69
|
"""
|
|
72
70
|
def __init__(self, character):
|
|
@@ -210,7 +208,7 @@ class CommandList:
|
|
|
210
208
|
"""Set the destination of the character if he is under the control of a
|
|
211
209
|
:class:`GoTo` command.
|
|
212
210
|
|
|
213
|
-
:type destination: :class:`~location.Location`
|
|
211
|
+
:type destination: :class:`~pyskool.location.Location`
|
|
214
212
|
:param destination: The destination to set.
|
|
215
213
|
"""
|
|
216
214
|
if destination and self.is_GoToing():
|
|
@@ -351,7 +349,7 @@ class SitForAssembly(ComplexCommand):
|
|
|
351
349
|
"""
|
|
352
350
|
if self.character.got_signal(self.assembly_finished):
|
|
353
351
|
return self
|
|
354
|
-
return GoToXY(self.character.x - random.randint(*self.sit_range), self.character.y)
|
|
352
|
+
return GoToXY(max(0, self.character.x - random.randint(*self.sit_range)), self.character.y)
|
|
355
353
|
|
|
356
354
|
def sit_down(self):
|
|
357
355
|
"""Make a character sit down for assembly, or turn round to face the
|
|
@@ -526,7 +524,7 @@ class GoTo(Command):
|
|
|
526
524
|
"""Command that makes a character go to a location.
|
|
527
525
|
|
|
528
526
|
:param location_id: The ID of the location to go to (may be `None`).
|
|
529
|
-
:type destination: :class:`~location.Location`
|
|
527
|
+
:type destination: :class:`~pyskool.location.Location`
|
|
530
528
|
:param destination: The location to go to (required if `location_id`
|
|
531
529
|
is `None`).
|
|
532
530
|
:param go_one_step: `True` if this command should terminate after
|
|
@@ -569,14 +567,18 @@ class GoTo(Command):
|
|
|
569
567
|
if self.character.x < next_x:
|
|
570
568
|
self.done = self.go_one_step
|
|
571
569
|
return self.character.right()
|
|
572
|
-
|
|
570
|
+
if self.character.x > next_x:
|
|
573
571
|
self.done = self.go_one_step
|
|
574
572
|
return self.character.left()
|
|
575
|
-
|
|
573
|
+
if next_staircase:
|
|
576
574
|
if next_staircase.contains(self.character):
|
|
577
575
|
self.character.walk(True)
|
|
578
576
|
else:
|
|
579
577
|
self.character.turn()
|
|
578
|
+
else:
|
|
579
|
+
c, d = self.character, self.destination
|
|
580
|
+
debug.error(f"Cannot determine next staircase for {c.name} at ({c.x},{c.y}) going to ({d.x},{d.y})")
|
|
581
|
+
return
|
|
580
582
|
self.done = self.go_one_step
|
|
581
583
|
|
|
582
584
|
def is_GoTo(self):
|
|
@@ -717,9 +719,11 @@ class WalkAround(Command):
|
|
|
717
719
|
self.character.walk(True)
|
|
718
720
|
return
|
|
719
721
|
if self.origin is None:
|
|
720
|
-
|
|
722
|
+
# Prevent the infinite loop that would occur if the origin
|
|
723
|
+
# x-coordinate were 0
|
|
724
|
+
self.origin = max(1, self.character.x)
|
|
721
725
|
if self.character.x == self.origin:
|
|
722
|
-
return GoToXY(self.character.x - random.randint(*self.walkabout_range), self.character.y)
|
|
726
|
+
return GoToXY(max(0, self.character.x - random.randint(*self.walkabout_range)), self.character.y)
|
|
723
727
|
self.count -= 1
|
|
724
728
|
return GoToXY(self.origin, self.character.y)
|
|
725
729
|
|
|
@@ -1036,6 +1040,9 @@ class WriteOnBoard(Command):
|
|
|
1036
1040
|
"""
|
|
1037
1041
|
if not (self.message and self.character.get_blackboard()):
|
|
1038
1042
|
return self
|
|
1043
|
+
if self.character.is_sitting():
|
|
1044
|
+
self.character.get_up()
|
|
1045
|
+
return
|
|
1039
1046
|
if self.character.write_on_board(self.message, self.index):
|
|
1040
1047
|
self.character.lower_arm()
|
|
1041
1048
|
return self
|
|
@@ -2213,6 +2220,7 @@ class EvadeMouse(Command):
|
|
|
2213
2220
|
self.in_the_air = False
|
|
2214
2221
|
self.on_a_chair = False
|
|
2215
2222
|
self.old_as = None
|
|
2223
|
+
self.was_seated = False
|
|
2216
2224
|
|
|
2217
2225
|
def execute(self):
|
|
2218
2226
|
"""Make a character:
|
|
@@ -2226,6 +2234,7 @@ class EvadeMouse(Command):
|
|
|
2226
2234
|
"""
|
|
2227
2235
|
if self.old_as is None:
|
|
2228
2236
|
self.old_as = self.character.animatory_state
|
|
2237
|
+
self.was_seated = self.character.is_sitting_on_chair()
|
|
2229
2238
|
if self.character.is_sitting():
|
|
2230
2239
|
self.character.get_up()
|
|
2231
2240
|
return
|
|
@@ -2235,7 +2244,10 @@ class EvadeMouse(Command):
|
|
|
2235
2244
|
self.character.y += 1
|
|
2236
2245
|
self.in_the_air = self.on_a_chair = False
|
|
2237
2246
|
return
|
|
2238
|
-
|
|
2247
|
+
if self.was_seated:
|
|
2248
|
+
self.character.sit()
|
|
2249
|
+
else:
|
|
2250
|
+
self.character.animatory_state = self.old_as
|
|
2239
2251
|
self.character.trigger_speed_change()
|
|
2240
2252
|
return self
|
|
2241
2253
|
self.character.go_slow()
|
|
@@ -2566,9 +2578,7 @@ class Flight(Command):
|
|
|
2566
2578
|
"""Move Eric to the next location and phase of animation in the
|
|
2567
2579
|
flight sequence.
|
|
2568
2580
|
|
|
2569
|
-
:return: `self` if Eric has landed
|
|
2570
|
-
Eric has landed but is now immobilised (as when falling from a
|
|
2571
|
-
great height); or `None` otherwise.
|
|
2581
|
+
:return: `self` if Eric has landed, or `None` otherwise.
|
|
2572
2582
|
"""
|
|
2573
2583
|
if self.index < len(self.phases):
|
|
2574
2584
|
x_inc, y_inc, state = self.phases[self.index]
|
|
@@ -2580,7 +2590,6 @@ class Flight(Command):
|
|
|
2580
2590
|
return
|
|
2581
2591
|
if self.command_list_id:
|
|
2582
2592
|
self.character.paralyse(self.command_list_id)
|
|
2583
|
-
return Freeze()
|
|
2584
2593
|
return self
|
|
2585
2594
|
|
|
2586
2595
|
class JumpOffSaddle(ComplexCommand):
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Copyright 2010, 2014 Richard Dymond (rjdymond@gmail.com)
|
|
1
|
+
# © 2010, 2014, 2026 Richard Dymond (rjdymond@gmail.com)
|
|
3
2
|
#
|
|
4
3
|
# This file is part of Pyskool.
|
|
5
4
|
#
|
|
@@ -19,9 +18,9 @@
|
|
|
19
18
|
Classes that represent the animals in the game.
|
|
20
19
|
"""
|
|
21
20
|
|
|
22
|
-
from .character import Character
|
|
23
|
-
from
|
|
24
|
-
from .location import Location
|
|
21
|
+
from pyskool.character import Character
|
|
22
|
+
from pyskool import animatorystates
|
|
23
|
+
from pyskool.location import Location
|
|
25
24
|
|
|
26
25
|
class Animal(Character):
|
|
27
26
|
"""Abstract superclass for any animals in the game.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Copyright 2008-2010 Richard Dymond (rjdymond@gmail.com)
|
|
1
|
+
# © 2008-2010, 2015, 2026 Richard Dymond (rjdymond@gmail.com)
|
|
3
2
|
#
|
|
4
3
|
# This file is part of Pyskool.
|
|
5
4
|
#
|
|
@@ -39,7 +38,7 @@ class Barrier:
|
|
|
39
38
|
def impedes(self, character, distance=0, force_shut=False):
|
|
40
39
|
"""Return whether a character is impeded by this barrier.
|
|
41
40
|
|
|
42
|
-
:type character: :class:`~character.Character`
|
|
41
|
+
:type character: :class:`~pyskool.character.Character`
|
|
43
42
|
:param character: The character to check.
|
|
44
43
|
:param distance: The maximum distance in front of the character at
|
|
45
44
|
which the barrier should be considered an obstruction.
|
|
@@ -78,9 +77,9 @@ class Wall(Barrier):
|
|
|
78
77
|
"""Return whether this wall blocks the view from one location to
|
|
79
78
|
another.
|
|
80
79
|
|
|
81
|
-
:type a: :class:`~location.Location`
|
|
80
|
+
:type a: :class:`~pyskool.location.Location`
|
|
82
81
|
:param a: The first location.
|
|
83
|
-
:type b: :class:`~location.Location`
|
|
82
|
+
:type b: :class:`~pyskool.location.Location`
|
|
84
83
|
:param b: The other location.
|
|
85
84
|
"""
|
|
86
85
|
min_x = min(a.x, b.x)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Copyright 2010, 2014 Richard Dymond (rjdymond@gmail.com)
|
|
1
|
+
# © 2010, 2014, 2015, 2026 Richard Dymond (rjdymond@gmail.com)
|
|
3
2
|
#
|
|
4
3
|
# This file is part of Pyskool.
|
|
5
4
|
#
|
|
@@ -16,12 +15,12 @@
|
|
|
16
15
|
# Pyskool. If not, see <http://www.gnu.org/licenses/>.
|
|
17
16
|
|
|
18
17
|
"""
|
|
19
|
-
Defines the :class
|
|
18
|
+
Defines the :class:`Bike` class.
|
|
20
19
|
"""
|
|
21
20
|
|
|
22
|
-
from .character import Character
|
|
23
|
-
from
|
|
24
|
-
from .location import Location
|
|
21
|
+
from pyskool.character import Character
|
|
22
|
+
from pyskool import animatorystates
|
|
23
|
+
from pyskool.location import Location
|
|
25
24
|
|
|
26
25
|
class Bike(Character):
|
|
27
26
|
"""The bike.
|
|
@@ -80,7 +79,7 @@ class Bike(Character):
|
|
|
80
79
|
"""Start wheeling the bike along after the rider has dismounted or
|
|
81
80
|
stood on the saddle.
|
|
82
81
|
|
|
83
|
-
:type rider: :class:`~character.Character`
|
|
82
|
+
:type rider: :class:`~pyskool.character.Character`
|
|
84
83
|
:param rider: The rider.
|
|
85
84
|
"""
|
|
86
85
|
self.walk_delay = self.move_delay
|
|
@@ -111,7 +110,7 @@ class Bike(Character):
|
|
|
111
110
|
def fall(self, rider=None):
|
|
112
111
|
"""Make the bike fall over (as when it has lost momentum).
|
|
113
112
|
|
|
114
|
-
:type rider: :class:`~character.Character`
|
|
113
|
+
:type rider: :class:`~pyskool.character.Character`
|
|
115
114
|
:param rider: Whoever was riding the bike (if anybody).
|
|
116
115
|
"""
|
|
117
116
|
if rider:
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
# Copyright 2010, 2012-2014 Richard Dymond (rjdymond@gmail.com)
|
|
1
|
+
# © 2010, 2012-2015, 2026 Richard Dymond (rjdymond@gmail.com)
|
|
4
2
|
#
|
|
5
3
|
# This file is part of Pyskool.
|
|
6
4
|
#
|
|
@@ -16,15 +14,15 @@
|
|
|
16
14
|
# You should have received a copy of the GNU General Public License along with
|
|
17
15
|
# Pyskool. If not, see <http://www.gnu.org/licenses/>.
|
|
18
16
|
|
|
19
|
-
from .skoolini import SkoolIniMaker, BACK_TO_SKOOL, BACK_TO_SKOOL_DAZE
|
|
20
|
-
from .btstaps import BTSTapMaker
|
|
21
|
-
from .skoolids import *
|
|
22
|
-
from
|
|
23
|
-
from
|
|
24
|
-
from
|
|
25
|
-
from
|
|
26
|
-
from
|
|
27
|
-
from
|
|
17
|
+
from pyskool.skoolini import SkoolIniMaker, BACK_TO_SKOOL, BACK_TO_SKOOL_DAZE
|
|
18
|
+
from pyskool.btstaps import BTSTapMaker
|
|
19
|
+
from pyskool.skoolids import *
|
|
20
|
+
from pyskool import animatorystates as states
|
|
21
|
+
from pyskool import graphics
|
|
22
|
+
from pyskool import items
|
|
23
|
+
from pyskool import lines
|
|
24
|
+
from pyskool import skoolbuilder
|
|
25
|
+
from pyskool import sound
|
|
28
26
|
|
|
29
27
|
# Animation phases
|
|
30
28
|
AP_FROG_TURN_ROUND = 'FrogTurnRound'
|
|
@@ -801,6 +799,8 @@ class BTSIniMaker(SkoolIniMaker):
|
|
|
801
799
|
self.assembly_messages.append((noun, "LATIN MASTER'S AUNT"))
|
|
802
800
|
self.assembly_messages.append((noun, "MUSIC TEACHER'S PIANO"))
|
|
803
801
|
else:
|
|
802
|
+
self.assembly_messages.append((verb, "KIDNAPPED"))
|
|
803
|
+
self.assembly_messages.append((verb, "ATE"))
|
|
804
804
|
self.assembly_messages.append((verb, "SET FIRE TO"))
|
|
805
805
|
self.assembly_messages.append((verb, "BLEW UP"))
|
|
806
806
|
self.assembly_messages.append((verb, "IS MAKING RUDE PHONE CALLS TO"))
|
|
@@ -977,7 +977,7 @@ class BTSIniMaker(SkoolIniMaker):
|
|
|
977
977
|
self.cups.append(('MiddleCup', (14, 8), (1, 1), (27, 14)))
|
|
978
978
|
if self.custom != BACK_TO_SKOOL_DAZE:
|
|
979
979
|
self.cups.append(('RightCup', (14, 7), (1, 1), (30, 14)))
|
|
980
|
-
|
|
980
|
+
self.cups.append(('GirlsCup', (14, 9), (1, 1), (186, 14)))
|
|
981
981
|
|
|
982
982
|
def create_plants(self):
|
|
983
983
|
self.plants = []
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
# Copyright 2010, 2014 Richard Dymond (rjdymond@gmail.com)
|
|
1
|
+
# © 2010, 2014, 2026 Richard Dymond (rjdymond@gmail.com)
|
|
4
2
|
#
|
|
5
3
|
# This file is part of Pyskool.
|
|
6
4
|
#
|
|
@@ -16,10 +14,10 @@
|
|
|
16
14
|
# You should have received a copy of the GNU General Public License along with
|
|
17
15
|
# Pyskool. If not, see <http://www.gnu.org/licenses/>.
|
|
18
16
|
|
|
19
|
-
from .skoolini import BACK_TO_SKOOL_DAZE
|
|
20
|
-
from
|
|
21
|
-
from .skooltaps import *
|
|
22
|
-
from .skoolids import *
|
|
17
|
+
from pyskool.skoolini import BACK_TO_SKOOL_DAZE
|
|
18
|
+
from pyskool import skoolbuilder
|
|
19
|
+
from pyskool.skooltaps import *
|
|
20
|
+
from pyskool.skoolids import *
|
|
23
21
|
|
|
24
22
|
#: The `chase_x` argument for the MonitorEric command.
|
|
25
23
|
CHASE_X = 160
|