Skip to content

oddbookworm/pygame_examples

 
 

Repository files navigation


A bunch of well crafted PyGame examples.

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)

Installation

By cloning the repository

Through pip

  • pip install git+https://github.com/Matiiss/pygame_examples

Through releases

  • Coming soon.

Usage

  • 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 Python 3.7+ installed. This will also add pgex 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 examples pgex run -n "example_name" can be used to directly run the given example pgex 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.com pgex view -n "example_name" can be used to run a specific example.

Contributing

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%