
Explore python game development with pygame, from basics to advanced, by building surfaces, drawing, input handling, collisions, and evolving games from Feed the Dragon to Zombie Night.
Download Python from python.org, install it, and add Python 3.8 to your path; the setup installs pip and offers editors like idle or Visual Studio Code.
Install and set up Visual Studio Code for Python, install the Python extension, configure the interpreter, and run a hello world sample to begin coding.
Verify python and vscode setup, install pygame with pip, and explore asset resources—Icon Archive for images, Leshin Labs sound effects maker, and Font's Face for commercial-use fonts for pygame games.
Discover how to access, download, and organize course assets by extracting resource zips and placing images, sounds, fonts, and backgrounds into your project.
Create a pygame display surface that serves as the game window, initialize pygame, and set fixed window dimensions. Run a main game loop, handle events with pygame.event.get, and quit cleanly.
Draw on a pygame display surface using lines, circles, and rectangles with rgb color tuples, then update the display in a game loop.
Load images as pygame surfaces from the same directory, obtain their rects, and blit them to the display surface. Run in the main game loop and update the display.
Learn to display text in Pygame by rendering text surfaces with system and custom fonts, positioning them with rects, blitting to the display surface, and updating the screen.
Explore adding sound effects and background music in a Pygame project by loading audio assets, controlling volume, and sequencing playback with delays and mixer functions.
Learn how to implement discrete keyboard movement in Python with Pygame by moving a dragon image using left, right, up, and down key down events, with a velocity constant.
Move a dragon image with the mouse in pygame by handling mouse button down and mouse motion events, centering the dragon on clicks and enabling drag with the left button.
Implement continuous keyboard movement in pygame by using the key pressed state to move a dragon with velocity, updating each frame via a clock and fps.
Restrict player movement to game window by bounding the dragon sprite with left, right, top, and bottom checks, and implement alternative key mappings for arrow keys and WASD with pygame.
Master collision detection in pygame by using rects and the collide_rect method to detect when a dragon collides with a coin, then relocate the coin randomly to continue gameplay.
Explore preview of feed the dragon: move the dragon up and down on the left to collect coins, increase score, and speed up as you play; restart with any key.
Set up the feed the dragon project in pygame, import dragon and coin assets, initialize the display, and run a 60 fps loop with a score and lives hud.
Learn to set up feed the dragon in pygame: load assets, render text (score, title, lives), configure sounds and music, and render the dragon and coin with a game loop.
In this lecture, dragon moves up and down with arrow keys in the game window as coins move left; misses reduce lives, collisions boost score and speed, and HUD updates.
implement game over logic in a python pygame game by checking lives, displaying game over text, pausing the loop, and handling continue or quit via keyboard and window events.
Preview the game Catch the Clown, where a clown bounces across the screen in random directions, you click to change direction, earn points, and the clock speeds toward game over.
Build a pygame catch the clown game using mouse input, setting up assets, fonts, background, sounds, and a basic game loop with lives, score, and clown movement.
master the catch the clown setup by rendering hud text surfaces, including score and lives, and game over and continue prompts centered on the display.
Develop a catch the clown game loop with background music, moving the clown using velocity and random directions, bouncing off edges, handling clicks, updating score and sounds, and penalizing misses.
Update the hud to render the score and lives after each clown click. Pause on game over, show prompts, then reset score, lives, clown position, velocity, and music on replay.
Preview a Pygame-based snake game, drawing the snake and apple with the draw feature; move the head with arrows, grow on apple, and avoid walls and self-collision for game over.
Build a classic snake game with pygame, drawing the snake and apple as rectangles in a 600 by 600 window, using a single apple-eating sound and a main game loop.
Continue the arcade snake setup by rendering game over and continue prompts, defining apple and head coordinates, and drawing rectangles for the snake and apple with hud elements.
Implement continuous movement for the snake using key down events, update head coordinates, detect collisions with the apple, update score, play sounds, and randomize apple position.
Build a growing snake in python with pygame by adding body segments when the snake eats an apple and following the head, with game over, pause, and restart.
Preview the burger dog arcade game, where burgers fall, you feed a pup to earn burger points, manage lives, boost energy with space bar, and restart after game over.
Create a burger dog game in pygame by wiring assets, fonts, and a main loop with an 800x600 display and a hud showing points, score, burgers eaten, lives, and boost.
Set up burger dog assets in Pygame by rendering orange game over text and final score, loading dog and burger images and sounds, and randomly spawning burgers for HUD loop.
Control a burger dog with arrow keys for continuous movement, boost with space, and manage burgers falling with points based on position and speed; handle misses, collisions, and background music.
Learn how to update and render the hud to show score, lives, and boost in a burger dog game built with pygame, including game over handling and restart logic.
Learn to model multiple on-screen objects with a class blueprint, initialize objects using self, and define methods like eat, bark, and compute age in dog years.
Explore inheritance basics in Python by building a beagle subclass that inherits from a dog class, overriding bark, and adding a hunt method while using super to initialize.
Learn to create multiple game objects by subclassing pygame.sprite.Sprite, then manage and render them all at once with a sprite group that updates and draws every member.
Create a player sprite inheriting from pygame.sprite.Sprite, move with keyboard input, and detect collisions with the monster group to remove monsters during each update.
Explore collision detection between two sprite groups in Pygame, using a game class to manage collisions and group updates for monsters and knights.
Preview the Monster Wrangler game, showing how classes and sprites drive gameplay, where catching the correct monster scores points, you lose lives for wrong encounters, and manage warps and time.
Create Monster Wrangler with Python and Pygame by structuring a game with a player sprite collecting colored monsters, using classes, sprites, and a scalable setup from four to forty monsters.
This lecture guides you to create pygame sprite groups for players and monsters, initialize game objects, and implement a player class with movement, warps, sounds, and reset.
Introduce a monster class inheriting from sprite, initializing with position, image, and type, and moving with random velocity, bouncing at edges. Test monsters demonstrate grouping and type-based collision checks.
Create a pygame game class to manage the player and monster group, handle collisions, initialize assets, and render a hud showing score, lives, and rounds while tracking round time.
Render the hud in Pygame, showing score, lives, round time, warps, and target monster, using blit and rectangles, synchronized with frame count at 60 fps.
Implement collision detection between the player and monsters using pygame sprite collision, verify the monster type, update the score, remove the hit monster, handle round progression, and reset for rounds.
Choose a new target monster after a correct catch by randomly selecting from the current monster group, updating the target type and hud image, and starting a new round.
Finalize Monster Wrangler by resetting score, round, lives, and player, then starting a new round; restrict monsters to the arena and enable player warp via space.
We fix a small error in the Monster Wrangler game by correcting the quit handling in pause game and making the running variable global to ensure the game closes properly.
Preview the arcade classic space invaders recreated in pygame, highlighting player movement and shooting. See aliens move, shift down, speed up with each round, and lives and score guide play.
Set up a Space Invaders clone in pygame by wiring assets, initializing display, and building a multi-class architecture (game, player, alien, bullets), with a real-time loop, collisions, and rounds.
Create and manage sprite groups for a space shooter in Pygame, wiring up a player ship, bullets, aliens, and a game loop to update and draw all objects.
Create a player bullet class that initializes at the ship's coordinates with velocity 10. Fire via the spacebar, adding bullets to the bullet group and enforcing two on screen.
The alien class handles multiple enemies, their grid formation, horizontal movement, and randomized firing, with starting positions, velocity, and a shared bullet group managed by the game class.
Learn how to implement alien bullets in Space Invaders with pygame, including a test fleet, an alien bullet class, a fire method, and bullet group management with off-screen removal.
Create a game class that manages player, alien, and bullet groups, initializes sounds and fonts, and handles update, draw, and starting new rounds in a Space Invaders style game.
Implement edge detection and down-shift mechanics for a Space Invaders wave in Python and Pygame, including edge hits, direction reversal, breach checks, and lives management.
Implement check_game_status to reset bullets, player, and aliens when needed, and determine full game versus round resets. Build a pause_game method that renders messages and waits for Enter to continue.
Learn to implement Space Invaders reset, pause, and collision handling in Pygame: pause and display final score, reset lives and groups, and start new rounds with bonuses.
Design a tile map for a platformer in pygame using 32 by 32 tiles to create a 960 by 640 window and a 30 by 20 grid.
Design and render a Pygame level by implementing a tile class, a 2D tile map, and sprite groups (main, dirt, grass, water), drawing 32-pixel tiles over a background.
Create a player class using a two dimensional vector to track position, velocity, and acceleration, spawn from the tile map, and enable gravity-based movement with ground contact for jumping.
Apply a robust 2d vector based movement system using position, velocity, and acceleration. Use horizontal acceleration and friction to shape movement, updating velocity and position by vector addition.
Apply gravity as vertical acceleration in a 2d system, separating horizontal movement with friction. Handle grass and water collisions using sprite collide, adjust position to tile tops, and zero velocity.
Implement jumping and wrap around movement in a Python and Pygame platformer. Use spacebar to jump with gravity, collide with grass tiles, and wrap around screen edges.
Learn to implement sprite animation in a Python and Pygame platformer by loading run and idle frames, flipping for left direction, scaling assets, and controlling speed with movement.
Implement pixel-perfect collisions by creating and drawing the player's mask and tile masks, and switch to sprite collide mask for precise checks, precomputing tile masks for performance.
Have you learned the fundamentals of Python and then asked yourself; what's next?
If so, consider taking this course which will start you on your journey to making your own playable, fun, and rather addicting video games using Python and the Pygame library.
So often, when students ask for advice they are told to, "Go build something" or "Get involved on a project" but have no idea what projects to build or get involved in.
This course will set you on your way! In this course I will walk you though, step by step, on how to to design the layout and the functionality of 7 unique, engaging, and most importantly, FUN games. By the end of this course, I promise that you will be coming up with your own game ideas and feel confident enough in your abilities to create them.
In my experience teaching computer science, students tend to flourish under the basics but hit a wall when we approach object oriented programming. The shift to using Classes as a way to structure code is difficult and often times students don't have enough exposure to meaningful examples of how to use Classes to help make complex code more efficient. I believe by the end of this course, you will understand how to use classes.
This course is designed in such a way that NO KNOWLEDGE OF CLASSES is needed to start! We will begin by learning the fundamentals of the Pygame library and video game design concepts as we move onto making 4 very fun arcade style games.
We will then review/teach concepts of classes and inheritance in Python as they are crucial tools to help us take our games to the next level using Sprites and Sprite Groups. We will spend some time learning more intermediate concepts such as how to use sprites, sprite groups, and various sprite collision detection methods as we move onto making 2 intermediate level games.
The third portion of this course will focus on more advanced topics such as creating a tile map and using/reading it to create more complex level designs, using 2 dimensional vectors to aid with more complex player movement such as running and jumping under forces of friction and gravity, and adding character animations to make our games really come to life! We will use these more advanced concepts as well as all of our previous knowledge to make one last game that will be a great final project for you to show off!
I'm really proud of this class. I really believe it not only is a great learning experience but it is also A LOT OF FUN! I hope you consider joining and taking part in the learning.