Monthly Archives: December 2019

Discover Python and Patterns (8): Game Loop pattern

The time has come to see our first design pattern: the Game Loop Pattern! This pattern can give us many good ideas to refactor our game in a very effective way.

Posted in Tutorial | Tagged , | Leave a comment

Discover Python and Patterns (7): Functions

It is now time to organize/refactor our code! When you begin, this is a strange process since the final code does the same as before. However, refactoring is the only way to create a code easy to maintain and expand.

Posted in Tutorial | Tagged | Leave a comment

Discover Python and Patterns (6): Random

In the previous post, the magic number is always the same. I propose now to introduce random numbers to change the magic number every time we launch the game. I also present imports and more on integers.

Posted in Tutorial | Tagged | Leave a comment

The source code of my book is now available on github

The source code of my book “Learn Design Pattern with Game Programming” is now available on github: https://github.com/philippehenri-gosselin/patternsgameprog. If you find any bug, comments here or issues on github are welcome 🙂

Posted in Tutorial | Tagged | Leave a comment

Discover Python and Patterns (5): Integers

In previous posts, I only used strings and booleans. In this one, I use a new data type called “int” (for integer) that allows the storage and computation of natural numbers (numbers without a decimal part). I use them to … Continue reading

Posted in Tutorial | Tagged | Leave a comment