Tag Archives: Game Loop

OpenGL 2D Facade (11): View and Keyboard

With the previous program, the size of the window depends on the size of the level, which is problematic when the level is large. In this post, I update the shader programs to get a fast translation of the display. … Continue reading

Posted in Tutorial | Tagged , , | Leave a comment

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.

Posted in Tutorial | Tagged , , | Leave a comment

Discover Python and Patterns (25): Menu

In this post, I show how to create a menu with Pygame, using the Game Loop pattern.

Posted in Tutorial | Tagged , , , | Leave a comment

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.

Posted in Tutorial | Tagged , , | Leave a comment

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

AWT GUI Facade (8): Keyboard and key sequences

In this post, I add the keyboard management to the facade, and I propose a way to detect key sequences. These sequences are used, for example, in games like Street Fighter II, where characters move according to specific key combos.

Posted in Tutorial | Tagged , , , , | Leave a comment

AWT GUI Facade (6): Mouse and Game Loop

After loading a level, I now propose to add interaction with the use of a mouse. This will be an opportunity to see two other patterns: the Observer Pattern to handle mouse events, and the Game Loop Pattern for synchronization … Continue reading

Posted in Tutorial | Tagged , , , | Leave a comment