Student coding a platforming game in C# using Unity.

A student from Royal Grammar School works on the platformer game we created on Day 3 of the course.

Last week, we had the privilege of running a three day Coding Course for a group of 30 students at Royal Grammar School in Guildford. We had visited the school a year previous, running a combination of our BBC micro:bit Workshop and our Coding Games Workshop over the course of a day, so it was really lovely to be invited back.

This time, we were invited to run a three day course with a group of students, aged 11-13. It was amazing to have three whole days with the same group as we could cover a range of programming languages, approaches and techniques to expose the students to multiple, complimentary coding environments.

Day 1 was focussed on the BBC micro:bit. We ran a modified version of our BBC micro:bit Workshop, allowing the pupils to create apps and games using the micro:bits, an Internet of Things device. Day 1 was focussed on learning coding logic, so we stayed within the Block Editor for the day, occasionally looking at what the underlying JavaScript looks like. The aim was to teach the pupils how to approach coding, and to teach them how to think like a programmer. We created several apps and games during the day, including a fitness tracking app, a dice app, and a full game which ran on the micro:bit. We also looked at how we could code up music to play on the micro:bits too. Some of the budding musicians in the room coded up some popular movie theme tunes including the opening bars to the Harry Potter, Lord of the Rings, and Star Wars movie theme tunes!

Student coding a platforming game in C# using Unity.

A student from Royal Grammar School adds the finishing touches to the level he built, coded up in C#.

On Day 2 we began to focus on writing code from scratch. We used Python for the duration of the day, learning the fundamentals through a series of exercises. We manipulated strings, performed complex calculations, and converted variable types. We built some simple procedures that could manipulate strings or numbers and set the pupils some challenges which they excelled at. Towards the end of the day, we took what the students had been taught so far and we created some additional apps for the BBC micro:bit, this time coded – from scratch – in Python! It was really cool to show the progression from thinking about how to approach coding up an app on Day 1, where we coded visually, to then seeing what the same projects would look like with real code. We even coded up a working spirit-level app, by accessing the micro:bit’s built in accelerometer.

On Day 3, we focussed on game design and development. We challenged the pupils to create a couple of different games for the micro:bit, and then we turned our attention to Unity, a real-world gaming engine used to develop many of the popular games the pupils play! Throughout the day, we worked with the pupils showing them how we could write code for a platforming game, using what we had learnt in Python. We used C# to code movement of characters, respond to a games controller, and code up some logic to handle enemies and scoring. We created a platforming game where players needed to collect keys in levels full of enemies in order to unlock the door to the next level. The pupils then had an hour or so, before the end of the day, to create their own levels, making them as challenging as possible.

It was amazing to have the entire three days with the same group of students, and the feedback from the pupils, and their parents, has been amazing, with many students saying that they’ll be continuing to work on the gaming projects over the summer. In fact, on the evenings between each day, many of the students had continued coding at home and came in with some amazing projects created in their own time.

It was a joy to work with RGS, and we look forward to visiting them again soon!