Week 2 – 2015 Scratch Beginneers

Hi everyone,

This week we took a look at the open source graphics program called Paint.net

It’s a very useful piece of software for editing and working with photos and clip art. Over the next couple of weeks we will use it to clean up our photos of our 3D playdoh models or Lego figures.


Here are the PDF version of the notes: CDA-S4-Challenge09-LearnAboutPainting.pdf

See you all next week

Week 2 – Scratch Beginners – Building on our first game

Hi everyone,

Great to see you all there on Saturday. This weeks starting point was our game from last week. We wanted to add extra functionality. We added code to the Snowflake so that something happened when the Penguin touched it. Most people added some sound.


We also made our first variable. We did this so that we could keep track of our score. Using this score we also could add code to make something happen when you reached a certain score and win the game. Again here we added a sound and switched backgrounds.


We learned and used a lot of new code this week and we will see over the coming weeks how we can incorporate it into many different types of games.

Why don’t you try using all the code you have learnt so far to create your own game. We will take time at the beginning of next weeks session to look at any games that people want to show us.


See you all next week!

Here are the notes from todays session in PDF CDA-S4-Week_02-FirstGame-Part2.pdf

Python Games – Week 2 : Preparing for our Adventure Game

We made fantastic progress again in the Python Games stream.

We covered Escape Characters, Functions and Boolean Logic (with a quick look at logic gates). Then we looked at the Dragon’s Realm game code available here.

We had a brainstorming session with some great ideas from the ninjas for our own adventure game which we are going to start coding next week.


My slides from today are available here.python session_2

Topic 3: Creating our First ScriptCraft Mods


(Notes updated September 2015.)

Previous Topic: Connecting to Each Other’s Servers.

Our First Mod: sayhi.js

I’ll show you how to write a very simple one, sayhi.js, and then a more complex one, scraper.js. After that, it’s up to you to figure out what you can do!

In the Canarymod folder, find the folder scriptcraft / plugins, then make a new folder with your name (or any unique folder name).

Using Notepad++, type in the code shown below and save it in a file called sayhi.js. Here are explanations of what everything means:


Try it out in Minecraft and see if it works!

NOTE: Every time you create a new ScriptCraft program or edit one, you have to type /js refresh() in Minecraft to update your changes. If no commands run, make sure you are opped. (In the Canarymod window, type op <your_mincraft_name>).

To run it, type /js sayhi() in Minecraft.

A More Complex Mod: scraper.js

This makes the skyscraper shown above. We will figure out together how it works!


Topic 2: Connecting to Each Other’s Servers


(Notes updated September 2015.)

Note: This continues what we started in Topic 1: Getting Started with ScriptCraft and JavaScript.

Next step: Creating our first Scriptcraft mods. https://cdathenry.wordpress.com/2014/10/17/topic-2-connecting-to-servers-and-creating-our-first-mod/

Previously, we installed a Canarymod server and inside it we installed ScriptCraft, a mod that will allow us to build structures in MineCraft by writing JavaScript code.

Canarymod is a Minecraft Server. Therefore, the instructions we followed to connect to it were:

  • Start MineCraft, making sure it’s the same version (1.8 in our case)
  • Choose Multiplayer, then Direct Connect and enter localhost as the server address
  • If this works, in your CraftBukkit window you’ll see a message that you connected.

Here, localhost is actually means “the address of this local computer”.

But you can also connect to a friend’s computer, if you are all on the same network and you can find out their address. (If you are on different networks, things get a bit more complex: you will have to search online about how to set up port forwarding on your router, and you will probably also need a free Dynamic DNS service.)

On a local network, to find your IP address, open a command window. (In Windows, run or search for cmd.) In the command window, enter the command ipconfig and read through to find an entry like this:

Wireless LAN adapter Wi-Fi:
    Connection-specific DNS Suffix . :
    Link-local IPv6 Address . . . . . : fe21:9ba2:9db6:13e9%4
    IPv4 Address. . . . . . . . . . . :
    Subnet Mask . . . . . . . . . . . :
    Default Gateway . . . . . . . . . :

The IPv4 address is what you need. Get a friend to start Minecraft on their computer, then Direct Connect and enter your IP address. They will then be connected to the server on your computer!

This can be handy if you want to work on projects together.

Next step: Creating our first ScriptCraft mods.

Scratch Beginners – Week 2 – Adding More Functions to First Game

CDA-S3-Challenge01-FirstGame-Part2We had a great crowd for our second session of Scratch beginners. Julie did a great job as lead mentor in Martha’s absence.

This week, we added lots of new functionality to our first game: make things happen when Jaws catches the Diver and keeping track of lives.

Here are the presentation slides from the day, in PDF format: CDA-S3-Challenge01-FirstGame-Part2.pdf

See you next time!

Python Beginners-Week 2: Our First Real Game

We had a good turn out at the python group again today. We did a lot of typing which some of the younger Ninjas found hard going. We won’t be doing that much again for a few weeks. We did a number guessing game which contained some concepts which are used in most computer programs. Our number guessing game is explained in chapter four of “Invent Your Own Computer Games with Python” by Al Sweigart http://inventwithpython.com/chapter4.html

Beginners Scratch – Challenge 2 – Guess Numbers

Today’s challenge: write a number guessing game!

In doing this, these are the big ideas you will learn about:

  1. Input and output: entering numbers and displaying them
  2. Using variables
  3. Comparing values and making decisions

Here are my notes from the day, in PDF format: CDA-S2-Challenge02-GuessNumbers.pdf.

If you would like me to send you the PowerPoint slides of my notes, get in touch via twitter or by leaving a comment.

Advanced Scratch – Week 2 – Buttons and Crazy Images.

What are we going to learn this week…

  • How to imitate a Button
  • How to use the Pen controls
  • How to use sliders


 Wouldn’t it be great if you could have buttons in Scratch, that you can click and make things happen?

Well you can, there might not be a code block to do it, but we can make one.

 You will need a Sprite with Two Costumes

  • One for the Up position
  • One for the Down Position


See how I have given the Sprite a meaningful name and also each costume has a name. The only difference between the sprites is the bottom one has no shadow and is slightly lower and left (covering the shadow).

Cool Tip: You can export the Button Sprite which will save it with all the code as well. This means it is easy to add Buttons to any other Scratch Projects. 

Crazy Images.

We are going to use the Pen Tool to draw some fancy Spirograph like images.

First we need a Sprite that will do the drawing, I just created an invisible Sprite, so you only see the Line being drawn.

Spirographs work using circles, but we are going to use triangles, squares, pentagons, hexagons and heptagons (7 sided).

If you walk 10 steps turn 90 degrees and walk another 10 steps and again and again, you have wlaked in a square, but if you change either how many steps or the angle you turn by a very SMALL amount and just keep[ going you can generate some very interesting patterns.


We will also be using sliders to control the nember of sides to the shape and the change in angles.

Sliders are variables that are displayed on the screen with a slider control to change the value as the program is running. To get the variable to show as a Slider just dbl click on it, once, changes it to a Slider, dbl clicking again, removes the name.

If you right click on the SLider you can set Min and Max values.

The code to create the Spirals is split into two parts. One runs when youclick the Green Flag, this just sets everything up ready.


The next piece of code is what does all the work, notice where the Slider variables are used and how the code makes more sense when you give variables descriptive names.