pygame-ce getting started and timing tutorial #183
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Small update to configuration section to note that
<py-config>
applies only to py/mpy type scripts.Major additions to
pygame-ce.md
on how to get started by explaining the changes needed from "stock" pygame-ce code to run in pyscript, and specifically ways to allow the same code to run cross-platform (locally and in pyscript online).Example code listed in documentation is live at https://gillius.pyscriptapps.com/pyscript-pygame-ce-quickstart/latest/. If it's appropriate and desired, I can provide each variation for your upload https://docs.pyscript.net/2025.5.1/examples/.
I have written all documentation myself and contribute it under Apache 2.0 license as per https://docs.pyscript.net/2025.5.1/contributing/. The source code for the example is pulled from https://pyga.me/docs/tutorials/en/intro-to-pygame.html (source) with modifications to run under pyscript made by myself. The original code is documented as authored by Pete Shinners ([email protected]). The pygame-ce docs folder readme doesn't list a license but there is a file
LGPL.txt
which implies it may be covered by LGPL.As an example of 18 straightforward lines of code I would assume usage would be fair use, but if you want me to build a novel example I can. I used this one due to its small size and to show directly how we can modify pygame getting started documentation to work on pyscript.