The Art of Doing: Video Game Creation with Python and Pygame

Video description

Have you learned the fundamentals of Python and then asked yourself: what’s next? Then this course is for you.

We’ll begin by learning the fundamentals of the Pygame library and video game design as we move on to making four incredibly fun, arcade-style games called Feed the Dragon, Click the Clown, Snake, and Burger Dog.

We will then proceed to the concepts of classes and inheritance in Python, which are crucial tools for taking our games to the next level using Sprites and Sprite Groups. If, you have not worked with classes before, you need not worry, we’ve got you covered. 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 on to making two intermediate-level games called Monster Wrangler and Space Invaders.

The third part of this course focuses 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 movements 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 apply these concepts as well as all our previous knowledge to make one last game called Zombie Knight, which is the final project.

By the end of this course, you will be able to put forward your own game ideas and feel confident enough in your abilities to create them.

What You Will Learn

  • Learn to use classes and inheritance to organize complex codes
  • Create surfaces, blit images, render text, handle user input, and more
  • Work with sprites, sprite groups, and more robust collision methods
  • Create tile map and read a tile map to design a game level
  • Use 2-dimensional vectors to handle complex platformer motion
  • Use collision masks to have pixel-perfect collisions when needed

Audience

This course is designed for beginner Python developers who are curious about video game design and the Pygame library or looking to strengthen their understanding of classes and how they can be used in larger projects or have a love for classic arcade-style games.

A basic understanding of programming concepts such as variables, lists, loops, and conditionals is required as these won‘t be covered in the course.

In the second half of the course, we will be switching to using classes extensively. We will spend some time reviewing and learning the topics of classes and inheritance, although prior knowledge may be helpful.

About The Author

Michael Eramo: Michael Eramo is a dedicated lifelong learner, experienced educator, and self-taught programmer. With official bachelor’s degrees in music, education, and physics, as well as a master’s in mathematics, he brings a diverse skill set to his teaching. As a Microsoft certified software developer, Michael has years of experience as a high school physics and computer science teacher, as well as a college mathematics teacher. He is also an esteemed member of the New York State Master-Teacher Program, a network of over 800 outstanding public-school teachers who share a passion for STEM learning and collaborate to inspire the next generation of STEM leaders.

Table of contents

  1. Chapter 1 : Setup and Installation
    1. Course Preview and Introduction
    2. Installing Python
    3. Installing Visual Studio Code
    4. Installing Pygame and Asset Gathering
  2. Chapter 2 : Basic Pygame Tutorial
    1. Creating a Display Surface
    2. Drawing on a Display Surface
    3. Blitting (Copying) Images
    4. Blitting (Copying) Text
    5. Adding Sound Effects and Music
    6. Discrete Keyboard Movement
    7. Mouse Movement
    8. Continuous Keyboard Movement
    9. Movement Restrictions and Alternative Keymapping
    10. Collision Detection
  3. Chapter 3 : Game #1: Feed the Dragon
    1. Feed the Dragon Preview
    2. Feed the Dragon Setup 1
    3. Feed the Dragon Setup 2
    4. Feed the Dragon Gameplay 1
    5. Feed the Dragon Gameplay 2
  4. Chapter 4 : Game #2: Catch the Clown
    1. Catch the Clown Preview
    2. Catch the Clown Setup 1
    3. Catch the Clown Setup 2
    4. Catch the Clown Gameplay 1
    5. Catch the Clown Gameplay 2
  5. Chapter 5 : Game #3: Snake
    1. Snake Preview
    2. Snake Setup 1
    3. Snake Setup 2
    4. Snake Gameplay 1
    5. Snake Gameplay 2
  6. Chapter 6 : Game #4: Burger Dog
    1. Burger Dog Preview
    2. Burger Dog Setup 1
    3. Burger Dog Setup 2
    4. Burger Dog Gameplay 1
    5. Burger Dog Gameplay 2
  7. Chapter 7 : Intermediate Pygame Tutorial
    1. Class Basics
    2. Inheritance Basics
    3. Sprites and Sprite Groups
    4. Sprite Collide
    5. Group Collide
  8. Chapter 8 : Game #5: Monster Wrangle
    1. Monster Wrangler Preview
    2. Monster Wrangler Setup
    3. Monster Wrangler Player Class
    4. Monster Wrangler Monster Class
    5. Monster Wrangler Game Class 1
    6. Monster Wrangler Game Class 2
    7. Monster Wrangler Game Class 3
    8. Monster Wrangler Game Class 4
    9. Monster Wrangler Game Class 5
    10. Monster Wrangler Fixing a Small Error
  9. Chapter 9 : Game #6: Space Invaders
    1. Space Invaders Preview
    2. Space Invaders Setup
    3. Space Invaders Player Class
    4. Space Invaders Player Bullet Class
    5. Space Invaders Alien Class
    6. Space Invaders Alien Bullet Class
    7. Space Invaders Game Class 1
    8. Space Invaders Game Class 2
    9. Space Invaders Game Class 3
    10. Space Invaders Game Class 4
  10. Chapter 10 : Advanced Pygame Tutorial
    1. Creating a Tile Map
    2. Designing a Level
    3. Using 2 Dimensional Vectors for Player Movement Part 1
    4. Using 2 Dimensional Vectors for Player Movement Part 2
    5. Adding Gravity
    6. Adding Jumping and Wrap Around Movement
    7. Sprite Animation
    8. Collision Masks
  11. Chapter 11 : Game #7: Zombie Knight Part 1
    1. Zombie Knight Preview
    2. Zombie Knight Asset Gathering
    3. Zombie Knight Setup 1
    4. Zombie Knight Setup 2
    5. Zombie Knight Creating Our Tile Map
    6. Zombie Knight Tile Class
    7. Zombie Knight Ruby Maker Class
    8. Zombie Knight Portal Class
    9. Zombie Knight Game Class 1
  12. Chapter 12 : Game #7: Zombie Knight Part 2
    1. Zombie Knight Player Class 1
    2. Zombie Knight Player Class 2
    3. Zombie Knight Player Class 3
    4. Zombie Knight Player Class 4
    5. Zombie Knight Zombie Class 1
    6. Zombie Knight Zombie Class 2
    7. Zombie Knight Zombie Class 3
    8. Zombie Knight Zombie Class 4
    9. Zombie Knight Zombie Class 5
  13. Chapter 13 : Game #7: Zombie Knight Part 3
    1. Zombie Knight Ruby Class 1
    2. Zombie Knight Ruby Class 2
    3. Zombie Knight Game Class 2
    4. Zombie Knight Game Class 3
    5. Let's Play Zombie Knight!
  14. Chapter 14 : Creating Executable Applications of Your Games to Share!
    1. Installing and Using Auto Py to Exe with Feed the Dragon
    2. Auto Py to Exe with Zombie Knight

Product information

  • Title: The Art of Doing: Video Game Creation with Python and Pygame
  • Author(s): Michael Eramo
  • Release date: October 2021
  • Publisher(s): Packt Publishing
  • ISBN: 9781803231587