Main menu

Monthly Archives: January 2014

Post navigation

Sorry for being a little late putting this up. This week in the Python group we worked on an online tutorial which is available at Beginning Game Programming for Teens with Python. If you copy the folder Bunnies_and_Badgers from Dropbox here onto your own computer it will make getting started a little bit easier.

Thank you all for coming Saturday on such a nice day and such a busy day of sport as well!
We started our Mario game, where we will use scrolling of objects in the background to achieve movement rather than making Mario move.

It can be a difficult concept to grasp for the younger ones, but we will go through it again next week before we continue on with the game.

Rather than putting up the notes from this week, I will wait until we have the game finished before putting up the completed notes.
I have however, put the game (as far as we did today) on the Scratch Website http://www.scratch.mit.edu. Login with the User name coderdojodathenry and password xxxxxxx123 and you will be able to download the game if you weren’t here this week or have a look at the code to get your own game work working.

This weeks notes are all about putting headings, paragraphs, links and images on our webpages! Have a look at the notes and play around with the new tags that you can learn from them. If you have any questions just send me an email! My email address is on the last slide of this weeks notes. I am going to be at Gairmscol Mhuire during Coderdojo on Saturdays so you can ask me questions there too!

Hi all, the Web Development stream starts this week. It will run alongside the other streams so you can still learn Scratch, Python or Minecraft Modding on Saturdays and spend a small amount of time learning HTML during the week. HTML is fun and the thing we need most is ideas about how webpages should look or ideas about what to put on them! We can then work together to translate these ideas in to webpages! If you are interested have a look at my presentation on getting started with HTML!

We had a great turnout today for our first session of 2014. A very special welcome to our 14 new ninjas who joined us for their first coding session today. I hope you enjoyed your first visit to Coderdojo Athenry.

To ease everyone back in (including myself) we took a look at doing some storytelling. This involved again learning about the X, Y position of the stage, some movement of the sprites using the Glide command and of course testing our code to ensure that our timings were correct.

We look forward to seeing you all next week, when we will be using scrolling backgrounds.

There is an example mod that does nothing in src/main/java, in the package com.example.examplemod. We will make a new one based on this.

Start by making a new package in the same folder, where we will put our own code. Click on src/main/java, then from the menu select File – New – Package, and pick a package name:

Now create a class in it: File – New – Class and give it a name. There is no need to select the “public static void main” option; we will be replacing all the code.

From in ExampleMod.java, copy all of the code, then delete all of the code in your own class and paste in the code from ExampleMod. Now make some changes:

On the top line, change the package statement: it has to correspond to the package you created your class in. Eclipse will flag the error with a red line and its quick fix will allow you to change the package.

On the line public class ExampleMod, change ExampleMod to the name of your class. In Java, the file name and class name have to be identical.

Check that the @Mod statement refers to your class, not ExampleMod. Note: statements beginning with @ in Java are called annotations.

In the body of your class, change the values of the variables MODID and VERSION.

If you like, change the System.out.println line to print a new message to the console window, e.g. “Craft1 mod initialised.” Lots of messages are displayed in the console window when Minecraft runs; you should see your message near the end.

Now run Minecraft and see if your mod exists. The name should be there and your hello message on the console, but it doesn’t do anything because we haven’t added code for anything useful.

If this is your first time running it, you will be prompted to create a workspace: the default location is fine

The first time, a Welcome screen appears, which you can X to close.

Java code belongs in classes, classes are organised in projects, and projects are in a workspace. In Eclipse, you can only have one workspace open at a time, but it can have multiple projects in it and each one can have multiple classes.