Программирование аркадных игр
и обучение информатикеDownload all these examples along with supporting files in a zip file: python_examples.zip.
Lab 16: Pygame Sprite Examples
Move a sprite with the mouse and collect blocks. (Chapter 14)
Same as collect blocks example, but all the sprites move. (Chapter 14)
Same as collect blocks example, but you can move the sprite by clicking to pick them up.
Rather than just move down, these sprites bounce.
Prior example too boring? Get the sprites to move in circles.
Expands the prior example to show how to manage a game with levels. Level advances when all the blocks are cleared.
Same as sprite_collect_blocks.py but with a black circle instead of a block. (Chapter 14)
Same as sprite_collect_blocks.py but with a graphic instead of a block. (Chapter 14)
Same as sprite_collect_blocks.py but with a graphic instead of a block.
Same idea as sprite_collect_blocks.py but uses a Game class to organize the code. This is a more advanced
way of organizing the code. It helps if you want to “restart” a game once it is over. (Chapter 14)
Move a sprite around the screen with the mouse. (Chapter 14)
Move a sprite with the keyboard in discrete 'jumps'. (Chapter 14)
Move a sprite with the keyboard smoothly and continuously while a key is pressed. (Chapter 14)
Move a sprite with a game controller or joystick. (Chapter 14)
Basic Pong game using two game controllers.
How to manage bullets with sprites.
How to aim bullets.
Control a snake as it moves around the screen.
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