-
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
Discover Python and Patterns (20): Better commands
Since we saw the class inheritance, I can show you how to get a better implementation of the Command pattern. It eases a lot the management of commands and introduces exciting features.
Discover Python and Patterns (19): Mouse
In this post, I want to use the mouse to orient the unit weapons.
Discover Python and Patterns (18): Layers
We got a background now, but we can get a better one with layers! Now that we saw the class inheritance, I can show you how to create and add new layers of different kinds easily.
Discover Python and Patterns (17): 2D arrays
We still have no background in our game: I add one in this post using 2D arrays.
Discover Python and Patterns (16): Inheritance
In this post, I present the basics of class inheritance, to represent our units (the tank and the canon tower) more efficiently.
Discover Python and Patterns (15): Lists
I introduce in this post Python lists: with them, we can store and process any number of items, for instance, all the canon towers in our game.
Discover Python and Patterns (14): Collisions
In this post, I add enemies and I show you how to test if the tank collides one of them.
Discover Python and Patterns (13): Sprites
In this post, I propose to replace the rectangle in the previous program with a tank sprite, using a tileset.
Discover Python and Patterns (12): Command pattern
The implementation of the Game Loop pattern in the previous post is not good: I propose to use the Command pattern to get a better one. This pattern allows separating input handling and game updating.
Discover Python and Patterns (11): Class
I propose to introduce Python classes to implement the Game Loop pattern. Using these tools, I show how to refactor the code in the previous post to get a more robust and readable program.