Useful Links
Computer Science
Game Development
Game Development with Python and Pygame
1. Foundations of Python and Pygame
2. Core Pygame Concepts
3. Handling User Input and Events
4. Working with Images and Sprites
5. Movement and Animation
6. Collision Detection
7. Sound and Music
8. Text and User Interface
9. Advanced Game Structure and Concepts
10. Performance Optimization
11. Project Organization and Distribution
12. Complete Game Examples and Projects
Sound and Music
The Mixer Module
Initializing the Mixer
Setting Audio Parameters
Handling Initialization Errors
Mixer Configuration
Sample Rate and Bit Depth
Number of Channels
Playing Sound Effects
Supported Audio Formats
WAV Format
OGG Format
The pygame.mixer.Sound Class
Loading Sound Files
Creating Sound Objects
Sound Object Methods
Playing, Stopping, and Fading Sounds
Playing Sounds
Stopping Sounds
Fading In and Out
Managing Channels
Channel Allocation
Controlling Channel Volume
Channel Groups
Playing Background Music
Supported Music Formats
MP3 Format
OGG Format
The pygame.mixer.music Module
Loading Music Files
Playing and Looping Music
Controlling Music
Stopping and Pausing Music
Unpausing Music
Adjusting Music Volume
Queuing Music Tracks
Advanced Audio Features
3D Positional Audio
Left-Right Panning
Distance-Based Volume
Audio Streaming
Large Audio Files
Audio Effects
Reverb and Echo
Pitch Shifting
Previous
6. Collision Detection
Go to top
Next
8. Text and User Interface