Skip to content

dr-hippo/pygame-ce-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pygame-CE Template

Basic pygame-ce template with prewritten boilerplate, useful classes, and build/upload scripts.

Intended for use in game jams.

Features

  • Highly configurable from src/config.py
  • Scene/Entity system (TODO)
  • Data/Settings save/load (TODO)
  • Utilities script: (TODO)
    • Image, sound, and font loading
    • Image and audio caching (TODO)
    • Basic text rendering
  • Premade build scripts for building to executable/play-in-browser bundle with PyInstaller/Pygbag
  • Fast uploading to itch.io with butler

Workflow

Setup

  1. Create a new repo from this template and clone to your computer
  2. Create a virtual environment (Build script assumes folder is called .venv)
  3. Install required dependencies with python -m pip install -r requirements.txt
  4. Change settings in src/config.py if needed

Programming

  1. TODO

Building

  1. Navigate to your project's root folder
  2. Run python -m bundle.to_exe to build to an executable in /dist
  3. Run python -m bundle.to_web to build to a play-in-browser package in /build/web/build/web
  4. Instead of typing these commands, you can write batch/shell scripts or set up run configurations in IDEs such as PyCharm to make building more convenient

Uploading to itch.io (optional)

  1. Register or login to an itch.io account
  2. Create a new project
  3. Install butler and add its folder to PATH
  4. On the command line, login to butler with your itch account
  5. Run python -m bundle.upload_to_itch to upload built files to itch.io
  6. Customise your page