xpgzero 1.2.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.
Files changed (182) hide show
  1. xpgzero-1.2.3/AUTHORS +2 -0
  2. xpgzero-1.2.3/COPYING +165 -0
  3. xpgzero-1.2.3/MANIFEST.in +5 -0
  4. xpgzero-1.2.3/PKG-INFO +91 -0
  5. xpgzero-1.2.3/README.rst +69 -0
  6. xpgzero-1.2.3/doc/_static/actor/alien_center.png +0 -0
  7. xpgzero-1.2.3/doc/_static/actor/alien_midbottom.png +0 -0
  8. xpgzero-1.2.3/doc/_static/actor/anchor_points.png +0 -0
  9. xpgzero-1.2.3/doc/_static/alien.png +0 -0
  10. xpgzero-1.2.3/doc/_static/alien_hurt.png +0 -0
  11. xpgzero-1.2.3/doc/_static/eep.wav +0 -0
  12. xpgzero-1.2.3/doc/_static/grabs/circle.png +0 -0
  13. xpgzero-1.2.3/doc/_static/pyweek.png +0 -0
  14. xpgzero-1.2.3/doc/_static/scratch/flappybird-bird-space.png +0 -0
  15. xpgzero-1.2.3/doc/_static/scratch/flappybird-bird-start.png +0 -0
  16. xpgzero-1.2.3/doc/_static/scratch/flappybird-bottom-start.png +0 -0
  17. xpgzero-1.2.3/doc/_static/scratch/flappybird-stage.png +0 -0
  18. xpgzero-1.2.3/doc/_static/scratch/flappybird-top-start.png +0 -0
  19. xpgzero-1.2.3/doc/builtins.rst +740 -0
  20. xpgzero-1.2.3/doc/changelog.rst +103 -0
  21. xpgzero-1.2.3/doc/contributing.rst +166 -0
  22. xpgzero-1.2.3/doc/from-scratch.rst +271 -0
  23. xpgzero-1.2.3/doc/hooks.rst +354 -0
  24. xpgzero-1.2.3/doc/ide-mode.rst +44 -0
  25. xpgzero-1.2.3/doc/index.rst +76 -0
  26. xpgzero-1.2.3/doc/installation.rst +19 -0
  27. xpgzero-1.2.3/doc/introduction.rst +273 -0
  28. xpgzero-1.2.3/doc/learn-programming.rst +178 -0
  29. xpgzero-1.2.3/doc/other-libs.rst +81 -0
  30. xpgzero-1.2.3/doc/principles.rst +83 -0
  31. xpgzero-1.2.3/doc/ptext.rst +297 -0
  32. xpgzero-1.2.3/doc/roadmap.rst +77 -0
  33. xpgzero-1.2.3/examples/asteroids/actors.py +98 -0
  34. xpgzero-1.2.3/examples/asteroids/assets/sounds/asteroid_explosion.bfxrsound +1 -0
  35. xpgzero-1.2.3/examples/asteroids/assets/sounds/fire.bfxrsound +1 -0
  36. xpgzero-1.2.3/examples/asteroids/assets/sounds/player_explosion.bfxrsound +1 -0
  37. xpgzero-1.2.3/examples/asteroids/images/asteroid1-1.png +0 -0
  38. xpgzero-1.2.3/examples/asteroids/images/asteroid1-2.png +0 -0
  39. xpgzero-1.2.3/examples/asteroids/images/asteroid1-3.png +0 -0
  40. xpgzero-1.2.3/examples/asteroids/images/asteroid2-1.png +0 -0
  41. xpgzero-1.2.3/examples/asteroids/images/asteroid2-2.png +0 -0
  42. xpgzero-1.2.3/examples/asteroids/images/asteroid2-3.png +0 -0
  43. xpgzero-1.2.3/examples/asteroids/images/asteroid3-1.png +0 -0
  44. xpgzero-1.2.3/examples/asteroids/images/asteroid3-2.png +0 -0
  45. xpgzero-1.2.3/examples/asteroids/images/asteroid3-3.png +0 -0
  46. xpgzero-1.2.3/examples/asteroids/images/bullet.png +0 -0
  47. xpgzero-1.2.3/examples/asteroids/images/player.png +0 -0
  48. xpgzero-1.2.3/examples/asteroids/main.py +232 -0
  49. xpgzero-1.2.3/examples/asteroids/sounds/asteroid_explosion.wav +0 -0
  50. xpgzero-1.2.3/examples/asteroids/sounds/fire.wav +0 -0
  51. xpgzero-1.2.3/examples/asteroids/sounds/player_explosion.wav +0 -0
  52. xpgzero-1.2.3/examples/asteroids/space.py +25 -0
  53. xpgzero-1.2.3/examples/basic/animated_rotation.py +124 -0
  54. xpgzero-1.2.3/examples/basic/bounce.py +50 -0
  55. xpgzero-1.2.3/examples/basic/boxes.py +22 -0
  56. xpgzero-1.2.3/examples/basic/circle.py +4 -0
  57. xpgzero-1.2.3/examples/basic/clicks.py +2 -0
  58. xpgzero-1.2.3/examples/basic/demo1.py +21 -0
  59. xpgzero-1.2.3/examples/basic/demo2.py +25 -0
  60. xpgzero-1.2.3/examples/basic/demo3.py +43 -0
  61. xpgzero-1.2.3/examples/basic/demo4.py +35 -0
  62. xpgzero-1.2.3/examples/basic/fonts/Boogaloo/OFL.txt +93 -0
  63. xpgzero-1.2.3/examples/basic/fonts/Bubblegum_Sans/OFL.txt +94 -0
  64. xpgzero-1.2.3/examples/basic/fonts/Cherry_Cream_Soda/LICENSE.txt +202 -0
  65. xpgzero-1.2.3/examples/basic/fonts/Roboto_Condensed/LICENSE.txt +202 -0
  66. xpgzero-1.2.3/examples/basic/fonts/boogaloo.ttf +0 -0
  67. xpgzero-1.2.3/examples/basic/fonts/bubblegum_sans.ttf +0 -0
  68. xpgzero-1.2.3/examples/basic/fonts/cherrycreamsoda.ttf +0 -0
  69. xpgzero-1.2.3/examples/basic/fonts/roboto_condensed.ttf +0 -0
  70. xpgzero-1.2.3/examples/basic/images/alien.png +0 -0
  71. xpgzero-1.2.3/examples/basic/images/alien_hurt.png +0 -0
  72. xpgzero-1.2.3/examples/basic/images/block.png +0 -0
  73. xpgzero-1.2.3/examples/basic/images/ship.png +0 -0
  74. xpgzero-1.2.3/examples/basic/music/handel_mp3.mp3 +0 -0
  75. xpgzero-1.2.3/examples/basic/music/handel_ogg.ogg +0 -0
  76. xpgzero-1.2.3/examples/basic/music.py +35 -0
  77. xpgzero-1.2.3/examples/basic/ptext.py +160 -0
  78. xpgzero-1.2.3/examples/basic/rotating.py +12 -0
  79. xpgzero-1.2.3/examples/basic/sounds/eep.wav +0 -0
  80. xpgzero-1.2.3/examples/basic/tones.py +177 -0
  81. xpgzero-1.2.3/examples/flappybird/Flappy Bird.sb +0 -0
  82. xpgzero-1.2.3/examples/flappybird/README.txt +5 -0
  83. xpgzero-1.2.3/examples/flappybird/flappybird.py +85 -0
  84. xpgzero-1.2.3/examples/flappybird/images/background.png +0 -0
  85. xpgzero-1.2.3/examples/flappybird/images/bird0.png +0 -0
  86. xpgzero-1.2.3/examples/flappybird/images/bird1.png +0 -0
  87. xpgzero-1.2.3/examples/flappybird/images/bird2.png +0 -0
  88. xpgzero-1.2.3/examples/flappybird/images/birddead.png +0 -0
  89. xpgzero-1.2.3/examples/flappybird/images/bottom.png +0 -0
  90. xpgzero-1.2.3/examples/flappybird/images/top.png +0 -0
  91. xpgzero-1.2.3/examples/lander/lander.py +300 -0
  92. xpgzero-1.2.3/examples/memory/LICENCE +21 -0
  93. xpgzero-1.2.3/examples/memory/README.md +131 -0
  94. xpgzero-1.2.3/examples/memory/images/card_back.png +0 -0
  95. xpgzero-1.2.3/examples/memory/images/checkmark.bmp +0 -0
  96. xpgzero-1.2.3/examples/memory/images/im1.bmp +0 -0
  97. xpgzero-1.2.3/examples/memory/images/im2.bmp +0 -0
  98. xpgzero-1.2.3/examples/memory/images/im3.bmp +0 -0
  99. xpgzero-1.2.3/examples/memory/images/im4.bmp +0 -0
  100. xpgzero-1.2.3/examples/memory/images/im5.bmp +0 -0
  101. xpgzero-1.2.3/examples/memory/images/im6.bmp +0 -0
  102. xpgzero-1.2.3/examples/memory/images/steve.bmp +0 -0
  103. xpgzero-1.2.3/examples/memory/memory.py +87 -0
  104. xpgzero-1.2.3/examples/memory/source/cards.svgz +0 -0
  105. xpgzero-1.2.3/examples/mines/fonts/lcd_solid.ttf +0 -0
  106. xpgzero-1.2.3/examples/mines/images/blank.png +0 -0
  107. xpgzero-1.2.3/examples/mines/images/cover.png +0 -0
  108. xpgzero-1.2.3/examples/mines/images/eight.png +0 -0
  109. xpgzero-1.2.3/examples/mines/images/five.png +0 -0
  110. xpgzero-1.2.3/examples/mines/images/flag.png +0 -0
  111. xpgzero-1.2.3/examples/mines/images/four.png +0 -0
  112. xpgzero-1.2.3/examples/mines/images/height.png +0 -0
  113. xpgzero-1.2.3/examples/mines/images/left-pressed.png +0 -0
  114. xpgzero-1.2.3/examples/mines/images/left-raised.png +0 -0
  115. xpgzero-1.2.3/examples/mines/images/mine.png +0 -0
  116. xpgzero-1.2.3/examples/mines/images/mines.png +0 -0
  117. xpgzero-1.2.3/examples/mines/images/next-pressed.png +0 -0
  118. xpgzero-1.2.3/examples/mines/images/next-raised.png +0 -0
  119. xpgzero-1.2.3/examples/mines/images/one.png +0 -0
  120. xpgzero-1.2.3/examples/mines/images/question.png +0 -0
  121. xpgzero-1.2.3/examples/mines/images/red.png +0 -0
  122. xpgzero-1.2.3/examples/mines/images/right-pressed.png +0 -0
  123. xpgzero-1.2.3/examples/mines/images/right-raised.png +0 -0
  124. xpgzero-1.2.3/examples/mines/images/seven.png +0 -0
  125. xpgzero-1.2.3/examples/mines/images/six.png +0 -0
  126. xpgzero-1.2.3/examples/mines/images/three.png +0 -0
  127. xpgzero-1.2.3/examples/mines/images/two.png +0 -0
  128. xpgzero-1.2.3/examples/mines/images/width.png +0 -0
  129. xpgzero-1.2.3/examples/mines/mines.py +143 -0
  130. xpgzero-1.2.3/examples/pong/pong.py +297 -0
  131. xpgzero-1.2.3/examples/snake/images/apple.png +0 -0
  132. xpgzero-1.2.3/examples/snake/images/snake_corner.png +0 -0
  133. xpgzero-1.2.3/examples/snake/images/snake_head.png +0 -0
  134. xpgzero-1.2.3/examples/snake/images/snake_straight.png +0 -0
  135. xpgzero-1.2.3/examples/snake/images/snake_tail.png +0 -0
  136. xpgzero-1.2.3/examples/snake/snake.py +256 -0
  137. xpgzero-1.2.3/examples/snake/source_art/apple.svg +93 -0
  138. xpgzero-1.2.3/examples/snake/source_art/snake.svg +255 -0
  139. xpgzero-1.2.3/examples/tetra_puzzle/README/preview.png +0 -0
  140. xpgzero-1.2.3/examples/tetra_puzzle/main.py +918 -0
  141. xpgzero-1.2.3/examples/tetra_puzzle/music/HHavok-main.license.txt +6 -0
  142. xpgzero-1.2.3/examples/tetra_puzzle/music/hhavok-main.ogg +0 -0
  143. xpgzero-1.2.3/examples/tetra_puzzle/readme.rst +22 -0
  144. xpgzero-1.2.3/pgzero/__init__.py +8 -0
  145. xpgzero-1.2.3/pgzero/__main__.py +3 -0
  146. xpgzero-1.2.3/pgzero/actor.py +250 -0
  147. xpgzero-1.2.3/pgzero/animation.py +216 -0
  148. xpgzero-1.2.3/pgzero/builtins.py +14 -0
  149. xpgzero-1.2.3/pgzero/clock.py +182 -0
  150. xpgzero-1.2.3/pgzero/constants.py +33 -0
  151. xpgzero-1.2.3/pgzero/data/icon.png +0 -0
  152. xpgzero-1.2.3/pgzero/data/joypad.png +0 -0
  153. xpgzero-1.2.3/pgzero/game.py +258 -0
  154. xpgzero-1.2.3/pgzero/keyboard.py +60 -0
  155. xpgzero-1.2.3/pgzero/loaders.py +256 -0
  156. xpgzero-1.2.3/pgzero/music.py +110 -0
  157. xpgzero-1.2.3/pgzero/ptext.py +495 -0
  158. xpgzero-1.2.3/pgzero/rect.py +498 -0
  159. xpgzero-1.2.3/pgzero/runner.py +133 -0
  160. xpgzero-1.2.3/pgzero/screen.py +240 -0
  161. xpgzero-1.2.3/pgzero/soundfmt.py +109 -0
  162. xpgzero-1.2.3/pgzero/spellcheck.py +177 -0
  163. xpgzero-1.2.3/pgzero/tone.py +191 -0
  164. xpgzero-1.2.3/pgzrun.py +31 -0
  165. xpgzero-1.2.3/pyproject.toml +41 -0
  166. xpgzero-1.2.3/setup.cfg +4 -0
  167. xpgzero-1.2.3/test/test_actor.py +109 -0
  168. xpgzero-1.2.3/test/test_animation.py +140 -0
  169. xpgzero-1.2.3/test/test_event_dispatch.py +40 -0
  170. xpgzero-1.2.3/test/test_keyboard.py +90 -0
  171. xpgzero-1.2.3/test/test_osx.py +17 -0
  172. xpgzero-1.2.3/test/test_screen.py +68 -0
  173. xpgzero-1.2.3/test/test_sound_formats.py +61 -0
  174. xpgzero-1.2.3/test/test_spellcheck.py +127 -0
  175. xpgzero-1.2.3/test/test_tone.py +47 -0
  176. xpgzero-1.2.3/test/test_transform_anchor.py +41 -0
  177. xpgzero-1.2.3/xpgzero.egg-info/PKG-INFO +91 -0
  178. xpgzero-1.2.3/xpgzero.egg-info/SOURCES.txt +180 -0
  179. xpgzero-1.2.3/xpgzero.egg-info/dependency_links.txt +1 -0
  180. xpgzero-1.2.3/xpgzero.egg-info/entry_points.txt +2 -0
  181. xpgzero-1.2.3/xpgzero.egg-info/requires.txt +7 -0
  182. xpgzero-1.2.3/xpgzero.egg-info/top_level.txt +2 -0
xpgzero-1.2.3/AUTHORS ADDED
@@ -0,0 +1,2 @@
1
+ Daniel Pope <mauve@mauveweb.co.uk>
2
+ Richard Jones <richard@pyweek.org>
xpgzero-1.2.3/COPYING ADDED
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.
@@ -0,0 +1,5 @@
1
+ include README.txt COPYING AUTHORS
2
+ recursive-include doc *.rst *.png *.wav
3
+ recursive-include pgzero/data *.png
4
+ recursive-include examples *
5
+ prune doc/_build
xpgzero-1.2.3/PKG-INFO ADDED
@@ -0,0 +1,91 @@
1
+ Metadata-Version: 2.4
2
+ Name: xpgzero
3
+ Version: 1.2.3
4
+ Summary: A zero-boilerplate 2D games framework
5
+ Author-email: Daniel Pope <mauve@mauveweb.co.uk>
6
+ Project-URL: Homepage, http://pypi.python.org/pypi/xpgzero
7
+ Classifier: Development Status :: 5 - Production/Stable
8
+ Classifier: Intended Audience :: Education
9
+ Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
10
+ Classifier: Programming Language :: Python :: 3 :: Only
11
+ Classifier: Topic :: Education
12
+ Classifier: Topic :: Games/Entertainment
13
+ Requires-Python: >=3.7
14
+ Description-Content-Type: text/x-rst
15
+ License-File: COPYING
16
+ License-File: AUTHORS
17
+ Requires-Dist: pygame<3.0,>=2.0
18
+ Requires-Dist: numpy
19
+ Provides-Extra: legacy
20
+ Requires-Dist: enum34; python_version < "3.4" and extra == "legacy"
21
+ Dynamic: license-file
22
+
23
+ Pygame Zero
24
+ ===========
25
+
26
+ A zero-boilerplate games programming framework for Python 3, based on Pygame.
27
+
28
+ Some examples
29
+ -------------
30
+
31
+ Pygame Zero consists of a runner ``pgzrun`` that will run a Pygame Zero script
32
+ with a full game loop and a range of useful builtins.
33
+
34
+ Here's some of the neat stuff you can do. Note that each of these is a
35
+ self-contained script. There's no need for any imports or anything else in the
36
+ file.
37
+
38
+ Draw graphics (assuming there's a file like ``images/dog.png`` or
39
+ ``images/dog.jpg``)::
40
+
41
+ def draw():
42
+ screen.clear()
43
+ screen.blit('dog', (10, 50))
44
+
45
+ Play the sound ``sounds/eep.wav`` when you click the mouse::
46
+
47
+ def on_mouse_down():
48
+ sounds.eep.play()
49
+
50
+ Draw an "actor" object (with the sprite ``images/alien.png``) that moves across
51
+ the screen::
52
+
53
+ alien = Actor('alien')
54
+ alien.pos = 10, 10
55
+
56
+ def draw():
57
+ screen.clear()
58
+ alien.draw()
59
+
60
+ def update():
61
+ alien.x += 1
62
+ if alien.left > WIDTH:
63
+ alien.right = 0
64
+
65
+ Installation
66
+ ------------
67
+
68
+ See `installation instructions`__.
69
+
70
+ .. __: http://pygame-zero.readthedocs.org/en/latest/installation.html
71
+
72
+
73
+ Documentation
74
+ -------------
75
+
76
+ The full documentation is at http://pygame-zero.readthedocs.org/.
77
+
78
+ Read the tutorial at http://pygame-zero.readthedocs.org/en/latest/introduction.html
79
+ for a taste of the other things that Pygame Zero can do.
80
+
81
+ Contributing
82
+ ------------
83
+
84
+ The project is hosted on Github:
85
+
86
+ https://github.com/lordmauve/pgzero
87
+
88
+ If you want to help out with the development of Pygame Zero, you can find some
89
+ instructions on setting up a development version in the docs:
90
+
91
+ http://pygame-zero.readthedocs.org/en/latest/contributing.html
@@ -0,0 +1,69 @@
1
+ Pygame Zero
2
+ ===========
3
+
4
+ A zero-boilerplate games programming framework for Python 3, based on Pygame.
5
+
6
+ Some examples
7
+ -------------
8
+
9
+ Pygame Zero consists of a runner ``pgzrun`` that will run a Pygame Zero script
10
+ with a full game loop and a range of useful builtins.
11
+
12
+ Here's some of the neat stuff you can do. Note that each of these is a
13
+ self-contained script. There's no need for any imports or anything else in the
14
+ file.
15
+
16
+ Draw graphics (assuming there's a file like ``images/dog.png`` or
17
+ ``images/dog.jpg``)::
18
+
19
+ def draw():
20
+ screen.clear()
21
+ screen.blit('dog', (10, 50))
22
+
23
+ Play the sound ``sounds/eep.wav`` when you click the mouse::
24
+
25
+ def on_mouse_down():
26
+ sounds.eep.play()
27
+
28
+ Draw an "actor" object (with the sprite ``images/alien.png``) that moves across
29
+ the screen::
30
+
31
+ alien = Actor('alien')
32
+ alien.pos = 10, 10
33
+
34
+ def draw():
35
+ screen.clear()
36
+ alien.draw()
37
+
38
+ def update():
39
+ alien.x += 1
40
+ if alien.left > WIDTH:
41
+ alien.right = 0
42
+
43
+ Installation
44
+ ------------
45
+
46
+ See `installation instructions`__.
47
+
48
+ .. __: http://pygame-zero.readthedocs.org/en/latest/installation.html
49
+
50
+
51
+ Documentation
52
+ -------------
53
+
54
+ The full documentation is at http://pygame-zero.readthedocs.org/.
55
+
56
+ Read the tutorial at http://pygame-zero.readthedocs.org/en/latest/introduction.html
57
+ for a taste of the other things that Pygame Zero can do.
58
+
59
+ Contributing
60
+ ------------
61
+
62
+ The project is hosted on Github:
63
+
64
+ https://github.com/lordmauve/pgzero
65
+
66
+ If you want to help out with the development of Pygame Zero, you can find some
67
+ instructions on setting up a development version in the docs:
68
+
69
+ http://pygame-zero.readthedocs.org/en/latest/contributing.html
Binary file
Binary file
Binary file
Binary file