
Learn python by making four games: an asteroid shooter, a Frogger-style game, a top-down shooter, and a Contra-like game, with exercises, a level editor, and daily instructor support.
Explore how Python compares to other languages, its high level of abstraction and flexibility, and how starting with Python can lead to versatile project work and easy language migration.
Install python on your computer or run it online to print hello world, then download from python.org, add to path, and run python code on Windows or Mac.
Install and customize Sublime Text to write and run Python code, save files with a .py extension, and adjust styling with themes and fonts for a cleaner coding experience.
Explore how Python executes code from top to bottom, using print statements to run basic lines, and learn how whitespace and empty lines affect output while arranging code for clarity.
Master python math operations, including plus, minus, multiply, divide, power, floor divide, and remainder, using brackets and precedence; explore comparison operators and practice computing the average of 1 to 7.
Learn to use Python string methods on objects with dot notation, compare methods to functions, and apply upper, title, strip, is alpha, and replace.
Learn how to use comments in Python to explain and organize code, and to remind yourself, using # and triple quotes, with tips to comment multiple lines efficiently.
Explore strings in Python by using single or double quotes, escaping quotes, and writing across lines. Learn string concatenation, formatting with format and f-strings, and inserting variables.
Explore Python lists and tuples as containers, compare mutability, and learn indexing and slicing to access elements. Practice list methods like append and clear, and know when to use them.
Explore how strings, lists, and tuples act as interchangeable containers; convert between them with split, list, and join, and practice indexing, slicing, and type conversion.
Explore sets in Python as containers that guarantee unique values, learn how to add and remove elements, convert to lists for indexing, and use union, intersection, and difference.
Explore Python’s broader data types, focusing on the most common types, type conversion functions, and the role of none and sequence types, while noting several rare, specialized kinds.
Explore how Python controls program flow through indentation and four major concepts—if/elif/else, match, while, and for loops—plus how blocks relate to conditions and repeated execution.
Learn to build complex if statements in Python by combining conditions with and and or, and by nesting if statements to create multi-level decision logic using lists, booleans, and variables.
Explore functions as reusable blocks of code, learn how to define and call them, pass parameters and arguments, and build a basic calculator with plus and minus operations in Python.
Learn how to define and call Python functions with parameters and arguments, explore positional and keyword arguments, default values, and using f-strings for output.
Learn to design Python functions with unlimited arguments using list unpacking and keyword unpacking, printing and processing args and kwargs, including dictionaries and tuples.
Explore functions and scope in Python by distinguishing local and global variables, using parameters and return to manage values, and avoiding global where possible to keep code organized.
Document functions using docstrings and type hints to clearly describe parameters, return values, and defaults. See how to access documentation with __doc__ and help.
Explore advanced data operators in Python, manipulate data, and learn looping over data, sorting, list comprehension, and data handling for importing and exporting data.
Define a Monster class with camel case naming, set health and energy, instantiate objects, implement attack and move with self, then explore scope, instance-specific values, and tandem methods.
Learn that in Python everything is an object, including strings and functions, and understand the difference between a function and a method.
Master simple inheritance as a shark inherits health, energy, and methods from a monster, enabling code reuse; override move and attack, and use super for init.
Explore external modules in Python, created by other programmers, to boost game development, data analysis, machine learning, and GUI work. Install them with pip in PowerShell or the terminal.
Organize your Python project by creating custom modules saved in separate files and importing them into the file, build a sum calculator that accepts unlimited arguments and prints the result.
Learn practical Python error handling with try, except, else, and finally, raise and assert statements, and handle zero division errors, name errors, and index errors.
Learn how Python decorators wrap functions to add before and after behavior, with examples for testing, timing, repetition, and using property to manage class attributes.
Learn how Python's eval and exec convert strings into code, understand their differences, see practical examples, and review the security risks of running arbitrary user input.
I will explain how to install pygame in the next section. Although, in short, all you need is the powershell or the terminal and type
pip install pygame
or
pip3 install pygame
(for macOS)
However, python 3.11 was released recently and pygame is not fully supported yet which can cause errors on some systems. This can be fixed easily though by adding "--pre" to the install line.
So the proper line should be
For windows
pip install pygame --pre
For macOS
pip3 install pygame --pre
This course builds an asteroid shooter to teach pi game basics, first without classes and then with classes. Learn how games render frames through input, updates, and draw steps.
Create a blank window by initializing the pie game, establishing a display surface with width and height, and running a while-true game loop to handle input, updates, and rendering.
Place elements on the display surface using a top-left origin, with x to the right and y downward. Compute the right edge by 1280 minus surface width and use get_width.
Learn to handle mouse and keyboard input in pygame, using event loop or the mouse module, with mouse motion and button events to control a ship that follows the cursor.
Track elapsed time with get_ticks and display it as the score. Build a laser cooldown timer with can_shoot, shoot_time, and a duration in the game loop.
Detect collisions by checking rectangle overlaps between ships, meteors, and lasers. Compare this method with pixel perfect collision, which is more precise but heavier to compute.
Add sound to your python game using pygame mixer to load laser, explosion, and background music. Learn to play sounds, set looping, and trigger explosions on collision.
Learn the world's most popular programming language by making games!
This course includes an incredibly comprehensive, yet easy to follow, introduction to Python and uses that knowledge to create 4 sophisticated games using pygame. By the time you finish these projects you will have a strong understanding of Python and of coding in general. You will also have amazing projects for your portfolio.
The course contains over 130 videos and includes a huge amount of exercises so you can practice while you code along. You can also find the code for every video attach in the course. The course will start completely from scratch and I will begin by installing Python on Windows or MacOS; or you can use an online code editor. If you are in doubt, the entire first 11 hours are freely available both here on Udemy and on YouTube.
This course is going to cover every topic of Python, for example:
All of the datatypes (integers, strings, floats, booleans, lists, tuples, dictionaries etc)
You will learn classes and object-oriented programming
Inheritance, both simple and complex will be covered in detail
You will learn how to control the flow of the code using if, while, for and match
You will learn about functions and how to pass information around
There are many sections on scope to keep your code organized
Decorators will be covered in depth
File handling will be used
Python is one of the most desirable features on the job market and can get you into well-paying and interesting jobs. It is also a very easy to learn language that you can use as a starting point in your coding career. I am looking forward to seeing you in the course!