diff --git a/docs/_static/arcade.png b/docs/_static/arcade.png deleted file mode 100644 index 3c9b90c..0000000 Binary files a/docs/_static/arcade.png and /dev/null differ diff --git a/docs/_static/arcade.webp b/docs/_static/arcade.webp new file mode 100644 index 0000000..c6dc1a5 Binary files /dev/null and b/docs/_static/arcade.webp differ diff --git a/docs/_static/cocos2d.png b/docs/_static/cocos2d.png deleted file mode 100644 index 433a152..0000000 Binary files a/docs/_static/cocos2d.png and /dev/null differ diff --git a/docs/_static/cocos2d.webp b/docs/_static/cocos2d.webp new file mode 100644 index 0000000..7c3a795 Binary files /dev/null and b/docs/_static/cocos2d.webp differ diff --git a/docs/_static/custom.css b/docs/_static/custom.css index a7d5a50..a0137ea 100644 --- a/docs/_static/custom.css +++ b/docs/_static/custom.css @@ -1,10 +1,10 @@ @font-face { font-family: RosesAreRed; - src: url(roses-are-ff0000.woff) format('woff'); + src: url(roses-are-ff0000.woff2) format('woff2'); } body { - font-family: Arial, sans-serif; + font-family: arial, helvetica, sans-serif; } @media screen { @@ -13,6 +13,24 @@ body { } } +/* consistent top heading for small screens */ +@media screen and (max-width: 875px) { + h1.logo { + display: block; + position: absolute; + top: 30px; + } + h1.logo a { + color: #004b6b; + font-size: 24px; + line-height: 30px; + } + h1.logo a:after { + content: ' documentation'; + } + .document { padding-top: 44px; } +} + h1, h2, h3 { font-family: RosesAreRed !important; } @@ -23,6 +41,14 @@ h3 a { text-decoration: none; } +/* alabaster theme sets a min-width on .body which breaks layout on _a lot_ of small screens; there is no reason for this */ +div.body { + min-width: auto !important; +} + +/* list-style-position: inside; better except for https://github.com/sphinx-doc/sphinx/issues/2258 */ +ul { margin-left: 1em; } + div.body h1 { font-size: 20pt; margin: 26px 0 1.5em; diff --git a/docs/_static/kivy.png b/docs/_static/kivy.png deleted file mode 100644 index 3f98a5e..0000000 Binary files a/docs/_static/kivy.png and /dev/null differ diff --git a/docs/_static/kivy.webp b/docs/_static/kivy.webp new file mode 100644 index 0000000..4560032 Binary files /dev/null and b/docs/_static/kivy.webp differ diff --git a/docs/_static/panda3d.png b/docs/_static/panda3d.png deleted file mode 100644 index 1f2ad57..0000000 Binary files a/docs/_static/panda3d.png and /dev/null differ diff --git a/docs/_static/panda3d.webp b/docs/_static/panda3d.webp new file mode 100644 index 0000000..6313e02 Binary files /dev/null and b/docs/_static/panda3d.webp differ diff --git a/docs/_static/pgzero.png b/docs/_static/pgzero.png deleted file mode 100644 index 27ce656..0000000 Binary files a/docs/_static/pgzero.png and /dev/null differ diff --git a/docs/_static/pgzero.webp b/docs/_static/pgzero.webp new file mode 100644 index 0000000..57a5800 Binary files /dev/null and b/docs/_static/pgzero.webp differ diff --git a/docs/_static/pursuedpybear.png b/docs/_static/pursuedpybear.png deleted file mode 100644 index 8d9fd81..0000000 Binary files a/docs/_static/pursuedpybear.png and /dev/null differ diff --git a/docs/_static/pursuedpybear.webp b/docs/_static/pursuedpybear.webp new file mode 100644 index 0000000..ccfaf43 Binary files /dev/null and b/docs/_static/pursuedpybear.webp differ diff --git a/docs/_static/pygame.png b/docs/_static/pygame.png deleted file mode 100644 index 9130383..0000000 Binary files a/docs/_static/pygame.png and /dev/null differ diff --git a/docs/_static/pygame.webp b/docs/_static/pygame.webp new file mode 100644 index 0000000..f67a827 Binary files /dev/null and b/docs/_static/pygame.webp differ diff --git a/docs/_static/pyglet.png b/docs/_static/pyglet.png deleted file mode 100644 index 83986a5..0000000 Binary files a/docs/_static/pyglet.png and /dev/null differ diff --git a/docs/_static/pyglet.webp b/docs/_static/pyglet.webp new file mode 100644 index 0000000..b74cc4f Binary files /dev/null and b/docs/_static/pyglet.webp differ diff --git a/docs/_static/pymunk.png b/docs/_static/pymunk.png deleted file mode 100644 index e15fdb7..0000000 Binary files a/docs/_static/pymunk.png and /dev/null differ diff --git a/docs/_static/pymunk.webp b/docs/_static/pymunk.webp new file mode 100644 index 0000000..9a492e4 Binary files /dev/null and b/docs/_static/pymunk.webp differ diff --git a/docs/_static/python-discord.png b/docs/_static/python-discord.png deleted file mode 100644 index 41fb821..0000000 Binary files a/docs/_static/python-discord.png and /dev/null differ diff --git a/docs/_static/python-discord.webp b/docs/_static/python-discord.webp new file mode 100644 index 0000000..36c60e1 Binary files /dev/null and b/docs/_static/python-discord.webp differ diff --git a/docs/_static/pyweek-upload.py b/docs/_static/pyweek-upload.py new file mode 100644 index 0000000..f31485d --- /dev/null +++ b/docs/_static/pyweek-upload.py @@ -0,0 +1,198 @@ +''' +Upload script specifically engineered for the PyWeek challenge. + +Handles authentication and gives upload progress feedback. +''' +import sys, os, http.client, io, socket, time, getopt + +class Upload: + def __init__(self, filename): + self.filename = filename + +boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254' +sep_boundary = '\n--' + boundary +end_boundary = sep_boundary + '--' + +def mimeEncode(data, sep_boundary=sep_boundary, end_boundary=end_boundary): + '''Take the mapping of data and construct the body of a + multipart/form-data message with it using the indicated boundaries. + ''' + ret = io.StringIO() + for key, value in list(data.items()): + # handle multiple entries for the same name + if type(value) != type([]): value = [value] + for value in value: + ret.write(sep_boundary) + if isinstance(value, Upload): + ret.write('\nContent-Disposition: form-data; name="%s"'%key) + filename = os.path.basename(value.filename) + ret.write('; filename="%s"\n\n'%filename) + value = open(os.path.join(value.filename), "rb").read() + else: + ret.write('\nContent-Disposition: form-data; name="%s"'%key) + ret.write("\n\n") + value = str(value) + ret.write(str(value)) + if value and value[-1] == '\r': + ret.write('\n') # write an extra newline + ret.write(end_boundary) + return ret.getvalue() + +class Progress: + def __init__(self, info, data): + self.info = info + self.tosend = len(data) + self.total = self.tosend/1024 + self.data = io.StringIO(data) + self.start = self.now = time.time() + self.sent = 0 + self.num = 0 + self.stepsize = self.total / 100 or 1 + self.steptimes = [] + self.display() + + def __iter__(self): return self + + def __next__(self): + self.num += 1 + if self.sent >= self.tosend: + print(self.info, 'done', ' '*(75-len(self.info)-6)) + sys.stdout.flush() + raise StopIteration + + chunk = self.data.read(1024) + self.sent += len(chunk) + #print (self.num, self.stepsize, self.total, self.sent, self.tosend) + + if self.num % self.stepsize: + return chunk + self.display() + return chunk + + def display(self): + # figure how long we've spent - guess how long to go + now = time.time() + steptime = now - self.now + self.steptimes.insert(0, steptime) + if len(self.steptimes) > 5: + self.steptimes.pop() + steptime = sum(self.steptimes) / len(self.steptimes) + self.now = now + eta = steptime * ((self.total - self.num)/self.stepsize) + + # tell it like it is (or might be) + if now - self.start > 3: + M = eta / 60 + H = M / 60 + M = M % 60 + S = eta % 60 + if self.total: + s = '%s %2d%% (ETA %02d:%02d:%02d)'%(self.info, + self.num * 100. / self.total, H, M, S) + else: + s = '%s 0%% (ETA %02d:%02d:%02d)'%(self.info, H, M, S) + elif self.total: + s = '%s %2d%%'%(self.info, self.num * 100. / self.total) + else: + s = '%s %d done'%(self.info, self.num) + sys.stdout.write(s + ' '*(75-len(s)) + '\r') + sys.stdout.flush() + +class progressHTTPConnection(http.client.HTTPConnection): + def progress_send(self, str): + """Send `str' to the server.""" + if self.sock is None: + self.connect() + + p = Progress('Uploading', str) + for chunk in p: + sent = 0 + while sent != len(chunk): + try: + sent += self.sock.send(chunk) + except socket.error as v: + if v[0] == 32: # Broken pipe + self.close() + raise + p.display() + +class progressHTTP(http.client.HTTP): + _connection_class = progressHTTPConnection + def _setup(self, conn): + http.client.HTTP._setup(self, conn) + self.progress_send = self._conn.progress_send + +def http_request(data, server, port, url): + h = progressHTTP(server, port) + + data = mimeEncode(data) + h.putrequest('POST', url) + h.putheader('Content-type', 'multipart/form-data; boundary=%s'%boundary) + h.putheader('Content-length', str(len(data))) + h.putheader('Host', server) + h.endheaders() + + h.progress_send(data) + + errcode, errmsg, headers = h.getreply() + + f = h.getfile() + response = f.read().strip() + f.close() + + print('%s %s'%(errcode, errmsg)) + if response: print(response) + +def usage(): + print('''This program is to be used to upload files to the PyWeek system. +You may use it to upload screenshots or code submissions. + +REQUIRED ARGUMENTS: + -u username + -p password + -d description of file + -c file to upload + -e entry short name + +OPTIONAL ARGUMENTS: + -s file is a screenshot + -f file is FINAL submission + -h override default host name (www.pyweek.org) + -P override default host port (80) + +In order to qualify for judging at the end of the challenge, you MUST +upload your source and check the "Final Submission" checkbox. +''') + + +if __name__ == '__main__': + try: + optlist, args = getopt.getopt(sys.argv[1:], 'e:u:p:sfd:h:P:c:') + except getopt.GetoptError as message: + print(message) + usage() + sys.exit(1) + host = 'www.pyweek.org' + port = 80 + data = dict(version=2) + optional = {} + url = None + for opt, arg in optlist: + if opt == '-u': data['user'] = arg + elif opt == '-p': data['password'] = arg + elif opt == '-s': optional['is_screenshot'] = 'yes' + elif opt == '-f': optional['is_final'] = 'yes' + elif opt == '-d': data['description'] = arg + elif opt == '-c': data['content_file'] = Upload(arg) + elif opt == '-e': url = '/e/%s/oup/'%arg + elif opt == '-h': host = arg + elif opt == '-P': port = int(arg) + + if len(data) < 4 or url is None: + print('Required argument missing') + usage() + sys.exit(1) + + data.update(optional) + http_request(data, host, port, url) + diff --git a/docs/_static/pyweek.png b/docs/_static/pyweek.png deleted file mode 100644 index eae8219..0000000 Binary files a/docs/_static/pyweek.png and /dev/null differ diff --git a/docs/_static/pyweek.svg b/docs/_static/pyweek.svg index 7fe5e4f..a98aa41 100644 --- a/docs/_static/pyweek.svg +++ b/docs/_static/pyweek.svg @@ -1,746 +1,259 @@ - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Python Game Programming Challenge - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/_static/pyxel.png b/docs/_static/pyxel.png deleted file mode 100644 index f13a105..0000000 Binary files a/docs/_static/pyxel.png and /dev/null differ diff --git a/docs/_static/pyxel.webp b/docs/_static/pyxel.webp new file mode 100644 index 0000000..967b089 Binary files /dev/null and b/docs/_static/pyxel.webp differ diff --git a/docs/_static/roses-are-ff0000.woff b/docs/_static/roses-are-ff0000.woff deleted file mode 100644 index 27170b0..0000000 Binary files a/docs/_static/roses-are-ff0000.woff and /dev/null differ diff --git a/docs/_static/roses-are-ff0000.woff2 b/docs/_static/roses-are-ff0000.woff2 new file mode 100644 index 0000000..aca1027 Binary files /dev/null and b/docs/_static/roses-are-ff0000.woff2 differ diff --git a/docs/_static/ursina.png b/docs/_static/ursina.png deleted file mode 100644 index b7a0e1b..0000000 Binary files a/docs/_static/ursina.png and /dev/null differ diff --git a/docs/_static/ursina.webp b/docs/_static/ursina.webp new file mode 100644 index 0000000..3991f7d Binary files /dev/null and b/docs/_static/ursina.webp differ diff --git a/docs/_static/wasabi2d.png b/docs/_static/wasabi2d.png deleted file mode 100644 index bb3ae2f..0000000 Binary files a/docs/_static/wasabi2d.png and /dev/null differ diff --git a/docs/_static/wasabi2d.webp b/docs/_static/wasabi2d.webp new file mode 100644 index 0000000..03c35d1 Binary files /dev/null and b/docs/_static/wasabi2d.webp differ diff --git a/docs/coc.rst b/docs/coc.rst index 74944d2..5d6703f 100644 --- a/docs/coc.rst +++ b/docs/coc.rst @@ -1,7 +1,7 @@ Code of Conduct =============== -We want all users to have an enjoyable experience whe participating in the +We want all users to have an enjoyable experience when participating in the PyWeek challenge and community. All users are expected to abide by this Code of Conduct. If necessary, the PyWeek organisers will act to enforce it. diff --git a/docs/conditions.rst b/docs/conditions.rst index 2fef521..d6aa1bf 100644 --- a/docs/conditions.rst +++ b/docs/conditions.rst @@ -2,7 +2,7 @@ Conditions of Use ================= -:revision date: 2020-09-16 +:Revision date: 2020-09-16 1. About these Conditions @@ -27,40 +27,40 @@ facilitates the running of the PyWeek challenge. 3. How You Promise to Behave in this Environment ================================================ -3.0 When using the PyWeek website you agree to abide by the :doc:`coc`, +3.1 When using the PyWeek website you agree to abide by the :doc:`coc`, which describes appropriate forms of communication and forbids -harrassment of any kind. +harassment of any kind. -3.1 This agreement is a software license. Under this license, only one -person is allowed to log in under a single username and password. You -must never provide your password to anybody else. +3.2 This agreement is a software license. Under this license, only one +person is allowed to log in under a single username and passphrase. You +must never provide your passphrase to anybody else. -3.2 You must not assume the identity of another living person. +3.3 You must not assume the identity of another living person. -3.3 Material posted to your home page must not infringe another person -or organisation's copyright, patent, trademark or trade secret. It must +3.4 Material posted to your home page must not infringe another person’s +or organisation’s copyright, patent, trademark or trade secret. It must not be defamatory, libellous, unlawful or incite unlawful behaviour, -obscene, invasive of another person's privacy, harmful of children, +obscene, invasive of another person’s privacy, harmful of children, hateful, harassing, racially or ethnically objectionable, abusive, threatening, harmful, fraudulently deceptive, in breach of confidentiality, or in contempt of court. -3.4 You may not use this software environment for 'spamming' or +3.5 You may not use this software environment for “spamming” or activities associated with spamming, nor share or transmit files that are corrupt, have viruses or which will do harm to the usability of -anybody's computer. +anybody’s computer. -3.5 Everything you post to your home page is your sole responsibility. +3.6 Everything you post to your home page is your sole responsibility. Including, but not limited to program code, images, sound or video material. As the PyWeek Organisers do not review or screen any of the material that is posted to the web using the PyWeek system, we can take -no responsibility for any of this content -- yours or other people's. +no responsibility for any of this content — yours or other people’s. 4. Copyright ============ -4.1 All software and content in the PyWeek system is copyright and is +4.1 All software and content in the PyWeek system is copyrighted and is protected by international copyright laws. 4.2 Your Copyright @@ -68,25 +68,25 @@ protected by international copyright laws. 4.2.1 The copyright of all material posted to a PyWeek home page is owned by the person posting the content, or the organisation which has -given a person permission to post content on that organisation's behalf. +given a person permission to post content on that organisation’s behalf. 4.2.2 Permissions to copy or republish any material posted to the web through this site can only be secured by contacting the copyright owner directly. -4.3 Other People's Copyright +4.3 Other People’s Copyright ---------------------------- -4.3.1 As a part of this agreement, you agree to respect other people's +4.3.1 As a part of this agreement, you agree to respect other people’s copyright. Material owned by other people or organisations can only be -used with their permission, or within the bounds of 'fair use', or when +used with their permission, or within the bounds of “fair use”, or when a particular piece of content is in the public domain. 6. Things for which the PyWeek Organisers will not be Responsible ================================================================= -6.1 The PyWeek system is continuously evolving environment. The PyWeek +6.1 The PyWeek system is a continuously evolving environment. The PyWeek Organisers may at any time and without notice modify or discontinue all or part of its service. You agree that the PyWeek Organisers shall not be liable to you or anybody else if this happens. @@ -94,13 +94,13 @@ be liable to you or anybody else if this happens. 6.2 The PyWeek Organisers will not take any responsibility for lost content or temporary lack of access due to technical failure. We recommend that you maintain your own backup of any material of -importance of value to you, independent of and separate from the PyWeek +importance or value to you, independent of and separate from the PyWeek system storage facilities. 6.3 The PyWeek Organisers do not warrant that its software will be error free, continuously and permanently available and secure. Access to -material generated by the software is at the user's own risk, and the -PyWeek Organisers take no responsibility for damage done to the user's +material generated by the software is at the user’s own risk, and the +PyWeek Organisers take no responsibility for damage done to the user’s computer system, or content stored on that system, as a consequence of access to the software or content stored using the software. @@ -108,12 +108,12 @@ access to the software or content stored using the software. to the web or published using the PyWeek system. As a consequence, we will not accept any claims made against us in relation to this content. -6.6 The PyWeek Organisers will not take any responsibility for the use +6.5 The PyWeek Organisers will not take any responsibility for the use of your account by other people, with or without your permission, and expressly forbids you from permitting another person to use your account -or giving them your password. +or giving them your passphrase. -6.7 You agree to indemnify the PyWeek Organisers against any claims that +6.6 You agree to indemnify the PyWeek Organisers against any claims that may be made against us as a consequence of the way you have used this software environment, and any related costs if we are required to deal with these claims. @@ -132,6 +132,6 @@ PyWeek system on matters connected with PyWeek challenges. 7.2 All contact details entered during registration will be kept private. -7.3 The PyWeek system may require that "cookies" are enabled on your +7.3 The PyWeek system may require that “cookies” are enabled on your web-browser. Data which is collected using cookies will not be used to track individuals. diff --git a/docs/conf.py b/docs/conf.py index 0a358ba..1d74501 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -4,7 +4,7 @@ # # This file does only contain a selection of the most common options. For a # full list see the documentation: -# http://www.sphinx-doc.org/en/master/config +# https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- @@ -20,7 +20,7 @@ # -- Project information ----------------------------------------------------- project = u'PyWeek' -copyright = u'2019, Daniel Pope' +copyright = u' 2019, Daniel Pope' author = u'Daniel Pope' # The short X.Y version @@ -58,7 +58,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = 'en' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -107,7 +107,7 @@ -# -- Options for HTMLHelp output --------------------------------------------- +# -- Options for HTML Help output --------------------------------------------- # Output file base name for HTML help builder. htmlhelp_basename = 'PyWeekdoc' @@ -164,7 +164,7 @@ ] -# -- Options for Epub output ------------------------------------------------- +# -- Options for EPUB output ------------------------------------------------- # Bibliographic Dublin Core info. epub_title = project diff --git a/docs/diaries.rst b/docs/diaries.rst index 979d8f9..ad649fe 100644 --- a/docs/diaries.rst +++ b/docs/diaries.rst @@ -17,17 +17,17 @@ This will be interesting to other PyWeek participants, but will also give you the chance, once the competition has ended, to look back and see how your game evolved over the course of a week. -Screenshots can be uploaded to the PyWeek website via the "Upload File" link +Screenshots can be uploaded to the PyWeek website via the “Upload File” link on the Entry page. Taking Screenshots ================== -While you can take screenshots using a generic screen grab tool, it's not -always quick and easy - it can require switching focus away from your game. +While you can take screenshots using a generic screen grab tool, it’s not +always quick and easy — it can require switching focus away from your game. -You can take more and better screenshots if you set up a key - I suggest F12 - +You can take more and better screenshots if you set up a key — I suggest F12 — to save a new screenshot under a unique file name. Fortunately doing this from Python code is pretty formulaic. @@ -65,7 +65,7 @@ Pyglet ------ In OpenGL, you have to read back the colour buffer to an image and save that. -As you generally don't want the colour buffer's alpha channel to be saved if it +As you generally don’t want the colour buffer’s alpha channel to be saved if it has one, there are a couple of OpenGL calls to force every pixel to be read as opaque. Pyglet can handle reading and saving the colour buffer though. diff --git a/docs/help.rst b/docs/help.rst old mode 100755 new mode 100644 index 2f18d67..1ce9e84 --- a/docs/help.rst +++ b/docs/help.rst @@ -2,26 +2,24 @@ Using the PyWeek Website ======================== -:date: 2019-02-16 - - How the heck do I write a game? ------------------------------- -There's some great tutorials out there and Al Sweigart, the author of the +There’re some great tutorials out there and Al Sweigart, the author of the free book *Invent Your Own Computer Games with Python* has compiled a `list of the top 10`__. __ http://inventwithpython.com/blog/2010/09/01/the-top-10-pygame-tutorials/ +.. _so-you-want-to-enter-as-an-individual: + So you want to enter as an individual? -------------------------------------- -You should log into the PyWeek site and go to the latest challenge in the -sidebar. Then in the the sidebar you should see "Register Entry". -Click that and fill out the details. Leave the "Team Members" bit blank. +After logging into the PyWeek site, under your username you should see “Register Entry”. +Click that and fill out the details. Leave the “Team Members” bit blank. -Once you've done that, your entry will appear under your "Your entries" +Once you’ve done that, your entry will appear under your “Your Latest Entries” list. You may add diary entries and upload files or screenshots to this entry @@ -31,18 +29,11 @@ You may add diary entries and upload files or screenshots to this entry So you want to enter as a team? ------------------------------- -This step should be performed by the team leader. - -You should log into the PyWeek site and go to the latest challenge in -the sidebar. Then in the sidebar you should see "Register Entry". Click -that and fill out the details. You may fill in the "Team Members" bit -now or come back and edit it later. +The process for entering as a team is almost exactly the same as that of +:ref:`entering as an individual `, +except that it should be performed only by the team leader. -Once they've done that, their entry will appear under your "Your -entries" list. - -You may add diary entries and upload files or screenshots to the team -entry (the latter only once the challenge has started). +The team leader may fill in the “Team Members” bit at time of entry or come back and edit it later. Only the team leader will be able to manage the team entry (change its name or membership listing). @@ -51,20 +42,20 @@ name or membership listing). Editing your personal details ----------------------------- -Once you've logged in use the "Edit Profile" link in the menu +Once you’ve logged in use the “Edit Profile” link in the menu to configure how your profile is displayed on the PyWeek site. Your profile image, shown in a few places on the site, is a -Gravatar_ corresponding to your primary e-mail address. Use -https://gravatar.com to upload a new Gravatar. +Gravatar_ corresponding to your primary email address. Use +https://gravatar.com/ to upload a new Gravatar. .. _Gravatar: https://gravatar.com/ -Use the "Account Settings" link to set your e-mail preferences or change your +Use the “Account Settings” link to set your email preferences or change your password. -Don't want an Entry any more? +Don’t want an Entry any more? ----------------------------- Just ask Daniel to remove it. Mail him at daniel@pyweek.org @@ -85,11 +76,11 @@ Ask the team leader of that team to add you. What to do before the challenge starts -------------------------------------- -1. Make sure you have working versions of the libraries you're going to use. +1. Make sure you have working versions of the libraries you’re going to use. 2. Make sure you can build packages to submit as your final submission (if - you're going to use py2exe, make sure you know how to use it and that it + you’re going to use py2exe, make sure you know how to use it and that it works). -3. If you don't have access to Linux, Windows or a Mac to test on, contact +3. If you don’t have access to Linux, Windows or a Mac to test on, contact friends, family or other competitors to find someone who is able to test for you. @@ -104,15 +95,15 @@ What do do during the challenge level transition screens, game over screen (for example 1/5 of the total time) 4. Upload screenshots and put them in diary entries! -5. Hang around in the `Python Discord `_. Our - dedicated channel is ``#pyweek`` but there will be other channels available +5. Hang around in the `Python Discord `_. Our + dedicated channel is ``#pyweek-game-jam`` but there will be other channels available during the competition. How to submit your entry ------------------------ -Visit your entry's page any time during the challenge and up to 24 hours +Visit your entry’s page any time during the challenge and up to 24 hours after the finish to upload your file(s). You may upload as many files as necessary, including screenshots. @@ -126,34 +117,28 @@ What to submit as your entry Consider the advice at http://www.pygame.org/wiki/distributing -**We recommend you download** the `Skellington 1.9`__ package and use that as the starting-point -for your game. - -__ http://media.pyweek.org/static/skellington-1.9.zip - For this challenge, -1. Always use either ZIP or TAR / GZIP to bundle your entry. +1. Always use either ZIP or tar / gzip to bundle your entry. 2. Always use a top-level directory. -3. You **MUST** include a README.txt which at a minimum indicates: +3. You **MUST** include a README text file which at a minimum indicates: - who wrote the code - who created the artwork - *how to run the game* - - the licence for the game (the Free Software Foundation has a handy + - the license for the game (the Free Software Foundation has a handy `page of free software licenses`__) - what dependencies need to be installed - a plug for the challenge is nice :) -4. If possible, you should bundle other libs you've used. If it's pure +4. If possible, you should bundle other libs you’ve used. If it’s pure Python, then it may be bundled straight. If not, then consider including the source for the library. 5. If your entry is large (greater than 1MB) then you might want to use - the `pyweek uploader`__ script to upload it, as it will handle bigger + the :download:`pyweek-upload.py <_static/pyweek-upload.py>` script to upload it, as it will handle bigger uploads better. -__ http://www.fsf.org/licensing/licenses -__ http://media.pyweek.org/static/pyweek-upload.py +__ https://www.gnu.org/licenses/license-list.html When does PyWeek run? @@ -184,9 +169,9 @@ so you can then upload post-competition patches and releases. To upload a file: 1. log in, -2. select the entry you wish to upload it for in the sidebar, -3. select "Upload File" or "Upload Screenshot" in the sidebar, and -4. fill out the "Upload a File" form. +2. select the entry you wish to upload it for from the menu, +3. select “Upload File” or “Upload Screenshot”, and +4. fill out the “Upload a File” form. See the separate section `How to submit your entry`_ for more information about submitting your entry to the site. @@ -198,14 +183,14 @@ How do I post a diary entry? To post an entry: 1. log in, -2. select the entry you wish to post the entry for in the sidebar, -3. select "Add Diary Entry" in the sidebar, and +2. select the entry you wish to post the entry for from the menu, +3. select “Add Diary Entry”, and 4. fill out the form. -Your entry will automatically be listed on the front page of the site. +Your entry will automatically be listed under “Diaries” for the current challenge. -What's PyWeek all about? +What’s PyWeek all about? ------------------------ Richard__ speaks: @@ -218,20 +203,20 @@ Richard__ speaks: organise. Spreading the development over a week is much easier. 2. I wanted to be able to collaborate with friends and LD48 is a solo-only challenge. - 3. There's lots of public-domain or Creative Commons artwork and audio out - there that people shouldn't be prevented from using. Also, I suck at both + 3. There’s lots of public-domain or Creative Commons artwork and audio out + there that people shouldn’t be prevented from using. Also, I suck at both drawing and musical composition :) - The Python-only stipulation was partly as an experiment (to see whether we'd + The Python-only stipulation was partly as an experiment (to see whether we’d get more games that worked for more people than the LD48 experience) and also as a tool for promoting Python (which I think rocks, a lot). -__ http://www.mechanicalcat.net/richard +__ https://mechanicalcat.net/richard/ PyWeek was conceived and originally run by Richard Jones. PyWeek number 1 was run in August 2005. -Pyweek 22-24 were run by Blake O'Hare. +Pyweek 22-24 were run by Blake O’Hare. Pyweek 25-30 were run by Daniel Pope. @@ -243,7 +228,7 @@ ups and downs depending on how widely the challenge is promoted (or whether I manage to schedule it particularly badly). The first challenge was announced about 3 months out, and a bunch of -people registered that didn't return for the challenge, hence the low +people registered that didn’t return for the challenge, hence the low number of finished entries. Since then registration has only been opened to new users one month from the start date. This appears to have reduced the number of unused registrations. diff --git a/docs/index.rst b/docs/index.rst index aa1cff9..c7f00c7 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -19,11 +19,11 @@ Visit https://pyweek.org/ to participate. .. tip:: - .. image:: _static/python-discord.png + .. image:: _static/python-discord.webp :align: right PyWeek is partnered with the Python Discord server. `Join us - `_ in the ``#pyweek`` channel to chat with other + `_ in the ``#pyweek-game-jam`` channel to chat with other PyWeekers and follow game progress and announcement. diff --git a/docs/libraries.rst b/docs/libraries.rst index 87743fe..e174c1a 100644 --- a/docs/libraries.rst +++ b/docs/libraries.rst @@ -8,10 +8,10 @@ Graphics/Window/Sound/UI |Pygame| -------- -.. |Pygame| image:: _static/pygame.png +.. |Pygame| image:: _static/pygame.webp -:Website: http://pygame.org/ -:Documentation: https://www.pygame.org/docs/index.html +:Website: https://www.pygame.org/ +:Documentation: https://www.pygame.org/docs/ Pygame is principally bindings for SDL (Simple DirectMedia Layer) for Python. As such it has limited support for GPU-accelerated rendering, and any support @@ -26,20 +26,20 @@ Add-ons: * `PGU `_ - a collection of utility code for working with Pygame, including a complete UI framework and basic HTML rendering. -* `thorpy `__ for pygame GUIs -* `Albow `__ - +* `thorpy `__ for pygame GUIs +* `Albow `__ - widget set for GUIs |pgzero| Pygame Zero -------------------- -.. |pgzero| image:: _static/pgzero.png +.. |pgzero| image:: _static/pgzero.webp -:Website: https://pygame-zero.readthedocs.io/en/stable/ +:Website: https://pygame-zero.readthedocs.io/ -Pygame Zero is "training wheels for Pygame", intended to make it simpler for -complete beginner to create games in Python using Pygame. +Pygame Zero is “training wheels for Pygame”, intended to make it simpler for +a complete beginner to create games in Python using Pygame. Even so, it also has a number of feature additions such as a built-in event loop and tweening. @@ -48,54 +48,42 @@ loop and tweening. |pyglet| Pyglet --------------- -.. |pyglet| image:: _static/pyglet.png +.. |pyglet| image:: _static/pyglet.webp -:Website: http://pyglet.org/ +:Website: https://pyglet.org/ :Documentation: https://pyglet.readthedocs.io/ pyglet provides hardware accelerated rendering for sprites, drawing text, audio playback, and joystick support. Sprites can be static or animated, rotated, scaled, and support transparency. pyglet is built on OpenGL, -so the full OpenGL bindings are also availble for use in 3D games. +so the full OpenGL bindings are also available for use in 3D games. FFmpeg_ is optionally supported for compressed audio and video playback. -.. _FFmpeg: https://pyglet.readthedocs.io/en/stable/programming_guide/media.html#ffmpeg-installation - - -|coco| Cocos2D --------------- - -.. |coco| image:: _static/cocos2d.png - -:Website: http://python.cocos2d.org/ -:Documentation: http://python.cocos2d.org/doc/index.html - -Cocos2D, built on Pyglet, offers higher level primitives, such as scene -transitions and sprites on which animations can be queued. +.. _FFmpeg: https://pyglet.readthedocs.io/en/latest/programming_guide/media.html#ffmpeg-installation |arcade| Arcade --------------- -.. |arcade| image:: _static/arcade.png +.. |arcade| image:: _static/arcade.webp -:Website: http://arcade.academy/index.html +:Website: https://api.arcade.academy/ Also built on Pyglet, this is a higher-level games framework with extensive documentation and examples. The author has written a `corresponding book -`_ on learning to program with +`_ on learning to program with Arcade. |kivy| Kivy ----------- -.. |kivy| image:: _static/kivy.png +.. |kivy| image:: _static/kivy.webp -:Website: http://kivy.org/ +:Website: https://kivy.org/ Kivy is a cross-platform multimedia UI system built on OpenGL ES. As such it can be used for building games, though it is not specifically designed for this @@ -107,7 +95,7 @@ purpose. |panda| Panda3D --------------- -.. |panda| image:: _static/panda3d.png +.. |panda| image:: _static/panda3d.webp :Website: https://www.panda3d.org/ :Documentation: https://www.panda3d.org/manual/ @@ -119,7 +107,7 @@ Disney. |pyxel| Pyxel ------------- -.. |pyxel| image:: _static/pyxel.png +.. |pyxel| image:: _static/pyxel.webp :Website: https://github.com/kitao/pyxel @@ -131,10 +119,10 @@ executables. |wasabi2d| Wasabi2D ------------------- -.. |wasabi2d| image:: _static/wasabi2d.png +.. |wasabi2d| image:: _static/wasabi2d.webp :Website: https://github.com/lordmauve/wasabi2d -:Documentation: https://wasabi2d.readthedocs.io/en/stable/ +:Documentation: https://wasabi2d.readthedocs.io/ A powerful 2D graphics engine with coroutines and shaders, built on ModernGL and Pygame. @@ -143,7 +131,7 @@ and Pygame. |ursina| Ursina --------------- -.. |ursina| image:: _static/ursina.png +.. |ursina| image:: _static/ursina.webp :Website: https://www.ursinaengine.org/ @@ -153,10 +141,10 @@ A 2D/3D engine built on top of Panda3D_. |pursuedpybear| PursuedPyBear ----------------------------- -.. |pursuedpybear| image:: _static/pursuedpybear.png +.. |pursuedpybear| image:: _static/pursuedpybear.webp :Website: https://ppb.dev/ -:Documentation: https://ppb.readthedocs.io/en/stable/ +:Documentation: https://ppb.readthedocs.io/ An education-friendly 2D game framework built on PySDL2. @@ -166,8 +154,8 @@ Others * `pysdl2-harness `__ - some simple classes to make working with pysdl2 easier. Somewhat - inspired by pyglet and trying to hide all the "ugly" stuff of SDL2 -* `ModernGL `__ - a PyOpenGL replacement + inspired by pyglet and trying to hide all the “ugly” stuff of SDL2 +* `ModernGL `__ - a PyOpenGL replacement Geometry/Vectors @@ -184,7 +172,7 @@ Geometry/Vectors .. _pygame.math: https://www.pygame.org/docs/ref/math.html .. _wasabigeom: https://github.com/lordmauve/wasabigeom -.. _pyrr: https://pyrr.readthedocs.io/en/latest/ +.. _pyrr: https://pyrr.readthedocs.io/ .. _euclid: https://pypi.org/project/euclid/ .. _vec: https://github.com/larryhastings/vec @@ -196,10 +184,9 @@ Physics |Pymunk| -------- -.. |Pymunk| image:: _static/pymunk.png +.. |Pymunk| image:: _static/pymunk.webp -:Website: http://www.pymunk.org/en/latest/ -:Documentation: http://www.pymunk.org/en/latest/overview.html +:Website: http://www.pymunk.org/ Pymunk is a complete 2D physics engine with a very Pythonic API and good documentation. Pymunk is based on Chipmunk, a fast physics engine written in C. @@ -230,6 +217,6 @@ Sound GUI === -* `pyimgui `_ - Python bindings for the - *dear Imgui* UI framework - works with several OpenGL based frameworks and +* `pyimgui `_ - Python bindings for the + *dear Imgui* UI framework — works with several OpenGL based frameworks and also Pygame. diff --git a/docs/make.bat b/docs/make.bat index 27f573b..451f805 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -21,7 +21,7 @@ if errorlevel 9009 ( echo.may add the Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ + echo.https://www.sphinx-doc.org/ exit /b 1 ) diff --git a/docs/packaging.rst b/docs/packaging.rst index ea29a2e..60a76a0 100644 --- a/docs/packaging.rst +++ b/docs/packaging.rst @@ -1,5 +1,5 @@ =================== -Packaging your game +Packaging Your Game =================== When creating a game for PyWeek, you will want to be sure that it can be played @@ -15,7 +15,7 @@ According to :ref:`rule 7 `, your game must include all source code. This is the first thing you should do. Packaging a game for various platforms -(eg. using PyInstaller) is entirely optional - including the source is not. +(eg. using PyInstaller) is entirely optional — including the source is not. It is recommended to create a ZIP file that contains your source code. ZIP files can be read on almost all operating systems with standard software. @@ -36,7 +36,7 @@ So if my game is *Camel Breeder*, I might create a ZIP file called .. caution:: - Don't create a `Zip bomb`_, which creates many files in the directory + Don’t create a `Zip bomb`_, which creates many files in the directory where you unzip it. @@ -108,7 +108,7 @@ each target only one operating system, and seem to be unmaintained (as of 2019). -.. _PyInstaller: https://www.pyinstaller.org/ -.. __: https://pyinstaller.readthedocs.io/en/stable/ -.. _cx_freeze: https://cx-freeze.readthedocs.io/en/latest/index.html +.. _PyInstaller: https://pyinstaller.org/ +.. __: https://pyinstaller.org/ +.. _cx_freeze: https://cx-freeze.readthedocs.io/ .. _py2exe: http://www.py2exe.org/ diff --git a/docs/resources.rst b/docs/resources.rst index 0f0bd4d..d73b985 100644 --- a/docs/resources.rst +++ b/docs/resources.rst @@ -2,8 +2,6 @@ Game Development Resources ========================== -:Last reviewed: 2019-02-17 - `We asked PyWeek users `_ for their suggestions for game development resources. @@ -15,50 +13,50 @@ Articles and tutorials - `Fun and Games in Python - `_ - a history of + `_ a history of PyWeek, Pygame, Pyglet and more, with analysis on what makes games fun - `How to be Successful at PyWeek `__ -- Some `Game Development Tips & Tricks `__ +- Some `Game Development Tips & Tricks `__ - `How to fail at - PyWeek `__ (`slides `__) -- `PyGame wiki `__ chock full of - `tutorials `__, - `game  `__\ `resources `__, \ `distribution - advice `__ and + PyWeek `__ +- `PyGame wiki `__ chock full of + `tutorials `__, + `game  `__\ `resources `__, \ `distribution + advice `__ and more. - `Big List of Indie - Resources `__ + Resources `__ - `Big List of Game - Design `__ -- `Game Mechanics Explorer `__ -- `Amit's Game Programming Information `_ contains + Design `__ +- `Game Mechanics Explorer `__ +- `Amit’s Game Programming Information `_ contains a huge resource on game design and implementation -- `Game Accessibility Guidelines `__ +- `Game Accessibility Guidelines `__ - `A Whole Lot of PyGame Examples `__ -- `Red Blob Games `_ has superb interactive +- `Red Blob Games `_ has superb interactive tutorials on a number of topics. -- On `frame rates, vsync and gameplay simulation `__. +- On `frame rates, vsync and gameplay simulation `__. - `Pixel art tutorials `_ -- Al Sweigert's `Video Game Mechanics Mixer +- Al Sweigert’s `Video Game Mechanics Mixer `__. -- "`Designing a retro pixel-art - tile-set `__" +- “`Designing a retro pixel-art + tile-set `__” - `Evaluating Game Mechanics For Depth - `_ - - This article is probably one of the most useful I've ever read and is + `_ + this article is probably one of the most useful I’ve ever read and is great for evaluating whether a game idea is good or not in advance. - Nice writeup of `various approaches to 2D platformer - games `__. + games `__ Video Tutorials --------------- -* "`Juice It Or Lose It `__" - an - awesome presentation about making games more fun with very simple ideas. +* “`Juice It Or Lose It `__” an + awesome presentation about making games more fun with very simple ideas * Great video about good \ `game design as illustrated by the Mega Man - series `__ + series `__ (caution: contains swearing) @@ -66,51 +64,48 @@ Video Tutorials ----------- * `Kenney `_ has a vast library of cute 3D sprites, as well - as 3D models and sound files. -* `OpenGameArt `_ has 2D art, 3D models and textures. + as 3D models and sound files +* `OpenGameArt `_ has 2D art, 3D models and textures * `Game Icons `_ - a collection of icons representing - video game tropes. + video game tropes 3D Models --------- -* `Models by Quaternius `_ -* `Google Poly `_ has many CC low-poly models (but - it also has other 3D content created by Tilt Brush and other tools, which are - not useful in games. +* `Models by Quaternius `_ Textures -------- -* `CC0Textures.com `_ - public domain PBR texture +* `ambientCG `_ - public domain PBR texture sets  -* `Texture Haven `_ +* `Poly Haven `_ Content Creation ---------------- -- `Pyxeledit `__ is a pixel art, tile map, tile - set and sprite sheet editor of awesomeness. It's inspired by - `Pixothello `__\  but is improved - in many ways (not the least of which is it's cross-platform.) -- `Pixen `__ is a really nice pixel art app for - OS X but it doesn't have the same awesome tileset creation mode as - Pyxeledit. +- `Pyxeledit `__ is a pixel art, tile map, tile + set and sprite sheet editor of awesomeness. It’s inspired by + `Pixothello `__\  but is improved + in many ways (not the least of which is it’s cross-platform) +- `Pixen `__ is a really nice pixel art app for + macOS but it doesn’t have the same awesome tileset creation mode as + Pyxeledit - `Tiled Map Editor `_ - A collection of links to `game assets and various game-dev related - tools `__.Here's + tools `__. Here’s a list of `art asset creation - tools `__ + tools `__ Music ----- - http://ccmixter.org/ -- `Royalty free music by inkaudio `__ -- `Random music generator `__ +- `Royalty free music by inkaudio `__ +- `Random music generator `__ - `Filmmusic.io `_ creative commons music @@ -129,12 +124,6 @@ Fonts Icons ----- -- `Icons for everything `__ - royalty free +- `Icons for everything `__ royalty free icons (over 1 million, it claims) - -Finding Collaborators ---------------------- - -* `Teamups `__ - diff --git a/docs/rules.rst b/docs/rules.rst index 06c8254..0cf9bb2 100644 --- a/docs/rules.rst +++ b/docs/rules.rst @@ -2,7 +2,7 @@ The Rules --------- -:revision date: 2020-02-06 +:Revision date: 2020-02-06 The PyWeek challenge: @@ -28,21 +28,21 @@ entries and upload files. People may join more than one team. During the challenge, competitors are encouraged to post diary entries (diaries are supplied as part of the challenge), and hang out on -`Discord `_ (channel ``#pyweek``). +the `Python Discord server `_ (channel ``#pyweek-game-jam``). By signing up to the challenge, you are agreeing to abide by the system :doc:`conditions of use `. -2. Entries are to be written "from scratch" +2. Entries are to be written “from scratch” ------------------------------------------- The intent of this rule is to provide a level playing-field for all entrants. The short version is this: any resources you prepare before the competition must be made both *available* and *accessible* to all other entrants, -regardless of whether they were created by you or by others. "Available" means +regardless of whether they were created by you or by others. “Available” means that they must be published in good time, in a place where other entrants might -discover them. "Accessible" means making sure others are not prevented from +discover them. “Accessible” means making sure others are not prevented from using them once aware of them. 1. You may not use code created before the competition except under the @@ -56,7 +56,7 @@ using them once aware of them. GitHub, or this handbook for at least 30 days before the competition; and, b. they are licensed under an `OSI-approved open source license - `_, or are public domain; and, + `_, or are public domain; and, c. the index page (eg. README/PyPI page) contains, or links to, a documentation resource that describes the features of the library and contains thorough API documentation; and, @@ -81,7 +81,7 @@ using them once aware of them. --------------------------- The challenge starts 00:00 UTC Sunday and finishes 7 days later at -00:00UTC Sunday. +00:00 UTC Sunday. Work done on entries before this time would be considered cheating. @@ -90,7 +90,7 @@ file(s). This is not extra development time. Failure to upload at the last minute of that additional 24 hours will be met with zero leniency. The server will overload if you try. You have been warned. -If your game crashes it's on your head. You should allow time for +If your game crashes it’s on your head. You should allow time for testing well before the deadline. @@ -140,8 +140,8 @@ An overall score will be calculated as the average of these scores. Gold, silver and bronze awards will be given for each of these categories; the overall score will decide the overall winner of the competition. -If the game did not work for a judge, they may mark the game "Did Not -Work". Their ratings in the categories above will not count towards its +If the game did not work for a judge, they may mark the game “Did Not +Work”. Their ratings in the categories above will not count towards its final ratings tally. Finally, competitors may vote that a submission be disqualified for one @@ -152,8 +152,8 @@ of three reasons: - Entrant cheated. A submission that gets more than 50% disqualification votes is not -eligible for any prizes, though they'll still appear in the rankings -("do'h, if only I'd followed the rules!") +eligible for any prizes, though they’ll still appear in the rankings +(“do’h, if only I’d followed the rules!”) 6. Existing artwork, music and sound effects may be used @@ -161,18 +161,18 @@ eligible for any prizes, though they'll still appear in the rankings As with the use of existing codebases, the intention is that all entrants start with a level playing field in artwork too. This means you -shouldn't develop artwork beforehand that you intend to use during the +shouldn’t develop artwork beforehand that you intend to use during the challenge *unless* you also make that artwork freely available to all other entrants. 1. You may not directly include art, sound, music, writing or other data created before the competition, except under the conditions of clause 6.2. - You may however use it as a point of reference, ie. as "concept art". + You may however use it as a point of reference, ie. as “concept art”. -2. You may inclue graphics, sound and music created before the competition if +2. You may include graphics, sound and music created before the competition if - a. They were published to a public website that has existed for least 30 + a. They were published to a public website that has existed for at least 30 days before the competition; and, b. the work is licensed under an OSI-approved or Creative Commons license, or is public domain; and, @@ -182,11 +182,11 @@ other entrants. Any diagrams and concept art created during the theme voting week should not form part of your submission unless clearly marked as concept art. -There should be absolutely no breach of licensing. You can't just -cut-n-paste in artwork from The Simpsons (TM). +There should be absolutely no breach of licensing. You can’t just +cut-n-paste in artwork from *The Simpsons* ™. The :doc:`resources` page has a list of resources you can use. Also check out -the `PyGame wiki's game resources page `_. +the `PyGame wiki’s game resources page `_. .. _final-submission: @@ -213,21 +213,21 @@ See :doc:`packaging` for some guidelines about how to package your entry. materials in the entry under the terms laid out in this section of the rules. -2. By submitting an entry to PyWeek you grant a transferrable, irrevocable +3. By submitting an entry to PyWeek you grant a transferrable, irrevocable license to redistribute, copy and run your entry without modification, and to distribute unmodified screenshots of the entry, provided no fee is charged. -3. You may include license terms in your entry; these will be considered an - alternative set of terms to those defined by clause 8.2. +4. You may include license terms in your entry; these will be considered an + alternative set of terms to those defined by clause 8.3. 9. Target platform ------------------ This is a Python programming challenge. However, you may include code written -in supporting languages (eg. C/C++ or Rust libraries, Javascript/HTML in web -pages, and so on), if that code does not implement "game logic". +in supporting languages (eg. C/C++ or Rust libraries, JavaScript/HTML in web +pages, and so on), if that code does not implement “game logic”. Entries must run using the latest version of Python. Entries must not require end-of-life versions of Python. See `the Python Dev Guide diff --git a/requirements.txt b/requirements.txt index 6693715..6966869 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -sphinx==1.8.4 +sphinx