Other Books by Alejandro
- Recommended Resources
Introduction
- Who is this book for ?
- What this book covers ?
Chapter 1: Learning Python by building a simple game
- Installing Python
- Running an IDE
- Telling Python what to do
- Advanced turtle
- Learning Python by making a game
Chapter 2: Use the Pygame Module to build a Game Framework
- Getting started with Pygame
- Setting up your first Pygame script
- Code sections
- Setting the background
- Look out for errors
- Running the game
- Looping
- Freeze your Python environment
- Code
Chapter 3: Adding a Player to your Python Game
- Create a Python class
- Bring the player into the game world
- Setting the alpha channel
- Setting your own alpha
Chapter 4: Move your Character around using PyGame
- Setting up keys for controlling your player sprite
- Coding the player movement function
- Updating the sprite graphic
- Flipping your sprite
- All the code used so far
Chapter 5: Adding a villain to your PyGame
- Creating the enemy sprite
- Spawning an enemy
- Drawing a sprite on screen
- Level one
- Hitting the enemy
- Moving the enemy
Chapter 6: Adding Platforms to your PyGame
- Coding platform objects
- Types of platforms
- Level mapping
- Coordinates
- Image sizes
- Platform blocks
- Tiled platforms
- Applying what you know
Chapter 7: Adding Gravity to your PyGame
- Adding a gravity function
- Adding a floor to gravity
Chapter 8: Add Jumping to your PyGame
- Setting jump state variables
- Conditional gravity
- Programming solid ground
- Jumping in Pygame
- Calling the jump function
- Landing on a platform
- Falling
Chapter 9: Running Forward and Backward in your PyGame
- Putting the scroll in side-scroller
- Enemy scroll
Chapter 10: Putting some loot in your game
- Creating the loot function
- Scrolling loot
- Detecting collisions
- Applying what you know
Chapter 11: Adding Score to your game
- Displaying the score in Pygame
- Read the docs
- Deciphering technical documentation
- Using a font in Pygame
- Asset management
- Using a font in Pygame
- Displaying text in Pygame
- Interpreting errors
- Running the game
- Fixing the health counter
- Level up
Chapter 12: Add throwing mechanics to the game
- Create the throwable class
- Measure time to live
- Set up your throwable object
- Get throwing in the main loop
- Detect collisions
- Change the throw mechanic direction
Chapter 13: Adding sound to the game
- Start the mixer
- Define the sounds
- Add sound to Pygame
- Trigger a sound
- Add background music
- Enjoy the soundscapes