Creating Games with JavaScript

git.io/cgjs-15

Victoria School 2015 Choice Elective

Benjamin Tan | Ng Wei En

Overview

Ever wondered how games worked?

In this course, we teach JavaScript, a popular web programming language, and guide students through creating their own games, including the classic Tic-Tac-Toe game. By the end of this course, every student will gain a basic understanding of programming (in particular the JavaScript programming language and associated technologies) and be able to write simple games.

* Students are warned that this choice elective is quite intensive and will make use of math.

Lesson 1: “Hello, World!”

In this lesson, we will introduce the JavaScript programming language, and cover the basics, including statements, variables, primitive types and various operators. Of course, we’ll conclude with the customary “Hello, World!” tutorial.

Lessons 2 & 3: Guess the Number

In this lesson, we will cover more JavaScript fundamentals such as branches and loops, objects and functions. Then, we’ll put all these together to create a simple Guess the Number game.

Lesson 4: Tic-Tac-Toe (Logic)

In this lesson, we will teach about arrays and prototypes. We’ll then go through and write a program to cover the logic of a simple Tic-Tac-Toe game.