Library

Course: Python Graphics Programming and Game Development

Python Graphics Programming and Game Development

  • Life Time Access
  • Certificate on Completion
  • Access on Android and iOS App
About this Course

In this course, students will learn Python programming hands-on by using code to create fun art and games. This course teaches programming in Python and the Turtle Graphics library, a Python library used to create digital art and visual patterns. Students with little to no programming experience will find this course particularly useful as it will teach concepts from the ground up. Intermediate level students with an interest in using programming to capture user input and create graphics can also benefit from the later sections of this course.

First, we will look at setting up Python IDLE and Turtle Graphics and some basic things we can do using the graphics library. Next, you will get hands-on experience using programming to create a simple graphics creation program. Finally, you will learn basic game development using Turtle Graphics and will understand how we can capture user input and construct game logic in Python.

By the end of this course, you will have a firm grasp on the foundational concepts of Python programming and be able to implement your knowledge to create visually appealing graphics. You will have a set of skills that you can use to build video games for your portfolio. 

Who is the target audience?

  • Anyone who wants to take their Python skills up a level
  • Beginners who want to learn how to create graphics through code
  • Aspiring game programmers and software engineers
Basic knowledge
  • You should have basic knowledge of Python or another basic programming language
What you will learn
  • Create digital art through Python code
  • Program video games in Python
  • Create basic graphics creation programs using Python to build digital art tools
Curriculum
Number of Lecture: 47
Total Duration: 01:15:02
Introduction
  • Introduction  

    This lecture will introduce you to the course goals. After this lecture, you will have a clear understanding of what you will learn in this course.

  • Download and Install Python IDLE  
  • Turtle Graphics Overview  

    This lecture will provide you with an overview of the Turtle Graphics library. By the end of this lecture you will have a basic understanding of how the library is structured and what we can do with it.

Turtle Graphics API
  • Turtle Graphics API Section Introduction  

    This lecture will serve as the section introduction to the Turtle Graphics API portion of this course. In this video, we will look at what students will learn in this section.

  • import turtle  

    In this lecture we will look at how we can import turtle into our Python program. By the end of this lecture you will be able to import the turtle library and will be ready to start programming using the methods provided in the Turtle Graphics API.

  • turtle.Turtle() and turtle.Screen()  

    In this lecture, we will look at how we can create a turtle object and screen object, essentially the pen and canvas of Turtle Graphics. By the end of this lecture you will be able to create these objects in any Python program you develop.

  • up() and down()  

    In this lecture, we will look at the up() and down() methods of the turtle graphics library. By the end of this lecture you will know how to lift the turtle up and put it down to control when the turtle is able to draw graphics to the screen.

  • forward() and backward()  

    In this lecture, we will look at the forward() and backward() methods of the Turtle Graphics library. By the end of this lecture you will know how to move the turtle to draw graphics to the screen.

  • left() and right()  

    In this lecture, we will look at the left() and right() methods of the Turtle Graphics library. By the end of this lecture you will know how to rotate the turtle left and right a specified number of degrees.

  • setheading() and seth()  

    In this lecture, we will look at the setheading()/seth() methods, both of which turn the turtle to a specified direction on the screen. By the end of this lecture you will know another way to control the direction that the turtle is facing.

  • home() and goto()  

    In this lecture, we look at the home() and goto() methods of the Turtle Graphics library. By the end of this lecture, you will know how to return the turtle to the origin and how to make the turtle jump to a specified (x,y) point on the screen.

  • showturtle() and hideturtle()  

    In this lecture, we will look at the showturtle() and hideturtle() methods of the Turtle Graphics library. By the end of this lecture, you will be able to control the visibility of the turtle on the screen.

  • clearscreen() and bye()  

    In this lecture, we will look at the clearscreen() and bye() methods of the Turtle Graphics library. By the end of this lecture you will know how to clear and close the screen of a turtle graphics program.

  • pensize() and pencolor()  

    In this lecture, we will look at the pensize() and pencolor() methods of the Turtle Graphics library. By the end of this lecture you will know how to change the size and color of the pen.

  • xcor() and ycor()  

    In this lecture, we will look at the xcor() and ycor() methods of the Turtle Graphics library. By the end of this lecture you will know how to get the x and y position of the turtle.

  • onkey() and listen()  

    In this lecture we will look at the onkey() method of the Turtle Graphics library. By the end of this lecture you will know how to bind an event to a key press.

  • onclick() and onscreenclick()  

    In this lecture we will look at the onclick() and onscreenclick() methods of the Turtle Graphics library. By the end of this lecture you will know how to bind events to clicking a turtle and clicking the screen.

  • begin_fill() and end_fill()  

    In this lecture, we will look at the begin_fill() and end_fill() methods of the Turtle Graphics library. By the end of this lecture, you will know how to fill in the objects you draw using Turtle Graphics.

  • Section Summary  

    In this video, we will look at a summary of what we learned in this section. By the end of this lecture, you will be ready to tackle the next section of the course using the Turtle Graphics API.

Developing a Graphics Creation Program
  • Graphics Program Project Overview  

    In this lecture, we will look at an overview introduction to our graphics creation program that we will build in this section. After this lecture, you will know the scope and design specifications of our graphics creation program.

  • Defining Our Variables  

    In this lecture, we will define the variables that we are going to use in our project. By the end of this lecture you will be ready to start writing functions and jumping into the coding of our graphics program project.

  • Create the Toolbar  

    In this lecture, we will create our toolbar. By the end of this lecture you will have the toolbar draw to the screen and be ready to start setting up the color palette.

  • Create the Color Palette  

    In this lecture, we will create our color palette. By the end of this lecture, you will understand how to create the palette objects and arrange them on our toolbar.

  • Create the Pen Width Palette  

    In this lecture, we will create our width palette. By the end of this lecture, you will understand how to create the palette objects and arrange them on the toolbar.

  • Add Functionality to Color Palette  

    In this lecture, we will add functionality to our color palette. By the end of this lecture, you will know how to change the pen color when the user clicks on a color in our color palette.

  • Add Functionality to Width Palette  

    In this lecture, we will add functionality to our width palette. By the end of this lecture, you will know how to change the pen width when the user clicks on a width in our width palette.

  • Let User Draw to Screen  

    In this lecture, we will code the functionality to enable the user to draw to the screen. By the end of this lecture, you will be able to implement this functionality using the Turtle Graphics library. 

  • Let User Pick Pen Up  

    In this lecture, we will give the end user the ability to control the state of the pen. By the end of this lecture, you will be able to give users the control to pick the pen up or put it down when using your graphics program.

  • Putting It All Together  

    In this lecture, we run the end result of our program and discuss troubleshooting. By the end of this lecture you will have a fully working program and be able to debug any issues in the code.

  • Developing a Graphics Creation Program - Section Summary  

    In this video, we look at a summary of this section. By the end of this video you will be ready to move onto the next section of this course.

Game Development using Python
  • Game Development Project Overview  

    In this lecture, we will look at an overview introduction of the game we will create in this section of the course. By the end of this lecture, you will understand the design specifications and scope of our game development project.

  • Game Development using Python - Defining Our Variables  

    In this lecture, we will define the variables that we will use in this project. By the end of this lecture you will be ready to start writing functions to start building the game project. 

  • Creating the Background  

    In this lecture, we will look at how we can create a background for our game. By the end of this lecture you will be able to create a starry sky background procedurally using code.

  • Player and Lives  

    In this lecture, we will set up the player object and the player's extra lives. By the end of this lecture you will understand how to spawn and arrange the player and lives objects to the screen. 

  • Player Movement  

    In this lecture, we will enable the player to move the ship left and right. By the end of this lecture you will understand how to create movement functions and how to bind them to keyboard key presses.

  • Enemy Spawning  

    In this lecture, we will look at spawning enemies to the top of the screen. By the end of this lecture you will understand how to spawn enemy objects and position them on the screen.

  • Initializing Play Game  

    In this lecture we clean up our initialization code. By the end of this lecture you will have one central function to set up the game that calls several setup functions in its function body.

  • Player Shooting  

    In this lecture we enable the player to fire missiles at the enemy objects. By the end of this lecture you will understand how to create and launch a projectile and how to bind this shooting functionality to a key press using events in Python.

  • Destroy Enemy  

    In this lecture, we look at how we can destroy the enemy if the player's missile hits it. By the end of this lecture you will understand how to check if two objects have collided.

  • Enemy Shooting  

    In this lecture, we will look at how enemies can shoot missiles at the player. By the end of this lecture you will understand how to implement basic enemy AI behavior.

  • Destroy Player  

    In this lecture, we look at how to destroy the player if it was hit by an enemy missile. By the end of this lecture you will understand how to destroy the player object and how to instantiate an explosion at the player's position on the screen.

  • Game Over Condition  

    In this lecture, we look at how to write a game over message to the screen. By the end of this lecture you will understand how to draw letters in Turtle Graphics and how you can display messages to the player. 

  • You Win Condition  

    In this lecture, we look at how to write a you win message to the screen. By the end of this lecture you will understand how to draw letters in Turtle Graphics and how you can display messages to the player.

  • Quit Game  

    In this lecture, we will go over how to close the game window when the user presses the escape key. By the end of this video, you will understand how to bind an event to the game window that will let the user quit your game.

  • Game Development using Python - Putting it All Together  

    In this lecture we look at the final product of all our hard work, our very own playable game!

  • Game Development using Python - Section Summary  

    In this lecture we summarize this section of the course. 

Course Summary
  • Course Summary  

    In this lecture, we wrap up and summarize the course.

Reviews (0)