How-To Example Code¶ Starting Templates¶ Starting Template Using Window Class¶ Platformer Template¶ Drawing¶ Drawing Primitives¶ Happy Face¶ Drawing Primitives¶ Slow but Easy Text Drawing¶ Better Text Drawing with Text Objects¶ The Fastest Text Drawing: pyglet Batches¶ Animating Drawing Primitives¶ Bouncing Rectangle¶ Bouncing Shapes¶ Radar Sweep¶ Falling Snow¶ Faster Drawing with ShapeElementLists¶ ShapeElementList Explanation¶ Using a Vertex Buffer Object With Lines¶ Shape List - Skylines¶ Gradients Example¶ Sprites¶ Player Movement¶ Move By Mouse¶ Move By Keyboard¶ Better Move By Keyboard¶ Acceleration and Friction¶ Move By Turning¶ Sprite: Face Left or Right¶ Game Controller¶ Dual Stick Shooter¶ Move to Mouse Click¶ Move By Keyboard, Fire Towards Mouse¶ Non-Player Movement¶ Collect Coins Moving Down¶ Collect Coins that are Bouncing¶ Sprite Bouncing Coins¶ Collect Coins that are Moving in a Circle¶ Animated Sprites¶ Sprite Rotation Around a Point¶ Easing¶ Easing Example 1¶ Easing Example 2¶ Calculating a Path¶ Sprites That Follow a Path¶ Sprites That Follow The Player¶ Sprites That Follow The Player 2¶ Line of Sight¶ A-Star Path Finding¶ Sprite Properties¶ Hit Points and Health Bars¶ Sprite Properties¶ Change coins¶ Games with Levels¶ Different Levels of Clearing Coins¶ Moving Between Different Rooms¶ Shooting with Sprites¶ Shoot Bullets Upwards¶ Aim and Shoot Bullets¶ Have Enemies Periodically Shoot¶ Have Enemies Randomly Shoot¶ Have Enemies Aim at Player¶ Sprite Explosions Bitmapped¶ Sprite Explosions Particles¶ Audio¶ Sound Effects¶ Sound Demo¶ Sound Speed Demo¶ Music¶ Music Control Demo¶ Display Management¶ Resizable Windows¶ Resizable Window¶ Full Screen Example¶ Backgrounds¶ Using a Background Image¶ Parallax¶ Cameras¶ Move with a Scrolling Screen - Centered¶ Move with a Scrolling Screen - Margins¶ Camera Shake¶ Camera Use in a Platformer¶ View Management¶ Instruction and Game Over Screens¶ Minimal Views Example¶ Using Views for Instruction and Game Over Screens¶ Using Views for a Pause Screen¶ Fade In/Out of Views¶ Sectioning a View¶ Sections Demo 1¶ Sections Demo 2¶ Sections Demo 3¶ Platformers¶ Basic Platformers¶ Move with Walls¶ Randomly Place Coins, But Away From Walls And Other Coins¶ Move with a Sprite Animation¶ Moving Platforms¶ Platformer With Enemies¶ Simple Platformer¶ Tiled Map Editor¶ Work with loading in a Tiled map file¶ Work with levels and a tiled map¶ Procedural Generation¶ Creating a Recursive Maze¶ Creating a Depth First Maze¶ Procedural Caves - Cellular Automata¶ Procedural Caves - Binary Space Partitioning¶ Graphical User Interface¶ Flat Text Buttons¶ Flat Text Button Styled¶ GUI Widgets¶ OK Message Box¶ GUI Scrollable Text¶ GUI Slider¶ Grid-Based Games¶ Array-Backed Grid¶ Array-Backed Grid Buffered¶ Grid Using Sprites v1¶ Grid Using Sprites v2¶ Tetris¶ Conway’s Game of Life¶ Advanced¶ Using PyMunk for Physics¶ Pymunk Physics Engine - Stacks of Boxes¶ Pymunk Physics Engine - Pegboard¶ Pymunk Demo - Top Down¶ Pymunk Physics Engine - Joint Builder¶ Pymunk Platformer¶ Frame Buffers¶ Mini-Map¶ Lighting Demo¶ Transform Feedback¶ Game of Life with Frame Buffers¶ Perspective¶ OpenGL¶ Normal Mapping¶ GPU Based Line of Sight¶ Concept Games¶ Asteroid Smasher¶ Asteroids with Shaders¶ Slime Invaders¶ Community RPG¶ 2048¶ Rogue-Like¶ Odds and Ends¶ On-Screen Timer¶ Performance Statistics¶ Text Localization¶ Particle System¶ Particle System - Fireworks¶ Particle Systems¶ Tutorials¶ Simple Platformer¶ Solitaire¶ CRT Filter¶ Ray-casting Shadows¶ Pymunk Platformer¶ Shader Toy - Glow¶ Stress Tests¶ Draw Moving Sprites Stress Test¶ Collision Stress Test¶