Hour of Code is Here!


This week marks the second annual Hour of Code campaign, a global initiative in which millions of novice coders (including, this year, President Barack Obama) are introduced to the fundamentals of computer programming, in the hopes of sparking the development of a new generation of technological creators. On December 6th, members of the Academy’s Game Studio, a pre-professional program for high school students interested in the art and science of game design, participated in digital art, sound design, and code challenges intended to develop creative thinking and problem-solving skills.
A special Hour of Code challenge was issued this week to Game Studio coders, asking them to develop creative mods on existing games by hacking C# code files. Students were faced with the problem of deconstructing the variables, functions, operators, and overall logic used in the original program in order to change the mechanics of the game. They breezed by common syntactical mistakes that they have learned to spot since they began coding a few weeks ago, like missing end-of-statement semicolons and insufficient closing parentheses, while wrestling with larger problems of circular game logic and nested loops.
Below is an example of the sort of script students are expected to comprehend at a glance, debug, and modify. Those of you with coding experience – see if you can find three errors in the code!
using UnityEngine;
using System.Collections;
public class PlayerController : MonoBehaviour
    public int speed = 10.0f;
    void FixedUpdate ()
        float moveHorizontal = Input.GetAxis(“Horizontal”);
        float moveVertical = Input.GetAxis(“Vertical”);
        Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical) * speed