Design Patterns and Video Games

The purpose of this blog is to present solutions based on Design Patterns illustrated by the development of video games.
0 comments
20 entries
Advertisement
phylyp
November 07, 2019
Discover Python and Patterns (1): Start

In this series, I propose an introduction to programming for beginners. To do so, I choose the Python language, which is today one of the best (if not the best) language to discover programming. And, as you may guess, we’ll program games

Before starting anything we need a development environ…

2,761 views
phylyp
November 02, 2019
The paperback version of my book is out!

The paperback version of my book "Learn Design Patterns with Game Programming" is finally out!

The Kindle version is updated with some improvements and is still freely available if you subscribed to Kindle Unlimited.

2,183 views
phylyp
October 30, 2019
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.

Keyboard facade

I first design the keyboard facade. As …

4,045 views
phylyp
October 23, 2019
AWT GUI Facade (7): Draw text

Graphic libraries usually provide methods to draw text on the screen. These handy methods are often quite slow to run because they recompute many parameters at each call. To save computational time, the flyweight pattern can be used to provide text parameters with low memory and cpu usage.

4,203 views
phylyp
October 16, 2019
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 between controls, updates, and display.

This post is part of the…

4,692 views
phylyp
October 09, 2019
AWT GUI Facade (5): Load a level

In this article, I propose to use the Visitor Pattern to easily load a level. The GUI facade in the previous post is used to display the level. This pattern allows (among other things) to easily browse a data structure to extract information. In our case, it is an XML file created by “Tiled Map …

3,546 views
phylyp
October 03, 2019
AWT GUI Facade (4): Draw with tiles

I continue the extension of the graphic facade (see previous article), with here the addition of a very classic form of drawing for video games: tiles. These make it possible to compose an image using small images called tiles. There are several types of tiles, I propose in this article the simp…

3,590 views
Advertisement
phylyp
October 02, 2019
AWT GUI Facade (3): Display an image

The facade seen in the previous article has only an interface with its methods. It is also possible to enrich a facade with additional interfaces, connected to each other by various means. To illustrate it, I propose to add image management. This addition also makes it possible to present anothe…

4,670 views
phylyp
September 25, 2019
AWT GUI Facade (2): Draw

In this article, I propose to continue the design of a facade for a 2D tile game (previous post). I add two new features: creation/destruction of the window, and basic drawing. Each feature is managed by a batch of methods in a GUIFacade interface.

This post is part of the AWT GUI Facade ser…

3,807 views
phylyp
September 18, 2019
AWT GUI Facade (1): display a window

In this series, I propose to discover the Facade Pattern. In short, this pattern defines an interface that allows a reduced and simplified use of a set of features. To illustrate, we design a facade of the AWT graphic library for a 2D tile game.

This post is part of the AWT GUI Facade series…

5,101 views
Advertisement

Popular Blogs

shawnhar
Generalist
101 Entries
14 Followers
klg71
Generalist
57 Entries
2 Followers
ApochPiQ
Generalist
628 Entries
45 Followers
15 Entries
14 Followers
johnhattan
Programmer
1,277 Entries
50 Followers
Advertisement