Game Programming with Python and PyGame

Get an introduction to Python and Pygame.
Course info
Rating
(87)
Level
Intermediate
Updated
Dec 18, 2013
Duration
4h 18m
Table of contents
What is PyGame?
Hello World in PyGame
From Idea to Game, Collecting all Ideas and Resources
Setting up the Architecture of the Game
Creating the Game Objects
Creating the Game Logics
Creating Random Levels
Finalizing the Game
Description
Course info
Rating
(87)
Level
Intermediate
Updated
Dec 18, 2013
Duration
4h 18m
Description

In this course we’ll look at how we can use Python to create a 2D game. To solve this we would use PyGame which makes it easy to both understand the very basics of game programming and python. By analyzing how we create a breakout game (ball that bounces onto bricks) from 0 to 100, we will get a good sense of how we can use Python and PyGame together. At the end of the course we will have a playable breakout game that we’ve written from start to stop using Python together with PyGame.

About the author
About the author

Filip is an enthusiastic developer that strives to learn something new every day. His greatest passion is programming and ever since Filip was a little boy he has always strived to master it. All his community contributions has made Filip a Microsoft Visual C# MVP and a DZone Most-Valuable Blogger.

More from the author
Dates and Times in .NET
Beginner
1h 17m
Jul 16, 2019
More courses by Filip Ekberg
Section Introduction Transcripts
Section Introduction Transcripts

What is PyGame?
Hi. This is Filip Ekberg, and welcome to this course on Game Programming with Python and PyGame. In this first module, we're going to talk about what PyGame is, and why we're going to use this in the course. Don't worry if you don't have any prior experience with Python. If you come from other programming languages, then this is a perfect opportunity to get a crash course in Python.

Hello World in PyGame
Hi. This is Filip Ekberg, and you're watching Game Programming with Python and PyGame. In this module, we're going to take a look at how we can start using PyGame in our Python applications. We're going to do that by exploring PyGame through different demos.

From Idea to Game, Collecting all Ideas and Resources
Hi. This is Filip Ekberg, and you're watching Game Programming with Python and PyGame. In this module, we're going to talk about what we need to do before we start coding our game, such as collecting all our ideas and resources, and managing that. And we're going to take a look at some tools that will help us create graphics and audio for our games.

Setting up the Architecture of the Game
Hi. This is Filip Ekberg, and you're watching Game Programming with Python and PyGame. In this module we're going to talk about setting up the architecture of our game, and we're going to go over the class diagram that we're going to use when we are implementing our game, and we're going to talk about some of the things that might pose problems when creating this game, and talk about the best ways to solve those problems.

Creating the Game Objects
Hi. This is Filip Ekberg, and you're watching Game Programming with Python and PyGame. In this module, we're going to start going over how we can create the different game objects that we are going to have inside our game, and how we can start tying these together. And throughout this module, we're going to see how the game evolves into becoming something interesting.

Creating the Game Logics
Hi. This is Filip Ekberg, and you're watching Game Programming with Python and PyGame. In this module, we're going to move on from looking at the fundamental building bricks inside our game, to introduce some game logic. We're going to make the ball bounce, and we're going to have the ball bounce off the walls, off the bricks, and when hitting the bricks, we're going to increase the score, and when we are below the pad, we're going to decrease the lives, and restart from that position. So we have a lot of interesting things to look at throughout this module.

Creating Random Levels
Hi. This is Filip Ekberg, and you're watching Game Programming with Python and PyGame. In this module, we're going to talk about randomizing your levels. We want to keep our players interested in playing our games. And one way of doing that is randomizing levels, and making it more fun for the player to come back to the same game over and over again. We're also going to talk about things like how not to make it as good as possible in the sense of adding too many Life bricks, or adding too many Speed bricks. As we've seen before, adding too many Speed bricks can have a really fun effect, although it might not be the effect that we want to have inside our game.

Finalizing the Game
Hi. This is Filip Ekberg, and you're watching Game Programming with Python and PyGame. In this module, we have reached the final step in creating our game. We're going to start looking at how we can finalize the game, and looking at the small pieces that we need to add to the game to make it even more interesting. And of course, talking about things like adding sound in our game. Adding and changing level. Adding a nice start menu that introduces the game, and lets us decide either to look at the highscore, or actually starting a game from the start menu. So let's go ahead and look at the final pieces that we need to go into to finalize our game.