Unity – Updated Amazing Racer Project


We had an enjoyable session today and we were indebted to Chris for his drone demonstration.

In the Unity group, we looked at how the player could be automatically placed at the spawn point at the start of the game and returned there should they fall into the water at any point. We also saw how a sound effect can be added to help the user understand that they’ve been teleported when this occurs.

The whoosh sound effect that I created can be downloaded from here. For those who weren’t there today: I simply recorded myself making a whooshing noise with my mouth. I then used a freeware, cross-platform, program called Audacity to remove the silence at the start and end of what I’d recorded and to add a few random effects until the sound was less human-sounding and more game appropriate. Audacity can be found here, for anyone who wishes to play around with sound effects.

We added a finish point and surrounded it with a sphere collider; this is to detect when the user reaches the finish point beyond all the small lakes.


We also added some fireworks to draw the players eye to the finish zone, so that the user instinctively knows to head in that direction once the game starts.

Finally, we saw how to stop the user moving at the start of the game until a start button is pressed. We will expand on the techniques shown here to show the time taken to cross the map, to allow the user to see their best time and to restart the game. When that’s done, our game will be complete.

The project I uploaded late last week to Dropbox has been updated with all the changes from today. It includes the sound file I described earlier. It also has the latest version of the Standard Assets, which have recently been updated to Version 1.1. You can download the updated project from here. Please remember: install the latest version of Unity before opening this project!

One final note: the fireworks are currently disabled in the project. While they work perfectly, from a player perspective when the game is running, a bug in Unity Version 5.3.1f1 means that they generate a huge number of console errors. It’s fine to enable them when you want to run and hopefully we will be able to switch them on again permanently after the next program update without any console errors.

See you all next week!

Unity – Amazing Racer

Screen Shot 2016-01-28 at 9.03.52 p.m..png

This week we worked on decorating our map with textures, trees and grass. We also worked on establishing a spawn point for our player and a trigger which would detect when our player had fallen in the water.

Some people have been having technical problems or have been lagging behind for one reason or another. We decided it would be a good idea if everyone had a copy of my project so that we could all move forward from the same point.

The first thing you will need to do is to:

Upgrade to Unity 5.3!

This is very important or you will have problems opening my project. When you start Unity it should prompt you if an upgrade is available. Failing that, you can use the “Check for Updates” option in the programs Help menu.

Once you have upgraded you can download my project from here:

Kieran’s Amazing Racer Project

Be warned, this file is quite large at almost 400MB. Please leave yourself enough time to download it, depending on your internet speed.

Extract the contents of this ZIP file into a directory on your machine. It won’t appear on the splash-screen list of recently opened projects when you open Unity – you’ll have to use the little Open button there to select the folder in question. Do also make sure you’re opened it at least once, as opening for the first time causes the assets to be reimported and this takes some time.

Please try to have Unity updated and the project copied to your machine before Saturday! Thanks and see you then.


Beginner’s Scratch Challenge 9 – Storytelling

We had a great day in Scratch Beginners on Saturday! We created a project in which the Sprites all communicated through the use of broadcasts. Each broadcast caused a reaction in the other parts of the program such as the other sprites and even the stage. To begin, we all added two sprites from the library and two backdrops from the backdrop library to the stage. My sprites came with several costumes already supplied, but you can use whatever costumes you like. CDA-S5-Challenge_09-Storytelling-how to

Next, each coder had to decide on a story, conversation or a joke to have one sprite tell the other. After that we placed each character apart on the screen by using the GO TO: command and then had then move together using the GLIDE command. Each part of the conversation is shown on screen with the SAY FOR 2 SECONDS command after which the same words are broadcast to the whole program using the BROADCAST command. The second sprite responds to the first Sprite’s broadcast by SAYing his part of the joke and then broadcasting the same words. This goes back and forth until the story is finished. Keep trying out your scripting by pressing the GREEN FLAG and seeing how it is working. CDA-S5-Challenge_09-Storytelling-1st sprites script

CDA-S5-Challenge_09-Storytelling-2nd sprite script

At the very end, I have the 2nd Sprite send out a final broadcast which causes the backdrop to change and music to play while both Sprites simultaneously do a dance! I just threw that in for fun and to show that BROADCASTS can cause any part of the program to switch on or off. Here is the slide show if it helps a bit more: CDA-S5-Challenge_09-Storytelling. Also, I put my program up on the SCRATCH.MIT.EDU website for you to play with. Search for projects made by cdathenry1516. This project is called –JulieKnockKnockJoke23-01.

Hope to see you all next week when we work on a guessing a number game which requires input from the user to guess the number the computer has picked!



This week the PiDojo group started to experiment with building our own robots.

To build a basic robot all you need is motors, a driver chip, some batteries and of course a Raspberry Pi.

IMPORTANT: Do not connect a motor, no matter how small directly to the Raspberry Pi, it will damage your Raspberry Pi. 

We use a L293B motor driver chip which is like is a little current amplifier that takes a low-current control signal and then turns it into a higher-current signal that can drive a motor.

I would also recommend using separate batteries to power the Raspberry Pi and the Motors as the motors can sometimes draw a lot of power from the batteries for example when starting up and this could cause the Raspberry Pi to restart. We used a “Power Bank” from Penneys to power the the Raspberry Pi and four AA batteries to power the motors. Here is a drawing of our circuit.


We wired up our circuit and placed it into a container that had the motors attached to it.


Once we had our robot assembled we loaded up this code and tested it out then we tried to program our robots to follow a preset path but the lack of a third wheel made this very difficult, something we will have to improve for next week.

This week was also our first time using Gpio Zero which is a new Python library for controlling the GPIO pins on the Raspberry Pi. It makes physical programming much more straight forward and really helped to speed up our work this session.


“Tick” Technique in Scratch – Illusions and 3D printing!

Today in scratch advanced, Mark covered a very useful method to organize your programs better if there are lots of moving sprites – which he calls the “tick” technique.tick_loop The idea is that a single master loop ticks time and the Sprites react to this tick in their own way.

We showed two examples of using this tick – an optical illusion that shows that things can move in circles while just doing straight lines and a technique for building 3D models by layering sprites the same way that a 3D printer layers resin.



The FULL Instructions for today’s projects are here – Enjoy!!

It would be great if you tried out some of your own Tick projects, and demonstrated them next week at Scratch Advanced!

Playing With Unity Physics and Wheel Colliders

Hi folks. This week we continued work on our Amazing Racer project. We explained what heightmaps are and we imported a standard heightmap into a terrain object. We also added water and trees to our game map.

Apart from that, I also showed two little fun experimental projects that I worked on over the Christmas break to test a couple of game ideas. I thought I’d upload them here so you can play with them yourselves; maybe even use them as the basis for a game idea?


The first project, called “Physics Test”, is just a Jenga-like tower of bricks, a ramp and a dropped sphere. The sphere and the bricks have custom physics materials to define their friction and bounciness. It can be downloaded from here.


The second is called “Wheel Collider Test”. It uses Unity’s Wheel Collider on a simple vehicle made of a box and four cylinders. The whole thing is on a simple map made from a basic terrain with a flat interior and a raised edge (to keep the car in!). The awesome (cough) textures are from random Windows backgrounds. The Unity documentation for the WheelCollider can be found here. I note reading it that our project sets up the visual elements to represent the wheels differently to the method recommended in the documentation, but it seems to work OK. The project itself can be downloaded from here.

See you all next week!

PiDojo-Project Ideas

In the Raspberry Pi group we had planned on everybody building some small projects together before the Christmas break and then moving on to bigger individual projects after Christmas. Unfortunately we’re a little behind on our small projects due to the taster sessions in the beginning of the year and the fact we didn’t have a proper session in December but we’ll catch these up in the next couple of weeks.

However as the difference between a good project and a really great project is sometimes the idea behind it I decided to spend most of this week’s session looking at ideas for our projects. I asked the Ninjas to ask themselves the following questions if they were stuck for ideas.

  • What do I like to do?
  • What/Who do I care about?
  • Is there something I’ve always wanted?
  • What’s going on? (In the news, in my community etc.)


As you can see from the picture we had loads of ideas to start with and I’m sure we will come up with many more before we finally have to start working on our project.

We also discussed the Coolest Projects Competition but as we’re planning on sharing information with the whole Dojo soon I won’t say much about it for now but here’s a picture from last year’s competition.coolest pic1


ModderDojo Topic 7: Planning and Building a Complex Structure Mod in Minecraft


This topic continues from ModderDojo Topic 6: JavaScript Operators and ScriptCraftJS Drone Functions.

Sharing a Server:

In previous weeks before we stopped for Christmas, some people struggled to make progress through no fault of their own: they were hampered by CanaryMod crashing a lot on some people’s computers.

To work around this, everyone can connect to my computer as the Minecraft server, and I will also create a shared folder on the computer so you can drop your mods into it.

Please review these notes from several weeks ago: Topic 2: Connecting to Each Other’s Servers.

This Week’s Challenge:

This week (and for the next week or two), your challenge is build a substantial mod in ScriptCraft that, when you run it, will create an impressive-looking structure!

A key step to success here is planning and design: as I have said before, a  programmer’s most important tools are paper and pencils, for figuring out what you want to create before you write code for it.

You should review the following:




Happy New Year 2016!


CoderDojo Athenry will resume on Saturday 16 January 2016 at our usual time and place, 12:00 in Clarin College Athenry (formerly called Gairmscoil Mhuire / The Tech). See you there!

We are very grateful all of our members in CoderDojo Athenry for your involvement and enthusiasm during 2015. And of course we are hugely grateful to our mentors who are so generous with their time and expertise every week, and to the school for accommodating us.

We are looking forward to another year of fun coding and excitement learning about new technologies in 2016, and we hope you are looking forward to it too!