Design Patterns: The Strategy Pattern

Have you guys played Pyre yet? No? Well do. It is one of my favourite games this year. It is also a sort of Strategy game… kind of… it is hard to define what it is really, but it has strategy elements!

In this post I am going to talk about the Strategy pattern. In wikipedia term, the Strategy pattern is a behavioural software design pattern that enables an algorithm’s behaviour to be selected at runtime. Fancy.

In game development terms, we could look at enemies. In an action game, maybe you want the enemies to have different behaviours when they fight the player. I am going to use like an Ace Combat style game as an example. Each Enemy Pilot has some standard stuff, but we want the pilot AI to do many different things. We could use the strategy pattern for this.

public class EnemyPilot
    .. Other code here
    private IPilotAI _pilotAI;
    void Update()

In the above C# code, I have a class that is the EnemyPilot that contains the IPilotAI interface that we can set at runtime. We can now make a number of AI behaviours that use the Pilot AI interface. This is much better than inheriting from the whole EnemyPilot class each time and we are encapsulating the only thing that varies, i.e. the Pilot AI. And really it as that. Cool huh?


C++/UWP Tutorials – Introduction

As part of my own personal development plan one of the parts I want to continue getting better at is console development and also revise all my C++ development. One of the ways I can do that easily, whilst also share some tutorial posts is through UWP dev and C++.

Why UWP? In Lindsay Cox terms, I would say that UWP is like the gateway drug to console development. A bit more than XNA was back in the day. Why? Well it allows you to develop Xbox One Games in C++ and Direct X. Like the “big” boys.

Before I go on, I am a staunch believer in it DOESN’T MATTER HOW YOU MAKE VIDEO GAMES. If you use GameMaker, MonoGame, Unity, Unreal, Windows Forms, Pascal, whatever. So when I say “big boys”, I am being a little bit facetious.  This is another way to get games made.

So what are we gonna do? What is the end goal?

Back at Uni I was set the task of creating the above graphics demo. It is a little dated now, and the code is student level rushed, but I want to get something similar running on Xbox One.

Pretty cool.

Where do we start?

Well I am not going to go over the basics, Microsoft have done that for us. Before We get stuck into building our cool snow globe, first stop is here:–create-your-first-metro-style-directx-game

This is literally just to get familiarised with some concepts of UWP development. We will be starting from “scratch” later and the code will be on github.

See you soon!


No more deadline… however…

Image result for Bioshock

So I had a weird sort of day today. It was weirdly 10 years ago this week that I first got into the industry. I was doing my work experience on Fable 2 in QA, not a bad place to start at all. It was also the year the game that made me truly decide I wanted to do game development for the rest of my life came out. And that was Bioshock.

Anyway, regardless of the above, I also decided I am not gonna try and hit some arbitrary deadline. If anything it was hurting the game itself and causing me to scale back. I am still making this game, it is a game that I have wanted to make for literally years, however, I want it to be right. I am inspired by one of the most stylish and polished shooters I have ever played that literally took years to make. Of course, I am hoping that won’t be the case. One of the reasons I have removed my crazy deadline is that a few other people have been interested in helping. Others who like me have full-time jobs but are genuinely interested in the project. I don’t want to impose a crazy deadline on them either, especially when they are willing to help because they are absolute legends. They are also bringing some new possibilities of what the game could actually be. So where from here:

  • The game is still gonna get made.
  • We are nailing down some cool stuff, now I don’t have a crazy deadline I can work more on world building, the script, etc, which all were pretty half arsed.
  • I am gonna release my old Storm Ship Shiro on Xbox One pretty soon.
  • I am working with some quite frankly, fucking awesome people.

So yeah, although I have removed my stupid public deadline that didn’t really achieve anything, I am glad I did and I’ve learned a lot from the past couple of months. I want to give the game a fighting chance, not be some rubbish that gets buried. I will still be updating my dev log and also get some more tutorials, tips and tricks, etc up. Stay tuned!