Pygame Guide for Sneks


Home | GitHub | Pygame Docs


Project maintained by pygame-guide-for-sneks Hosted on GitHub Pages — Theme by mattgraham


Introduction

"Where can I learn how to use pygame?" - one of the most commonly asked questions that I get. But we always struggle to answer. We sometimes point them to the docs and examples, but that isn't a comprehensive guide on building good pygame-based applications. There are many other tutorials and guides we have found, but we always find something lacking. There are many comments we give and many nitpicks we have - so much so that some of us gathered and decided to put all of them into a book. This book.

Table of contents

Working towards a simple platformer

  1. Base setup and opening a window
  2. Drawing shapes
  3. Moving things
  4. Loading images and drawing them
  5. Using classes to better contain our code
  6. Loading and playing audio files
  7. Making a small game to demonstrate how these go together

Important topics

  1. Fonts in pygame
  2. Colors in pygame

Obscure but useful things

  1. PixelArray
  2. Blend modes
  3. pygame.display.set_mode flags

Useful Stuffs

You can visit the pygame documentation to find the full list of functions and other information about the Pygame library.

Pygame Examples

Want to contribute to this guide or did you find a problem? Visit us here!

Created by the Pygame Guide for Sneks Organization