Category Archives: Tutorial

OpenGL 2D Facade (6): Draw a tile

Textures in the previous post allow the drawing of tiles, but the aspect ratio is not correct. In this post, I show how to draw a tile on a grid location correctly.

Posted in Tutorial | Tagged , | Leave a comment

OpenGL 2D Facade (5): Textures

In this post, I introduce OpenGL textures and use them to draw tiles from tilesets.

Posted in Tutorial | Tagged , | Leave a comment

OpenGL 2D Facade (4): Shaders

Shaders are one of the powerful features of OpenGL. I introduce them in this post and show how to color vertices using vertex and fragment shaders.

Posted in Tutorial | Tagged , | Leave a comment

OpenGL 2D Facade (3): Vertex Array Objects

Vertex Arrays Objects allow us to send large meshes to the GPU. It is a bit technical, but this is something we only have to do once.

Posted in Tutorial | Tagged , | Leave a comment

OpenGL 2D Facade (2): Mesh data

We get the best performance when sending mesh data to the GPU in a single operation. In this post, I present the numpy library that can create such data.

Posted in Tutorial | Tagged , | Leave a comment

OpenGL 2D Facade (1): Window and basic drawing

In this new series, I propose to create a GUI facade for the 2D tileset-based games using OpenGL.

Posted in Tutorial | Tagged , | Leave a comment

The source code for the tank game is available on Github!

The final code of the game created during the series “Discover Python & Patterns” is available on Github: https://github.com/philippehenri-gosselin/tankgame I also added a third level: I am working on the next series (OpenGL 2D Facade), I don’t know when it … Continue reading

Posted in Tutorial | Leave a comment

Discover Python and Patterns (29): Software Architecture

In this post, I describe the organization of the tank game code. It is not the best design one could create, there are many flaws, but there are many good ideas you can use for your projects!

Posted in Tutorial | Tagged , | Leave a comment

Discover Python and Patterns (28): Installer

We got a complete game, but we need a specific Python environment to run it. In this post, I show how to create a standalone executable and an installer!

Posted in Tutorial | Tagged , , | Leave a comment

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.

Posted in Tutorial | Tagged , , | Leave a comment