Python Lessons and Tutorials

While the majority of our classes are held in-person - there's no substitute for the classroom teacher-student interaction - we have created a number of online tutorials to help get started or to help students review what they've learned in class.

All lessons are available on our YouTube channel, and we're also adding text-based versions of every lesson for those that prefer reading over watching. Read on to see what's available.

Please consider supporting these lessons:

Game Development with Pygame

If you're interested in game development, this is the place to start. We'll introduce you to Pygame, the Python-based game library, and show you how to get started.

Shmup game in action!

Pygame Tutorial #1: Shmup (Space Shooter)

Your first Pygame project! Follow along step-by-step as we build a space shoot-em-up (aka "Shmup"). Each lesson, we'll add one feature to the code until we have a fully working game! Some of the things you'll learn how to do:

  • Player Controls (keyboard)
  • Handling Collisions
  • Sprite Animations
  • Sound and Music
  • Ending the game (and restarting)

Keep on jumping!

Pygame Tutorial #2: Jumpy Platformer (Doodle Jump style)

Ready to jump to the next level? (see what we did there?) In this project, we'll step up our game, using some more advanced methods and Pygame features to build a "Doodle Jump" style platformer. Some of the new techniques we'll learn:

  • Saving the high score
  • Simulating gravity and friction
  • Using spritesheet graphics
  • Pixel perfect collisions
Tutorial (click for text version) Video Link
Pygame Platformer Part 1: Setting Up Coming Soon
Pygame Platformer Part 2: Player Movement
Pygame Platformer Part 3: Gravity and Platforms
Pygame Platformer Part 4: Jumping
Pygame Platformer Part 5: Scrolling the Window
Pygame Platformer Part 6: Game Over
Pygame Platformer Part 7: Splash & End Screens
Pygame Platformer Part 8: Saving High Score
Pygame Platformer Part 9: Using Spritesheets
Pygame Platformer Part 10: Character Animation (part 1)
Pygame Platformer Part 11: Character Animation (part 2)
Pygame Platformer Part 12: Platform Graphics
Pygame Platformer Part 13: Improved Jumping
Pygame Platformer Part 14: Sound and Music
Pygame Platformer Part 15: Powerups
Pygame Platformer Part 16: Enemies
Pygame Platformer Part 17: Using Collision Masks
Pygame Platformer Part 18: Scrolling Background
Pygame Platformer Part 19: Wrapping Up


Pygame Tutorial #3: Tile-based Game

The latest Pygame tutorial series tackles the concept of tile-based games, where the game world is based on a grid of tiles, including ideas like scrolling maps, pathfinding, enemy AI, and more.

Tutorial (click for text version) Video Link
Tile-based game Part 1: Setting up Coming Soon
Tile-based game Part 2: Collisions and Tilemap
Tile-based game Part 3: Smooth Movement
Tile-based game Part 4: Scrolling Map / Camera
Tile-based game Part 5: Player Graphics
Tile-based game Part 6: Rotating Player Sprite
Tile-based game Part 7: Mobs
Tile-based game Part 8: Mob Movement
Tile-based game Part 9: Basic Shooting
Tile-based game Part 10: Player and Mob Health
Tile-based game Part 11: Tiled Map Editor
Tile-based game Part 12: Loading Tiled Maps
Tile-based game Part 13: Map Obstacles
Tile-based game Part 14: Better Zombie Movement
Tile-based game Part 15: Simple Visual Effects
Tile-based game Part 16: Items
Tile-based game Part 17: Tweening
Tile-based game Part 18: Sound Effects
Tile-based game Part 19: Pause Screen
Tile-based game Part 20: More Weapons
Tile-based game Part 21: Damage Effect
Tile-based game Part 22: Game Over

Game Development In-Depth

"In-depth Topics" will explore and explain a little more deeply certain subjects that may be tricky for new programmers to understand, or that may not quite fit into the usual tutorial structure. Most will likely be math related, but they may also cover other topics that come up or are requested by viewers.

Tutorial (click for text version) Video Link
Gamedev In-depth Topics: 4-way vs. 8-way Movement
Gamedev In-depth Topics: Time-based vs. Frame-based Movement
Gamedev In-depth Topics: Non-integer Movement
Gamedev In-depth Topics: Steering Behaviors (Seeking)
Gamedev In-depth Topics: Steering Behaviors (Wander)
Gamedev In-depth Topics: Steering Behaviors (Flee)
Gamedev In-depth Topics: Pathfinding Part 1
Gamedev In-depth Topics: Pathfinding Part 2: Breadth First Search
Gamedev In-depth Topics: Pathfinding Part 3: Finding Shortest Path
Gamedev In-depth Topics: Pathfinding Part 4: Dijkstra's Algorithm
Gamedev In-depth Topics: Pathfinding Part 5: A* Search