
In this introduction to pygame, learn how Python enables you to start programming video games quickly, avoid boilerplate, and explore minigames as you gain experience.
Learn to download and install the PyCharm community edition on Windows. Configure a Python interpreter and virtual environment, create projects, and install packages like pygame.
download Visual Studio Code on Windows, install the Python extension, and run Python files with the play button or terminal to see hello world.
Install python on a linux machine, update packages, and verify python3 using the shell. Import modules like random and math, and install libraries with pip for game development.
download PyCharm on Linux, choose between community and professional editions, create a Python project, set the interpreter, and install libraries like pandas via the project interpreter.
Explore the Python official documentation, learn to navigate modules like math, and use built-in tools to build robust games and apps with Python.
Learn to create and use variables in Python, including assignment with assignment operator, data types like integers, floats, strings, booleans, and naming rules such as case sensitivity and avoiding keywords.
Explore Python data types, including strings, sets, and numbers, and how dynamic typing works. Learn string immutability, basic slicing, and int, float, complex, plus list and dictionary.
Explore Python data types—lists, dictionaries, tuples, and sets—create and access them using indexing and slicing, and compare lists to arrays while handling multiple data types.
Explore Python's operators and operands, including floating point and floor division, addition, subtraction, multiplication, exponentiation, and multiple assignment; use operator and math modules for sqrt, trig, and degree conversions.
Explore boolean operators in Python, including and, or, not, and their truth tables. Learn operator precedence with parentheses, exponential operations, multiplication, division, and addition/subtraction through practical examples.
Explore how to write clear comments in Python, differentiate single-line and multi-line comments, and capture user input with prompts, then cast strings to integers for arithmetic.
Explore what modules are, how to create your own modules, import and use them, and how built-in modules like math and random work in Python.
Master Python lists as dynamic, mutable arrays by creation, append and extend, pop and remove, reverse and sort, indexing and slicing (negative), copying, and membership checks with in, all, any.
Create and update python dictionaries using curly braces or dict(), map keys to values for lookups, and access data with keys and nested lists like apple 50 and banana 60.
Master python indentation by learning how whitespace defines blocks for functions, conditionals, and loops, improving readability and preventing errors in your code.
Explore the while loop in python, learn how to set conditions, control iterations, and use break and continue to manage loop execution.
Explore for loops in Python, iterating over lists, strings, dictionaries, and ranges; learn loop control with break, continue, nested loops, and using enumerate for index-value pairs.
Explore user defined functions in Python by defining with def, passing parameters, returning values, and using *args and **kwargs to pack and unpack arguments for reusable, modular code.
Explore default and optional arguments in Python functions, including how defaults work. Learn the rule that non-default arguments follow defaults and how to pass a list as an argument.
Learn how Python's lambda expressions create anonymous in-line, one-line functions, handling zero, one, or arbitrary arguments (args and kwargs), and apply simple map and reduce-style operations.
Master functional programming in Python by using lambda expressions, map, reduce, and filter to decompose problems into functions and process collections efficiently.
Explore how Python iterators are objects that yield one element at a time. Learn to implement __iter__ and __next__ and handle StopIteration to reveal the iterator protocol.
Explore how generators in Python reduce the overhead of iterators, using yield to produce values lazily, compare generator expressions with list comprehensions, and implement practical examples like reversing a string.
Learn how Python decorators take a function as an argument to add functionality and modify behavior, a metaprogramming technique used in web development and for logging.
Master Python list and dictionary comprehensions by transforming iterable elements with expressions inside a for loop, with optional if conditions, all in concise one-line constructs.
Discover object oriented programming in Python by building classes and objects, defining attributes and methods, and using constructors, self, and class, static, and bound/unbound methods.
Explains basic inheritance in Python, showing derived classes using a base class with super(), and demonstrates rectangle and square with area and perimeter, plus monkey patching to extend classes.
Explore multiple inheritance in Python by combining classes, overriding methods, and using super to access base class behavior. Learn practical patterns with foobar and bar examples.
Explore polymorphism in Python driven by dynamic typing, where the same method acts differently in dog and person classes through a shared interface.
Explore python object oriented programming properties by building a game character with read only attributes. Implement health logic with damage and health potions, and use is_alive, is_wounded, and is_dead properties.
Explore operator overloading in Python by implementing magic methods to extend operators like plus and minus, enabling vector and object addition for game development.
Learn exception handling in Python with try, except, finally, and re-raise techniques. Debug with logging and manage multiple exceptions like key errors and attribute errors.
Master Python file handling: open files with the with statement, use read, write, and append modes (rb, wb), handle exceptions, and iterate directories to process multiple files.
Learn how Python defines the __name__ variable before executing code. See how a module runs as main or is imported by another module.
Explore the python math module for game development: learn rounding (round, floor, ceil, trunc), trigonometry (radians and degrees), sqrt-based hypotenuse, pow, and handling infinity and not a number.
Explore Python's collections module to optimize data handling with high-performance structures. Use Counter for frequency analysis and deque for fast, flexible double-ended queues with list-like operations.
Master the Python os module to create, rename, and remove directories, query the current working directory, join paths, and manage file permissions across platforms.
Learn game development with Python by building mini games and exploring event handling. See sneak peeks of projects like Bakhmina and Dods and gain practical library guidance.
Learn game development with the turtle module in Python, build minigames, and preview a revised scheme using the Bigham module, while exploring essential turtle methods and screen setup.
Explore vector-based computation and operator overloading via magic methods in Python, using a data model to implement minigames and draw lines and squares with turtle graphics.
Explore a two dimensional vector class in Python for game development, using x and y coordinates to track position and movement.
Learn to build a snake game layout and implement movement using vector operations, with the snake body and food represented by squares, controlled via on key events and speed adjustments.
Build a Python snake game capstone by implementing event-driven movement on a 420 by 420 screen and rendering the snake as green squares, moving the head every 100 ms.
Create a Pacman game world by rendering a tile-based map from a 0/1 matrix using the total module, placing Pacman and four ghosts, and adding dot food at tile centers.
Implement Pacman movement by validating moves against the grid, updating Pacman position on arrow key input, and rendering Pacman along with eaten-dot tiles, using a timer-driven loop.
Render each ghost at predefined positions in the Pacman capstone, assign directional vectors, validate moves against blue tiles, avoid black tiles, and randomly choose valid moves.
Learn to use the pygame module, install and import it, create a game window, draw a rectangle, handle events and keyboard input, and move with arrow keys.
Learn how frame rate governs smooth motion in pygame by using a clock to cap updates at 60 frames per second, keeping the rectangle within the boundary.
Load images and sprites with pygame by initializing the display and loading a ball image from the project. Render it with blit and flip at a controlled frame rate.
Implement responsive car movement in pygame by stopping on key release, render and recycle enemies at random x, and scale difficulty with score via faster speed and bigger enemies.
Learn to implement collision detection and boundary handling in a Pygame car dodge game, including x-boundary checks and car width to restart after a crash.
Build a pacman style game in pygame by defining wall, food, and player, loading assets from resources, and enabling event handling and ghost movement.
Build the Pacman level by creating player and ghost classes, rendering walls, gates, and food in a sprite group, and implementing movement tracks.
Build a pygame Pacman capstone by creating a main game model that sets up the screen, loads hero and ghost sprites, and runs a game loop with movement and drawing.
Render ghosts, apply random ghost movement, and flip Pacman's mouth with direction, while preventing wall passage by resetting to the previous position on collision.
Implement automatic ghost movement in a pacman-style game by using movement tracks, track location indexing, and speed control, handling collisions with walls and gates.
Finish a Pygame Pac-Man capstone by finalizing movement, ghost tracking, food collision scoring, font-based score display, and music with Pygame mixer.
Explore basic maths for balloon movement in a Python game, using sine and cosine with an angle of rotation to compute x and y in a top-left Pygame coordinate system.
define the balloon class for a python pygame balloon shooter game, setting width, height, x and y position, speed, angle, color, and wire length with randomization.
Render a balloon by drawing three parts—a fluffy ellipse, a rope line, and a tying ellipse—using the balloon center and width to set the endpoints.
Create and render balloons in a Python game loop using ellipse shapes, random colors, and coordinates; learn to manage movement, a rope tying the balloon, and boundary collisions.
Learn to manage balloon boundary collisions in a game: detect left, right, top, and bottom hits, bounce balloons back, and reset with new positions and adjusted speed.
Implement a shooter pointer in a python game by rendering a central ellipse with four lines that follow the mouse cursor, creating a green laser to aim at balloons.
Burst the balloons teaches you to detect mouse clicks on balloons in a pygame game, call a burst function when clicked, and pop balloons to increase the score.
Improve user feedback by turning the pointer red when aiming at a balloon, using a balloon check to update the pointer color dynamically to indicate proper aiming.
Load a system font and render the score on a bottom platform by converting the score to a string and displaying it next to a balloons bursts label.
Build a 10x10 grid chain-reaction game from scratch, with multiplayer atoms and mouse input. Show overflow when four atoms disintegrate and trigger chain reactions, ending with the last player standing.
Explore basic math for chain reaction games by outlining x and y axes and movement using sine and cosine of the rotation angle for smooth motion.
Create a grid-based chain reaction game in Python using pygame, define a grid of spots with colors and neighbors, and implement neighbor logic to handle atoms and overflow.
Initialize a 10x10 grid of 40-pixel blocks, set up global grid and players with colors, and render the board by drawing lines and handling pygame events.
Create and run the game loop to initialize the grid, update the display, and place atoms by mouse clicks in a 10x10 grid with 40-pixel blocks.
Create a 10 by 10 grid in pygame, handle mouse clicks to select cells, and render atoms as ellipses inside those cells based on grid state.
Render two atoms in a grid cell by drawing two centered ellipses with side-by-side offsets, using atom colors, and updating the display.
Implement overflow handling in a grid-based game by disintegrating atoms when a cell with four items reaches the neighbor limit, resetting the current cell, and propagating effects to neighboring cells.
Add a vibration parameter to animate grid atoms, passing it into the render function to fluctuate atoms along the x axis and enhance interactivity before wrapping up the game.
Develop an eight-ball pool game from scratch in python, modeling 15 balls, pockets, the cue ball, and a mouse-controlled stick with a game loop and collisions.
Learn to move game objects in 2d space using speed and angle, compute x and y with cos and sin, and apply slope and distance formulas for collision in pygame.
Create a python pygame project to build an eight ball pool game, configure the interpreter, install pygame, set up the display, define colors, and outline game objects and a clock.
Create a ball class with position, speed, color, angle, radius, friction, and ball number; initialize sixteen balls (including the cue ball) and render them as ellipses with pygame.
Create and render the pool table pockets (six) and cue ball using a pocket class, ellipse drawings, and a pygame-based game loop with event handling.
Create ball class objects arranged in a triangular format for 1 to 15 balls, start at 70, use radius to prevent collisions, assign colors, and keep rotation at zero.
Render fifteen balls in a triangular layout by looping through ball list and drawing each ball at its position with reset that repositions them, preparing for stick and collision features.
render the ball numbers on each pool ball, center the digits, and adjust for two-digit numbers; apply white text on black balls while keeping the white cue ball unnumbered.
Learn to add a cue stick to a Python Pygame pool game by calculating rotation from the cue ball to the mouse, drawing the stick and guiding line.
Master 360-degree ball movement in a Python game by applying force, computing x and y velocity from speed and angle using sine and cosine, and handling friction and bounces.
Learn to handle mouse events and apply force to the cue ball via the cue stick using the distance formula, enabling ball movement in a Python-based pool game.
Learn to implement collision detection and response for a billiard-style game by calculating distances, radii, angles, and resulting speeds for the cue ball and other balls.
Learn how to model normal ball and cue ball collisions by computing post-collision speeds and directions using angle calculations, tangents, and degree-to-radian conversions, enabling 2d billiard-style ball movement.
Learn to detect cue ball collisions with other balls, handle ball-to-ball collisions with nested loops, and compute collision angles using slope and trigonometry to update speeds and positions.
Implement collision detection between balls and pockets using the distance formula and pocket radius, score and remove balls when they collide with the six pockets.
Master collision handling and game loops while building a space shooter in Pygame, creating game objects, importing sound, and enabling player movement in all directions.
Create the player object in a pygame shooter by setting up project, configuring the Python interpreter, and using a sprite with rects, subsurface images, and a bullets group alongside enemies.
Learn to build a Pygame game loop that renders a background, updates the player, uses a clock for smooth frame rate, and handles keyboard input for left and right movement.
Implement collision handling between bullets, enemies, and the player to remove hits, trigger enemy destruction with an explosion animation, cause player death on enemy contact, and update the score.
Render the score at the top-left during gameplay, increase it on each collision, and display a game over screen with the final score centered on the screen in red font.
Explore building a nimble non-player character with artificial intelligence that competes with human players in a snake-like game, selecting the most beneficial move.
We create a frog class to serve as the snake's food, load its resources, render its image on the surface, and initialize its 44-pixel size and position.
Learn to build a game loop and an app class in Python, initializing screen size, player and frog objects, loading images, handling events, and updating rendering.
Learn to implement collision detection in a Python snake game by checking x and y overlap, handling frog eaten, growing the snake, and updating game objects in the main loop.
Have you ever wanted to build a game with a graphical interface but didn't know how to? Maybe you even know how to create tools on a command line but have no idea how to convert it into a graphical interface that people can click on. In this course, we will be learning Python GUI Programming + Turtle + other advanced python modules to build graphical user interfaces (GUI) and games from scratch.
Game projects covered:
1. 8 Pool Ball
2. Balloon Shooter
3. Chain Reaction
4. Space Shooter
5. Car Racing
6. Angry Bird and many more.
Basic Python course Highlights:
Installing Python
Running Python Code
Strings
Lists
Dictionaries
Tuples
Sets
Number Data Types
Print Formatting
Functions
Scope
args/ kwargs
Built-in Functions
Debugging and Error Handling
Modules
External Modules
Object-Oriented Programming
Inheritance
Polymorphism
Encapsulation
Advanced Methods
Iterators
Closures
and much more!