ChamberCourt 0.9.0__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.
Files changed (30) hide show
  1. chambercourt-0.9.0/ChamberCourt.egg-info/PKG-INFO +83 -0
  2. chambercourt-0.9.0/ChamberCourt.egg-info/SOURCES.txt +28 -0
  3. chambercourt-0.9.0/ChamberCourt.egg-info/dependency_links.txt +1 -0
  4. chambercourt-0.9.0/ChamberCourt.egg-info/entry_points.txt +2 -0
  5. chambercourt-0.9.0/ChamberCourt.egg-info/requires.txt +7 -0
  6. chambercourt-0.9.0/ChamberCourt.egg-info/top_level.txt +1 -0
  7. chambercourt-0.9.0/PKG-INFO +83 -0
  8. chambercourt-0.9.0/README.md +61 -0
  9. chambercourt-0.9.0/chambercourt/__init__.py +18 -0
  10. chambercourt-0.9.0/chambercourt/__main__.py +10 -0
  11. chambercourt-0.9.0/chambercourt/acorn-mode-1.ttf +0 -0
  12. chambercourt-0.9.0/chambercourt/app-icon.png +0 -0
  13. chambercourt-0.9.0/chambercourt/event.py +29 -0
  14. chambercourt-0.9.0/chambercourt/game.py +592 -0
  15. chambercourt-0.9.0/chambercourt/langdetect.py +60 -0
  16. chambercourt-0.9.0/chambercourt/levels/01 Plain map.tmx +19 -0
  17. chambercourt-0.9.0/chambercourt/levels/Brick.png +0 -0
  18. chambercourt-0.9.0/chambercourt/levels/Die.png +0 -0
  19. chambercourt-0.9.0/chambercourt/levels/Die.wav +0 -0
  20. chambercourt-0.9.0/chambercourt/levels/Gap.png +0 -0
  21. chambercourt-0.9.0/chambercourt/levels/Hero.png +0 -0
  22. chambercourt-0.9.0/chambercourt/levels/Tileset.tsx +13 -0
  23. chambercourt-0.9.0/chambercourt/locale/el/LC_MESSAGES/chambercourt.mo +0 -0
  24. chambercourt-0.9.0/chambercourt/locale/fr/LC_MESSAGES/chambercourt.mo +0 -0
  25. chambercourt-0.9.0/chambercourt/ptext.py +1196 -0
  26. chambercourt-0.9.0/chambercourt/screen.py +66 -0
  27. chambercourt-0.9.0/chambercourt/title.png +0 -0
  28. chambercourt-0.9.0/chambercourt/warnings_util.py +29 -0
  29. chambercourt-0.9.0/pyproject.toml +93 -0
  30. chambercourt-0.9.0/setup.cfg +4 -0
@@ -0,0 +1,83 @@
1
+ Metadata-Version: 2.1
2
+ Name: ChamberCourt
3
+ Version: 0.9.0
4
+ Summary: Simple 2D grid game framework based on PyGame
5
+ Author-email: Reuben Thomas <rrt@sc3d.org>
6
+ License: GPL v3 or later
7
+ Project-URL: Homepage, https://github.com/rrthomas/chambercourt
8
+ Classifier: Environment :: X11 Applications
9
+ Classifier: Environment :: MacOS X
10
+ Classifier: Environment :: Win32 (MS Windows)
11
+ Classifier: Topic :: Games/Entertainment
12
+ Classifier: Programming Language :: Python :: 3
13
+ Requires-Python: >=3.11
14
+ Description-Content-Type: text/markdown
15
+ Requires-Dist: aenum
16
+ Requires-Dist: i18nparse
17
+ Requires-Dist: importlib-resources>=5.10
18
+ Requires-Dist: platformdirs
19
+ Requires-Dist: pygame>=2.0.0
20
+ Requires-Dist: pyscroll
21
+ Requires-Dist: pytmx
22
+
23
+ # ChamberCourt
24
+
25
+ https://github.com/rrthomas/chambercourt
26
+
27
+ by Reuben Thomas <rrt@sc3d.org>
28
+
29
+ ChamberCourt is a framework for simple 2-D grid-based games, based on
30
+ [PyGame](https://pygame.org).
31
+
32
+ It is only intended for use by the author, mostly to resurrect a bunch of
33
+ old games he wrote a long time ago. As such, there is no documentation other
34
+ than the code. However, if anyone would like to help make it usable by
35
+ others, I would be delighted to hear from them. I would prefer to keep it as
36
+ simple as possible; however there is room for improvement in many areas. For
37
+ example, it would be nice if the games could run on the web (I have
38
+ experimented with [pygbag](https://github.com/pygame-web/pygbag/), but I
39
+ didn’t get very far yet), and some basic functionality would be nice such as
40
+ a UI for rebinding keys.
41
+
42
+ The package is named after the central courtyard of my school, Winchester
43
+ College, because I wrote this package first while resurrecting a game,
44
+ [WinColl](https://github.com/rrthomas/wincoll), named after the school.
45
+
46
+
47
+ ## Installation and use
48
+
49
+ Install with `pip`: `pip install chambercourt`.
50
+
51
+ A demonstration front-end is available, called `chambercourt`. You can run
52
+ it directly from a Git checkout with `PYTHONPATH=. python -m chambercourt`.
53
+
54
+
55
+ ## Creating and editing levels
56
+
57
+ Levels are created and edited in [Tiled](https://www.mapeditor.org/). All
58
+ in-game graphics and sounds are stored in the levels directory by
59
+ convention. A demonstration level is in `chambercourt/levels`.
60
+
61
+ Some notes about level design:
62
+
63
+ + A set of levels is numbered according to the lexical order of their file
64
+ names.
65
+ + Levels need exactly one start position, given by placing the hero.
66
+
67
+
68
+ ## Copyright and Disclaimer
69
+
70
+ ChamberCourt is distributed under the GNU Public License version 3, or, at
71
+ your option, any later version. See the file COPYING.
72
+
73
+ THIS PROGRAM IS PROVIDED AS IS, WITH NO WARRANTY. USE IS AT THE USER'S RISK.
74
+ Except for the files mentioned below, the package is copyright Reuben
75
+ Thomas.
76
+
77
+ The font “Acorn Mode 1”, which is based on the design of Acorn computers’
78
+ system font, is by p1.mark and Reuben Thomas and licensed under CC BY-SA
79
+ 3.0.
80
+
81
+ The death buzzer sound effect was adapted from
82
+ [Buzzer sounds (Wrong answer/Error) by Breviceps](https://freesound.org/s/493163)
83
+ under CC 0.
@@ -0,0 +1,28 @@
1
+ README.md
2
+ pyproject.toml
3
+ ChamberCourt.egg-info/PKG-INFO
4
+ ChamberCourt.egg-info/SOURCES.txt
5
+ ChamberCourt.egg-info/dependency_links.txt
6
+ ChamberCourt.egg-info/entry_points.txt
7
+ ChamberCourt.egg-info/requires.txt
8
+ ChamberCourt.egg-info/top_level.txt
9
+ chambercourt/__init__.py
10
+ chambercourt/__main__.py
11
+ chambercourt/acorn-mode-1.ttf
12
+ chambercourt/app-icon.png
13
+ chambercourt/event.py
14
+ chambercourt/game.py
15
+ chambercourt/langdetect.py
16
+ chambercourt/ptext.py
17
+ chambercourt/screen.py
18
+ chambercourt/title.png
19
+ chambercourt/warnings_util.py
20
+ chambercourt/levels/01 Plain map.tmx
21
+ chambercourt/levels/Brick.png
22
+ chambercourt/levels/Die.png
23
+ chambercourt/levels/Die.wav
24
+ chambercourt/levels/Gap.png
25
+ chambercourt/levels/Hero.png
26
+ chambercourt/levels/Tileset.tsx
27
+ chambercourt/locale/el/LC_MESSAGES/chambercourt.mo
28
+ chambercourt/locale/fr/LC_MESSAGES/chambercourt.mo
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ chambercourt = chambercourt:main
@@ -0,0 +1,7 @@
1
+ aenum
2
+ i18nparse
3
+ importlib-resources>=5.10
4
+ platformdirs
5
+ pygame>=2.0.0
6
+ pyscroll
7
+ pytmx
@@ -0,0 +1 @@
1
+ chambercourt
@@ -0,0 +1,83 @@
1
+ Metadata-Version: 2.1
2
+ Name: ChamberCourt
3
+ Version: 0.9.0
4
+ Summary: Simple 2D grid game framework based on PyGame
5
+ Author-email: Reuben Thomas <rrt@sc3d.org>
6
+ License: GPL v3 or later
7
+ Project-URL: Homepage, https://github.com/rrthomas/chambercourt
8
+ Classifier: Environment :: X11 Applications
9
+ Classifier: Environment :: MacOS X
10
+ Classifier: Environment :: Win32 (MS Windows)
11
+ Classifier: Topic :: Games/Entertainment
12
+ Classifier: Programming Language :: Python :: 3
13
+ Requires-Python: >=3.11
14
+ Description-Content-Type: text/markdown
15
+ Requires-Dist: aenum
16
+ Requires-Dist: i18nparse
17
+ Requires-Dist: importlib-resources>=5.10
18
+ Requires-Dist: platformdirs
19
+ Requires-Dist: pygame>=2.0.0
20
+ Requires-Dist: pyscroll
21
+ Requires-Dist: pytmx
22
+
23
+ # ChamberCourt
24
+
25
+ https://github.com/rrthomas/chambercourt
26
+
27
+ by Reuben Thomas <rrt@sc3d.org>
28
+
29
+ ChamberCourt is a framework for simple 2-D grid-based games, based on
30
+ [PyGame](https://pygame.org).
31
+
32
+ It is only intended for use by the author, mostly to resurrect a bunch of
33
+ old games he wrote a long time ago. As such, there is no documentation other
34
+ than the code. However, if anyone would like to help make it usable by
35
+ others, I would be delighted to hear from them. I would prefer to keep it as
36
+ simple as possible; however there is room for improvement in many areas. For
37
+ example, it would be nice if the games could run on the web (I have
38
+ experimented with [pygbag](https://github.com/pygame-web/pygbag/), but I
39
+ didn’t get very far yet), and some basic functionality would be nice such as
40
+ a UI for rebinding keys.
41
+
42
+ The package is named after the central courtyard of my school, Winchester
43
+ College, because I wrote this package first while resurrecting a game,
44
+ [WinColl](https://github.com/rrthomas/wincoll), named after the school.
45
+
46
+
47
+ ## Installation and use
48
+
49
+ Install with `pip`: `pip install chambercourt`.
50
+
51
+ A demonstration front-end is available, called `chambercourt`. You can run
52
+ it directly from a Git checkout with `PYTHONPATH=. python -m chambercourt`.
53
+
54
+
55
+ ## Creating and editing levels
56
+
57
+ Levels are created and edited in [Tiled](https://www.mapeditor.org/). All
58
+ in-game graphics and sounds are stored in the levels directory by
59
+ convention. A demonstration level is in `chambercourt/levels`.
60
+
61
+ Some notes about level design:
62
+
63
+ + A set of levels is numbered according to the lexical order of their file
64
+ names.
65
+ + Levels need exactly one start position, given by placing the hero.
66
+
67
+
68
+ ## Copyright and Disclaimer
69
+
70
+ ChamberCourt is distributed under the GNU Public License version 3, or, at
71
+ your option, any later version. See the file COPYING.
72
+
73
+ THIS PROGRAM IS PROVIDED AS IS, WITH NO WARRANTY. USE IS AT THE USER'S RISK.
74
+ Except for the files mentioned below, the package is copyright Reuben
75
+ Thomas.
76
+
77
+ The font “Acorn Mode 1”, which is based on the design of Acorn computers’
78
+ system font, is by p1.mark and Reuben Thomas and licensed under CC BY-SA
79
+ 3.0.
80
+
81
+ The death buzzer sound effect was adapted from
82
+ [Buzzer sounds (Wrong answer/Error) by Breviceps](https://freesound.org/s/493163)
83
+ under CC 0.
@@ -0,0 +1,61 @@
1
+ # ChamberCourt
2
+
3
+ https://github.com/rrthomas/chambercourt
4
+
5
+ by Reuben Thomas <rrt@sc3d.org>
6
+
7
+ ChamberCourt is a framework for simple 2-D grid-based games, based on
8
+ [PyGame](https://pygame.org).
9
+
10
+ It is only intended for use by the author, mostly to resurrect a bunch of
11
+ old games he wrote a long time ago. As such, there is no documentation other
12
+ than the code. However, if anyone would like to help make it usable by
13
+ others, I would be delighted to hear from them. I would prefer to keep it as
14
+ simple as possible; however there is room for improvement in many areas. For
15
+ example, it would be nice if the games could run on the web (I have
16
+ experimented with [pygbag](https://github.com/pygame-web/pygbag/), but I
17
+ didn’t get very far yet), and some basic functionality would be nice such as
18
+ a UI for rebinding keys.
19
+
20
+ The package is named after the central courtyard of my school, Winchester
21
+ College, because I wrote this package first while resurrecting a game,
22
+ [WinColl](https://github.com/rrthomas/wincoll), named after the school.
23
+
24
+
25
+ ## Installation and use
26
+
27
+ Install with `pip`: `pip install chambercourt`.
28
+
29
+ A demonstration front-end is available, called `chambercourt`. You can run
30
+ it directly from a Git checkout with `PYTHONPATH=. python -m chambercourt`.
31
+
32
+
33
+ ## Creating and editing levels
34
+
35
+ Levels are created and edited in [Tiled](https://www.mapeditor.org/). All
36
+ in-game graphics and sounds are stored in the levels directory by
37
+ convention. A demonstration level is in `chambercourt/levels`.
38
+
39
+ Some notes about level design:
40
+
41
+ + A set of levels is numbered according to the lexical order of their file
42
+ names.
43
+ + Levels need exactly one start position, given by placing the hero.
44
+
45
+
46
+ ## Copyright and Disclaimer
47
+
48
+ ChamberCourt is distributed under the GNU Public License version 3, or, at
49
+ your option, any later version. See the file COPYING.
50
+
51
+ THIS PROGRAM IS PROVIDED AS IS, WITH NO WARRANTY. USE IS AT THE USER'S RISK.
52
+ Except for the files mentioned below, the package is copyright Reuben
53
+ Thomas.
54
+
55
+ The font “Acorn Mode 1”, which is based on the design of Acorn computers’
56
+ system font, is by p1.mark and Reuben Thomas and licensed under CC BY-SA
57
+ 3.0.
58
+
59
+ The death buzzer sound effect was adapted from
60
+ [Buzzer sounds (Wrong answer/Error) by Breviceps](https://freesound.org/s/493163)
61
+ under CC 0.
@@ -0,0 +1,18 @@
1
+ # © Reuben Thomas <rrt@sc3d.org> 2024
2
+ # Released under the GPL version 3, or (at your option) any later version.
3
+
4
+ import re
5
+ import sys
6
+ from typing import List
7
+
8
+ from . import game
9
+ from .game import app_main
10
+
11
+
12
+ def main(argv: List[str] = sys.argv[1:]) -> None:
13
+ app_main(argv, game, game.Game)
14
+
15
+
16
+ if __name__ == "__main__":
17
+ sys.argv[0] = re.sub(r"__init__.py$", __package__, sys.argv[0])
18
+ main()
@@ -0,0 +1,10 @@
1
+ # © Reuben Thomas <rrt@sc3d.org> 2024
2
+ # Released under the GPL version 3, or (at your option) any later version.
3
+
4
+ import re
5
+ import sys
6
+
7
+ from chambercourt import main
8
+
9
+ sys.argv[0] = re.sub(r"__main__.py$", __package__, sys.argv[0])
10
+ main()
@@ -0,0 +1,29 @@
1
+ # © Reuben Thomas <rrt@sc3d.org> 2024
2
+ # Released under the GPL version 3, or (at your option) any later version.
3
+
4
+ import os
5
+ import sys
6
+ import warnings
7
+ from typing import NoReturn
8
+
9
+
10
+ # Import pygame, suppressing extra messages that it prints on startup.
11
+ os.environ["PYGAME_HIDE_SUPPORT_PROMPT"] = "1"
12
+ with warnings.catch_warnings():
13
+ warnings.simplefilter("ignore")
14
+ import pygame
15
+
16
+
17
+ def quit_game() -> NoReturn:
18
+ pygame.quit()
19
+ sys.exit()
20
+
21
+
22
+ def handle_quit_event() -> None:
23
+ if len(pygame.event.get(pygame.QUIT)) > 0:
24
+ quit_game()
25
+
26
+
27
+ def handle_global_keys(event: pygame.event.Event) -> None:
28
+ if event.key == pygame.K_F11:
29
+ pygame.display.toggle_fullscreen()