Coding Games With Pygame Zero & Python
Support the author by buying the book.
He also has a game.
This book contains all the example programs used in my CoderDojo class to teach Python programming. The primary goal of the class is to teach programming using action games to make learning more interesting. Some of the examples are entirely focused on introducing new language concepts or showing how the Pygame Zero API works, but most are a mixture of both.
Watch https://github.com/electronstudio/python_book for news on third edition.
- 1. Overview of Python
- 2. Python Fundamentals
- 3. Text-based quiz games
- 4. Drawing graphics
- 5. Arcade games
- 6. Improving your games
- 7. More advanced games
- 8. Tutorial: Chase game
- 9. Tutorial: Maze game
- 10. Tutorial: Shooting game
- 10.1. Step 1: Decide what Actors you will need
- 10.2. Step 2: Draw your Actors
- 10.3. Step 3: Move your Actors
- 10.4. Step 4: Define your functions
- 10.5. Create enemies
- 10.6. Move the player
- 10.7. Move the enemies
- 10.8. Draw text on the screen
- 10.9. Player bullets
- 10.10. Enemy bombs
- 10.11. Check for end of level
- 10.12. Ideas for extension
- 11. Tutorial: Race game
- 12. Advanced topics
- 13. Python in Minecraft
- 13.1. Setup
- 13.2. Hello Minecraft
- 13.3. Coordinates
- 13.4. Changing the player’s position
- 13.5. Build a teleporter
- 13.6. Teleport player into the air
- 13.7. Teleport jump
- 13.8. Create a block
- 13.9. Types of block
- 13.10. Create a block inside a loop
- 13.11. Create a tower of blocks
- 13.12. Clear space
- 13.13. Build a house
- 13.14. Build a street of houses
- 13.15. Chat commands
- 13.16. Turtle