Let’s make a Snake game on a Melopero Cookie RP2040
The Melopero Cookie RP2040 is a nice development board made by Melopero Electronics, with a Raspberry Pico RP2040 chip on board, a 5×5 NeoPixel grid and a couple of I/O...
The Melopero Cookie RP2040 is a nice development board made by Melopero Electronics, with a Raspberry Pico RP2040 chip on board, a 5×5 NeoPixel grid and a couple of I/O...
In this post I talk about hierarchical state machines and present a simple implementation, based on the state pattern. It is by no means a comprehensive explanation, and I skim...
While I was working on my game engine, I started learning about scripting and scripting systems, and I thought it would be nice to add some scripting capabilities to it....
In a previous article I wrote about the ubiquitous observer pattern, which is all about objects (called observers or listeners) that need to be notified when other objects in the...
Now that I’ve got a working game engine it’s time to add some interesting features to it. One that I’ve always desired to implement is online multiplayer, the ability to...
Polymorphism is the ability to use objects of different types in a generic way, using the same notation. In C++ there are two forms of polymorphism, dynamic and static polymorphism....
Encapsulation is a staple of object-oriented programming: by hiding (or “abstracting away”) the implementation details of a class behind a public interface we can create abstract data types. Users of...
Templates are a very powerful feature of C++: they let us parameterize a class, function or variable with some generic types or values (called template parameters), so that by specifying...