-
Notifications
You must be signed in to change notification settings - Fork 14
pygame-ce getting started and timing tutorial #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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).
I followed the documentation to create a venv and tested local rendering of the documentation via |
This is lovely, thank you a lot!!! I think everything you wrote is sound and useful but I'd like to wait for @ntoll eyes because he's the native English speaker so he might spot some gotcha I didn't but, for the time being, you have my approval, I wish we had more contributions like this one 💖 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waiting for @ntoll to double check but I think this should go in as it provides tons of tiny details we didn't formalize before.
Thanks for the approval and kind words. After a re-read today I did fix a grammar issue and removed a reference to "earlier code using dt" which existed while I was drafting the doc but removed in the end (but forgot to remove the later reference to it). |
* `configuration.md` fix grammar ("For these set the config attribute method" -> "For these use the config attribute method") * `pygame-ce.md` Removed "Our usage of `clock.tick()` and `dt` in the earlier code" which referenced removed code that existed earlier.
55e4eb2
to
ffce2b4
Compare
Hi @ntoll and @WebReflection let me know if there is anything else I can help with to get this ready for merge. |
Thank you! |
Wow @ntoll that's awesome it's even already deployed and online. |
Thank YOU for the contribution. 👍 |
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.