FredXCoders at the England Run Library

A big thanks to the England Run Library for hosting us during our week long coding event teaching Java through Greenfoot and Minecraft modding. Special thanks to Joy McIntire for organizing the event and securing all the laptops we used. Here is a breakdown of the lessons we did:

  1. Intros
    1. Java
      1. Programming language which has rules like what we see in English
      2. Parts of java:
        1. Objects are things
        2. Variables hold information
        3. Methods do stuff
    2. Greenfoot Intro
      1. Badgers
      2. Lunar Lander
      3. Baloons
    3. Minecraft Intro (Instructions)
  2. Boolean Logic
    1. Learn about the uses of AND (&&), OR (||), and NOT(!)
    2. Greenfoot
      1. Fix TicTacToe
      2. Simple Game
    3. Minecraft
      1. Changing what happens when a block is broken/clicked
  3. Familiarization with Java
    1. Greenfoot
      1. Water Works
      2. Tower Defense
      3. Marbled
    2. Minecraft
      1. Throwing players in the air
  4. More Minecraft
    1. Block Recipes
    2. Networking: who wins when server and client are both different code?

Java Notes: Variables

Welcome to our lesson on variables in Java. First, get the project here:

http://www.greenfoot.org/scenarios/570/get_gfar

This is a simple little program but it could use a little code oraganization. Use this code instead:

http://pastebin.com/Wh9xy6AX

That cleaned up our code a bit! Once our lesson is done, you can check out these games:

http://www.greenfoot.org/scenarios/189

http://www.greenfoot.org/scenarios/494

http://www.greenfoot.org/scenarios/1083

Next Event: Now with Hacker Session

For our next event we’re going to add a new element: hacker sessions. We’re going to give a chunk of time for students to collaborate freely on their own projects. This can be game development with Scratch, website development with HTML, Minecraft Mod development, hardware, or something else. It’s up to you!

Maybe you have a great idea for a game but don’t know how to program it. Or perhaps you’re just interested in trying out a new programming language. Maybe you want to take apart some computer hardware to learn how it works (we’ll bring some). Maybe you’ve got an artistic spurt and would like to help design images for a project. Whatever your ideas this will be the time to explore them in a start-up like atmosphere. Teams will be self-organizing so no pressure to work on something you don’t want to. Hack it together and make it work!

If you have your own laptop go ahead and bring it. If not that’s no worries! You can find a group to work with or work on a hardware activity. Mentors will be floating around to help

Note: If interested in Minecraft Development for this portion of the event check out this new post for install instructions and be sure to setup before coming to the event as it can take some time.

Setting up Minecraft Mod Development (Updated)

Below are the instructions for setting up minecraft using the 1.7.10 version of Forge on a Windows computer, now with a one click forge/eclipse setup process!

JDK

  1. Go here to get the Java Development Kit.
  2. Click the button to ”¬†Accept License Agreement”.
  3. Find this link and download: jdk-7u65-windows-i586.exe (the version may be higher than u65 which is ok as long as it is jdk7 and not jdk8)
  4. Open the download and install it.

Alternative JDK here: https://github.com/alexkasko/openjdk-unofficial-builds#openjdk-unofficial-installers-for-windows-linux-and-mac-os-x

Eclipse/Forge

  1. Get the eclipse/forge installation file here.
  2. Extract this on to your desktop.
  3. Go into the “dev” folder. (Depending on how you extracted it there may be another “dev” folder. Go into that one if there is).
  4. Double click on the file “oneTimeSetup.bat” file. This will run your forge installation. You should see a window pop up which has a variety of messages. This process can take up to half an hour depending on your internet connection.
  5. When the first part is done you should see a message saying “BUILD SUCCESSFUL” and “Press any key to continue”. Hit enter and Eclipse will start up.
  6. When eclipse loads click the green “play” icon in the upper left which says “Run Client” when you hover over it. This will start up minecraft with our mod loaded on it.
  7. The next time you want to run Eclipse use the “startEclipse.bat” file in this folder. You won’t need to run “oneTimeSetup.bat” again.

That’s it! Hopefully the one step forge/eclipse installation will help remove issues people encountered in the past. Please leave a comment below if you encounter any issues. Once you have Minecraft loaded be sure to check out some of the previous Minecraft posts to get up to speed with our mod:

Minecraft Recipes | Player/World Manipulation | Ore Generation

Be sure to also check out the GitHub tutorial here to learn more about the social coding aspect of development.

Social Coding Lesson and Challenge

Here is a recap of how to get started with social coding by copying one of our FredXCoders repos:

  1. Go to github.com and create an account. Choose the free option.
  2. Go to the FredXCoders/WebProject here repository and click “Fork” in the upper right hand corner.
  3. Download the Git GUI (windows and mac). Login with your GitHub account.
  4. In the Git GUI you should see the {Your_GitHub_Username}/WebProject in the main panel. Select it and click “Clone” next to the title.
  5. Double click the {Your_GitHub_Username}/WebProject repo to step into it. In the top right corner you’ll see a gear. Click on it and click the link to “Open in Explorer”. This will take you to your local copy of the repo.
  6. Go into the “firstwebsite” folder. Open the file “firstwebsite.html” to checkout the website. For best results use Firefox (or IE if you have to).
  7. Now open the file “info.json”. Replace “{INSERT_FIRST_NAME_HERE}” with your first name and save your changes. Re-open/refresh “firstwebsite.html” to test your changes.
  8. If your name shows up go ahead and commit your changes. Go back to the Git GUI and you should see a message in the upper left which mentions “Uncommitted Changes”. Add a nice message like “Personalized my page” in the “Summary” field and click “Commit to master”.
  9. Next to {Your_GitHub_Username}/WebProject you should now see an option to “Sync”. Click this to push your local changes back up to your GitHub repo.
  10. That’s it! You can verify your changes made it back up to your repo by going to your account on GitHub and seeing that “info.json” was updated and has your name on it.

Challenge
Our website is a bit bland so I invite you all to help spruce it up! Make some changes to firstwebsite.html, firstwebsite.js, and/or firstwebsite.css, test them and submit a pull request. I’ll leave a comment if we get some cool changes and you can re-sync and see what other people have added!