-
Recent Posts
Recent Comments
- phylyp on Discover Python and Patterns (17): 2D arrays
- Małgorzata Serżysko-Sosnowksa on Discover Python and Patterns (17): 2D arrays
Archives
Categories
Tags
Meta
Tag Archives: Pygame
OpenGL 2D Facade (20): Automatic tile borders
I add more game content in this post to test the facade. This time, I want to automatically render borders when a region is updated. Objective We still edit a region as before, but now the renderer displays borders between … Continue reading
OpenGL 2D Facade (16): Text renderers
Before going to text with mixed styles, we need a better solution to render characters. In this post, I propose an approach based on the Composite pattern that allows an effortless combination of text styles. Objective Thanks to this new … Continue reading
OpenGL 2D Facade (15): Text styles
In this post, I present text rendering with different styles (bold, italic, underline, …). Some of them are straightforward to implement thanks to Pygame; the others are more tricky! This post is part of the OpenGL 2D Facade series Objective … Continue reading
OpenGL 2D Facade (14): Unicode text
The creation of a tileset for large character sets uses a lot of memory. This post shows an approach based on the Flyweight pattern to allow their usage with minimal memory footprint. This post is part of the OpenGL 2D … Continue reading
Discover Python and Patterns (27): Music and Sounds
In this post, I add music and sounds to our tank game and make use of the Observer pattern to implement it efficiently.
Discover Python and Patterns (26): Game modes
To merge the menu in the previous post with the tank game, I create game modes thanks to an improved Game Loop pattern.
Discover Python and Patterns (24): Load levels
In the previous post, we created a new level using Tiled. I show you how to load it in our game.
Discover Python and Patterns (22): Animations
In this post, I propose to add an explosion animation when someone destroys a unit. It can be achieved in an effective way using the Observer pattern. I also add some optimization to get a smoother experience!
Discover Python and Patterns (21): Bullets
It is time to shoot with our tank and destroy the towers! We have all we need: a state to represent bullets, commands to update them, layers for the rendering, and a UI to manage all of these.