Computing At School Hub leaders conference

I attended a TeachMeet tonight as part of the Computing At School workgroup. Simon H telephoned me earlier in the day hoping I’d be able to do a little presentation to the delegates about the industry perspective. I was very busy all day so I managed to put a few thoughts into a coherent set in the car on the way to the Digital Lab at the University of Warwick. I arrived at 7.15pm after leaving work at 6.30pm, getting home, having my tea and then driving to the event. It was a very interesting meeting and I was surprised to see the video conferencing that they had using “FlashMeet”. So what did I talk about and what did I learn?

Well the people were computer science educationalists ranging from KS3 teachers to H.E. Lecturers. Representatives from the BCS ( were there along with some from VITAL ( I talked briefly about my industry and with an emphasis on how video games are driven by programmers. Although major games involve art, animation, video production,design, script writing, music & sound production, they are all tied together and delivered in this unique form by the work of the programmers. The industry was invented by programmers who initially did everything but now these roles have split into their disciplines. To underline this the video games industry generates more revenue than the film and TV industry put together and is (should be) a very high profile industry for our government.

So why is this very successful industry and in particular, myself, so keen to work with school children? As I’ve said in this blog before, when I interview potential new programmers, I discover that many of them have been taught the wrong stuff. Blitz Games Studios has noticed this trend increasing over many years and has been liaising with Universities to create and improve their courses. For the record, many games development and games technology courses are still not teaching the right stuff. If you want to write computer games software, take a software engineering course that has a high mathematics, AI, operating systems, or computer graphics aspect. These are essential skills, and make sure it teaches C++.

Another worrying aspect of the candidates is that so many of them only had their first experience of computer programming at university. They’d taken the computer science course pretty much blind to the subject. I don’t know what motivates them to make this choice and I’ve even known some who was choosing between psychology or computer science and opted for computers. This seems a wild choice.

I did some research, to see why they were, in my opinion, leaving it so late to experience the joy of computer programming. As part of that research I discovered that the BCS had recorded that there was shocking decline in the number of applicants to computer science courses. However there was an increase in the applicants to softer science subjects (games development studies for instance!) When looking at A-Levels Computing, I discovered that this was a course in decline too. The course itself looks good for bringing a student up to the level I’d expect them to be at for entry into a Computer Science degree. For anyone to take Computer Science without this, they would (or should) find it a big struggle. Either that or their course was not going to be good enough for them to get a job at the end of it.

I also looked at ICT which is the standard computer related course at GCSE and A-Levels. This is not a computer studies replacement as I think most industrialists (and parents) think it is. It is a very valuable course but one which is designed to teach pupils about how computers can be used in all aspects of their life and work. Spreadsheet usage, building presentations, writing documents, sending emails, converting videos, creating a website, and so on. It is not programming!

So where do I go from here? This brings me back to why I was at the Computing At Schools workgroup meeting. I want to put programming back into the school agenda. I’d like to ensure those children are given the opportunity to be inspired and become enthusiastic about writing programs. Whether that be for Robots or Video Games (or anything else; iPhone or Android apps). These skills will improve the workforce in the UK and it is something at which we are a world leader but not for much longer.

And now my attempt at being profound:

I wish I could have stay for more of the weekend and explored Alice, Greenfoot, Scratch and so on. These are great bits of software for inspiring and kick starting learning about programming. However, this is not where it ends. The ability to drag objects into a scene, stick on a few actions and see it do something is programming but it is not software engineering, or Programming with a capital P. I expressed at the meeting that the use of Python, Java, Flash, or whatever is in the beginning, great. However, the software written should be vibrant, different and push the idea that is being demonstrated. I think so much emphasis is on congratulating a student for ‘writing a program’ and this is not enough. It is like the art teacher congratulating a student on ‘using a brush.’ It is the final piece using the media that is going get that artist some recognition. The programming language C++ is the tool of a video games programmer. Scratch and Alice are the tools of a teacher. However, both of these tools can be used to create something great but in both cases it is not going to be easy.

So if you are a teacher reading this, consider how much of you approach to using software and course material in the class is “here is a pen, look, it makes lines on the paper”, and how much of it is “here is a pen, with a lot of HARD work you can learn to write a great novel.”

robot game c++

I looked at the stats for my blog today.  It turns out that the only search that has found this site was one for “robot game c++”.  It intrigued me and I discovered that I’m second from top in Google for that search.  I wonder what the person who used this term was looking for.

If you have any thoughts about what I should program regarding “Robot Game C++” then leave a comment.  I’ll do my best to fullfil your need!

Programming Console Games : pt2

So you’ve got yourself set up to write a console game and I’ve got you looking at the Silver Dollar Game. Surely this is just too simple? In actual fact it probably is. Based on what I’ve said about why program, your going to be a good stage with your programming skill that this game is going to be trivial.

Well, I don’t want to suggest writing a really complicated game in a short blog so I’ll stick with it and learning C++ for console games should be a breeze. So let’s get coding.  Unfortunately, before you code up this simple problem you need to consider your software design.  Planning is all important so here is the plan for this game.


The game is essentially for one player game with the computer playing the opponent.  To be a good opponent the computer needs to be able to find the best next position at each move. The Silver Dollar Game is a variant on the game of Nim.  Without going into too many details, the winning position is when all the gaps between pairs of coins is reduced to zero;  i.e. all the coins reach the left hand side.  To ensure this is the case, moves before this must ensure that you get to make that last move which closes the last gap.  The game doesn’t work with just one coin since the first player can simply move the left most coin to the leftmost position.  With two coins, the first player cannot move the leftmost coin to the leftmost position because it means player 2 will win.  Player 1 needs to ensure that the gap between coin 1 & 2 can be reduced to have at least 2 spaces over a number of turns.  This rule is the same for coins 3 & 4, and 5 & 6, etc.

The rule for this is:

  • measure the gaps between even pairs of coins starting from the right (i.e. n and n-1, n-2 and n-3, n-4 and n-5, etc.) If there are an odd number of coins, measure the gap between the left of the board and the leftmost coin.
  • Using Nim-Sum, (i.e. x-or) combine the gap sizes. If the value is 0, you have a losing position.  If the value is not zero, need to use this value to reduce the gap size and retain the winning position.

How does this poor description translate into an algorithm? 

  • Nim-Sum is; gap1 x-or gap2 x-or gap3 … etc.
  • if this is zero, then randomly move a coin since the position is a loss (or ask the other player to go first!)
  • if this is not zero (an opportunity to win), then find the first gap where Nim-Sum x-or that gap is smaller than that gap.  This smaller gap is the size we want that gap to be so we simply move a coin to make the new gap size, this size!

Simple… next step is write this algorithm in C++.  This will be our prototype or pre-dev game!

Programming Console Games

I’ve been planning some tutorials for helping anyone get into console games programming.  Programming video games for consoles is not easy but everyone needs to start somewhere.  The only restriction I’m making is that you learn C++ since this is the first language you will need to know to earn a living writing console games.

So where to start?  You need:

  1. a computer and operating system
  2. a C++ compiler and integrated develoment environment (IDE)
  3. a software development kit (SDK)
  4. some tutorials (code snippets)
  5. a simple game idea
  6. a passion for computers, programming and ultimately debugging

So which of each?  Obviously you can make up your own mind but I’m going to try the following:

  1. a dell laptop and Vista
  2. visual c++ express edition
  3. Allegro (maybe Allegro Simplificator if the C++ side holds up), maybe libSDL
  4. browse the other articles in this blog for snippets
  5. anything here but lets start really simple with a coin shuffling game (Silver Dollar Game)
  6. this is up to you – you’re going to have to persevere when everything doesn’t work

If you have to alter part 1 (say to MacOS or Linux), then only part 2 needs to change.  The SDK I’m using will work on Mac OS X computers and Linux based computers.  I won’t go into detail about how to get your compiler and IDE working on your OS (including Vista).  There are plenty of links around the internet, just use your favourite search engine.

Finally: If you manage to make a great game using this blog as  your starting point, please contact me.  The only reason I’m doing this is to help kick start the next generation of games programmers.

%d bloggers like this: