Pygame Examples
Just a bunch of pygame examples, feel free to use them
Most examples should be WASM compatible meaning that they can be run in the browser (after being properly packaged)
- We recommend reading our getting a development environment setup
pip install git+https://github.com/Matiiss/pygame_examples
Through releases
- Coming soon.
- These are primarily meant to be used to read the source code, so going through our examples should allow you to get an idea on how we recommend writing your code.
- Our examples are also compatible with WASM builds, follow conventions, have been reviewed by experienced pygame users, and follow an ECS or OOP paradigm (for the most part). Which means that following our example (no pun intended), should help you to write better Python code with the
pygame
framework! - If you want to try running our examples, and want to avoid the tedious process of setting up a development environment, we recommend using
pip install git+https://github.com/Matiiss/pygame_examples
if you have Python3.7+
installed. This will also addpgex
to the PATH. - You can use the
pgex
CLI interface to get started with launching examples on desktop or browser: - You can start by running
pgex --help
which should list the available commands.pgex run
can be used to run any of the available examplespgex run -n "example_name"
can be used to directly run the given examplepgex run --web
can be used to run the example on the browser. All examples are WASM compatible.pgex view
can be used to view the main file for the example on github.compgex view -n "example_name"
can be used to run a specific example.
- We recommend reading our contributing guidelines