Code.org: Learning To Code Your Own Game

Henry Nguyen
3 min readNov 19, 2017

--

Code.org is a non-profit organization committed to expanding access to computer science to women and other underrepresented minorities. Code.org attempts to increase diversity in computer science by encouraging students of all backgrounds and grades to participate in exercises that are essentially coding lessons.

Source: Code.org

Excercises on Code.org are catered to students of all grades, ranging from Grades K-5, Grades 6–12 and to University level students. Exercises include learning to make your own apps/games and websites using blocks (objects), JavaScript and CSS, etc. I will be trying a one-hour tutorial that is designed for all ages. I decided on coding my own basketball game. The exercise was based mainly on attaching blocks to other blocks in order to code commands. For example, the first task I was given was to attach the “Move left” block to “when left arrow” block. After completing this task I was given a brief run through of what all the commands did and how the game worked.

Source: Code.org

After completing the initial “practice phase” the difficulty of the exercise increased, requiring me to attach multiple blocks in succession and to think about what each command would do to the ball. After completing that puzzle, I was confronted with yet another puzzle that was even harder than the last. I noticed that there was a specific command for simple things such as playing a bounce sound when the ball hit the goal, and scoring points when the ball hit the goal post.

Source: Code.org

The 2nd last level of the exercise featured many new blocks such as “when run” and commands to change the speed of your hand and the speed of the ball. These new variables made the game much more complex. I had to go through a trial and error process during this level in order to progress because the objectives of this level were much harder to achieve in 1 go.

Source: Code.org

When I reached the final level of the exercise, I was finally able to create my own basketball game with my own rules and objectives. I decided to fool around and I made a new ball spawn each time the ball hit my hand, hit the goal, and when it hit the wall. The results were hilarious as balls were just flying everywhere.

Source: Code.org

In all, the exercise code.org provided to program my own basketball game was enjoyable and I learned how to code using blocks (objects). The exercises provided allowed you complete freedom when it came to programming your own game so you could experiment with blocks and what happened when certain commands interacted with other commands. I could see students of all age groups enjoying these exercises as they were challenging yet also very fun.

Source: Code.org

--

--