PyUGAT / pyweek34

PyWeek#34 submission: Red Planted
https://pyweek.org/e/RedPlanted/
MIT License
4 stars 0 forks source link
opengl pygame python3 pyweek

PyWeek 34: Red Planted

PyUGAT's project repository for PyWeek 34.

Play

To play, install the requirements with

python -m pip install -r requirements.txt

then run the game with

python run_game.py

If you get a libGL error and use conda for package management, you can solve it within your environment by conda install -c conda-forge libstdcxx-ng.

Setup & Development

Using your favorite tool to create an environment, do something equivalent to

python -m pip install -r requirements.txt -r dev-requirements.txt

You want to update the requirements?

Add/Remove entries from requirements.in or dev-requirements.in, run pip-compile requirements.in or pip-compile dev-requirements.in to regenerate the actual requirements txt files and finally run pip-sync requirements.txt dev-requirements.txt to update the installed packages in your virtual environment.

You want to automatically restart the game after a change?

ls run_game.py | entr -r python run_game.py

Adjust ls argument to watch for other changes as well.

Low key automation

find . -name '*.py' | entr sh -c "black . && isort . && pytest -vv"  # but only on your code ;)

See also the entr man page.

Packaging for PyWeek

Run below command to create a ZIP file containing all necessary resources.

python package_for_pyweek.py

Daily

We meet every day at 20:00 in Gather.

Whoever has time is invited to join.

Collaboration

To simplify collaboration, we agreed to directly commit to main. Please avoid rewriting history, e.g. git push --force. If you want to share your work, feel free to create a folder.

Feel free to format you code using black.

Useful Resources

You need shared documents? Consider C3W's cryptpad instance.

You want another shared whiteboard? Consider cocreate.

You want sound effects? Consider freesound.

You want images/art? Consider OpenGameArt.