Game On…

It’s been a while since my last post, so I figured I’d get back onto the horse and do a little more on the development side. I’ve added a new class into the codebase now to begin implementing the main game, it currently doesn’t do much more than show the main playfield at present, but…

Dynamic Modules

In the previous post I mentioned that I’d need to dynamically load the state modules at runtime. Luckily, Python provides a module – importlib – to do just this. In order to load our states into the system, we pass a list of dictionary objects into our Game initialiser, which in turn passes this onto…

Managing State

In order to simplify our code, we’ll implement a state-based model for the game. This will allow us to represent each significant ‘mode’ of the game as a separate, encapsulated item, thus keeping code for differing parts of the program isolated from others. This will also have the benefit of allowing us to extend the…

Throttling

In my previous post, I mentioned that we’d need to look at some mechanism to throttle the game execution so that we can achieve a consistent speed across hardware of varying speeds, so here I’ll look at how we can achieve this, and why it is important to adopt the method I outline. As we…