Программирование аркадных игр
и обучение информатикеDownload all these examples along with supporting files in a zip file: python_examples.zip.
Lab 16: Pygame Graphics Examples
This opens up a blank pygame window. It is a good template to use when starting a new program. (Chapter 5)
This file demonstrates setting up a window and drawing rectangles, polygons, text, and other basic shapes. (Chapter 5)
Demos all the commands in the draw module.
Animate a bouncing rectangle around the screen. (Chapter 8)
This shows how to use an array to animate and track multiple objects. In this case, snow flakes. (Chapter 8)
This file draws a snowman inside of a function. The program can then call the draw snowman function and draw several snowmen easily. (Chapter 9)
Move an object with the mouse (Chapter 11)
Move an object with the keyboard (Chapter 11)
Move an object with the game controller (Chapter 11)
Show how to read everything off a gamepad/controller/joystick. (Chapter 11)
Display bitmapped images (png, jpg) to a screen. Make sounds. (Chapter 12)
Display a board based on a two-dimensional grid. Useful when creating games like tic-tac-toe, minesweeper, memory-match, connect-four, etc. (Chapter 17)
Display one or more pages of instruction before the game starts.
Plays background music. When the music is over, an event is triggered and a different song starts. The music is included in the downloadable zip file, or you can follow the links in the comments to download the music.
Shows how to display a centered "Game Over" message, and stop game play when a game is over.
Display a line sweeping around in a circle like a radar.
Count up and count down timers. (Chapter 21)
Using recusion to make nested rectangles. (Chapter 20)
Using recusion to make fractals. (Chapter 20)
You are not logged in. Log in here and track your progress.
Copyright © 2017
English version by Paul Vincent Craven
Spanish version by Antonio Rodríguez Verdugo
Russian version by Vladimir Slav
Turkish version by Güray Yildirim
Portuguese version by Armando Marques Sobrinho and Tati Carvalho
Dutch version by Frank Waegeman
Hungarian version by Nagy Attila
Finnish version by Jouko Järvenpää
French version by Franco Rossi
Korean version by Kim Zeung-Il
Chinese version by Kai Lin
English version by Paul Vincent Craven
Spanish version by Antonio Rodríguez Verdugo
Russian version by Vladimir Slav
Turkish version by Güray Yildirim
Portuguese version by Armando Marques Sobrinho and Tati Carvalho
Dutch version by Frank Waegeman
Hungarian version by Nagy Attila
Finnish version by Jouko Järvenpää
French version by Franco Rossi
Korean version by Kim Zeung-Il
Chinese version by Kai Lin