small medium large xlarge

3D Game Programming for Kids: Create Interactive Worlds with JavaScript


Cover image for 3D Game Programming for Kids

3D Game Programming for Kids

Create Interactive Worlds with JavaScript


You know what’s even better than playing games? Creating your own. Even if you’re an absolute beginner, this book will teach you how to make your own online games with interactive examples. You’ll learn programming using nothing more than a browser, and see cool, 3D results as you type. You’ll learn real-world programming skills in a real programming language: JavaScript, the language of the web. You’ll be amazed at what you can do as you build interactive worlds and fun games. Appropriate for ages 10-99!

Printed in full color.

Customer Reviews

I was thrilled how much my son got into programming as a result of this book. He
spent hours with it and was often surprised when his “screen time” was over because
the time just flew by. Although the book doesn’t delve into the fundamentals of software
programming (how computers store and retrieve data), kids get to see the results of
their programming right away—the pictures and animations that they created—and
are hooked into wanting to learn more.

- Mark Musante

professional software designer

I would recommend this book to anyone my age that is interested in coding or technology.
It was very helpful and insightful about the basic (and the more complex) parts
of standard coding. This book would be great for anyone looking to jump head-first
into coding.

- Hana B., age 15

This is the best book a beginning programmer could get. It teaches programming
concepts in fun and entertaining ways. This book is a great start in learning to program!

- Alec M., age 13

It has been great fun reading this book. It takes me back to when I fell in love with
programming. After having spent the past twenty years programming solutions on the
server side, I find this 3D book a welcome diversion that offers new concepts and ideas
with instant visual feedback! I hope the book finds its way into the hands of an inquisitive
child who gets hooked on computer programming like I did.

- Darren Hunt

director, Algorithmic Solutions Limited

See All Reviews

About this Title

Pages: 308
Published: 2013-10-23
Release: P1.0 (2013-10-23)
ISBN: 978-1-93778-544-4

You’ll jump right in and write games and simulations while learning programming fundamentals. You’ll use the ICE Code Editor, which was created especially for this book to make it easy for you to get started with JavaScript programming. With the ICE Editor, you’ll see the results of your work right away. Want a red donut? You can make hundreds of them, spinning around like crazy right next to the code you just typed.

You’ll do hands-on coding in every chapter. You’ll start by building simple animated shapes, then make your own player—who can do cartwheels! You’ll learn how to build your own games from start to finish, including a monster eating fruit, a cave puzzle, and rafting on a river. You’ll animate simple shapes to create a model of the solar system, and make your own website so that you can show off your games with your friends. If you just want to make games, jump to the lessons focusing on projects. To understand some of the theory better or if you need some help with functions, turn to the chapters that explain the programming concepts. We’ll walk you carefully through all the math needed to bring games to life.

Best of all, you get to create awesome games and say, “I made this!”

Q&A with Chris Strom

Why did you write 3D Game Programming for Kids?

Like many programmers, I wanted to share my love of programming with my own kids as well as the next generation of programmers. I chose to wrap the message in the deliciousness of 3D gaming because that is what most kids (of all ages) want to create.

Let’s face it, no one learns to program because they think programming sounds like fun. Never in the history of the world was somebody sitting around the house or playing outside when the thought suddenly struck them that, “Hey, I think I’d like to learn programming, it sounds fun!” No, we all learn to program because we want to create something amazing.

And for the vast majority of kids, learning programming is something to do in order to create incredible games or weird simulations. My hope is that this book will enable kids of all ages to invent those things. And, if they fall in love with programming itself, I would not mind in the least!

Why JavaScript? Why not Python or some other language?

JavaScript makes so much sense for this book, it would have been a crime to try it in a different language. The initial reason that I opted for JavaScript was I wanted no barrier to getting started. Learning to program is hard enough without the initial pain and frustration of installing languages and tools. With JavaScript (and the ICE Code Editor web page) all a new programmer needs is a browser. In the Internet age, what could be simpler?

Most kids won’t want to hear this, but I also opted for JavaScript because it is extremely practical. It is the language of the web—web sites, web pages, web applications, and mobile applications are all built with JavaScript. People who know JavaScript are well prepared for the digital future. Being practical does have some advantages—like being able to share games and embed them on your own web sites!

And I have to admit that I love programming JavaScript. I have been programming JavaScript myself for years and never tire of it. I love it all the more for the incredible tools and libraries that have sprung up around it recently—especially the amazing Three.js library that we use throughout the book.

What kind of games will I be able to make with this book?

The book includes a nice variety of game types. Much of the first half of the book is spent creating a 3D player in a 3D world with a focus on making it as realistic and playable as possible. After that, we learn space simulations, puzzle games, mini-games, and games that simulate real-world physics. Some games include scoring, others a countdown timer, and some a little of both. Even though the name of the book includes “3D,” we also spend time on two dimensional games (think Super Mario Brothers™). About the only thing we will not talk about is multiplayer games—maybe that’s something for another book!

We won’t go into great detail about all of these things—this is a getting started book. But you should see enough to know how to start building these on your own. I cannot wait to see what you create!

Will I learn enough to be able to move on to other programming languages?

Absolutely! Programming languages are like spoken languages—there are lots of both kinds of languages and the more you learn, the better you get at learning. This book covers a ton of programming knowledge in addition to describing games and 3D concepts. Much of what you learn about JavaScript will be of use as you explore other programming languages.

That said, JavaScript is a fantastic first language to learn. It is the language of the web and you can use it to do an amazing variety of things — from creating web pages, to making web applications, to making games, to even programming robots! You could program only JavaScript for years and still learn something new every day, which is what makes programming so much fun!

What You Need

You need the latest version of the Google Chrome Web browser, available for free from Google. You also need an Internet connection to access the ICE Code Editor the first time. ICE Code Editor will be loaded onto your computer, so you won’t need Internet access for later projects.

Contents & Extracts

Full Table of Contents


Project: Creating Simple Shapes excerpt

Playing with the Console and Finding What’s Broken

Project: Making a Player

Project: Moving Players

Functions: Use and Use Again

Project: Moving Hands and Feet

A Closer Look at JavaScript Fundamentals

Project: Turning Our Player

What’s All That Other Code?

Project: Collisions

Project: Scavenger Hunt

Lights and Materials

Project: Build Your Own Solar System

Project: Phases of the Moon

Project: The Purple Fruit Monster Game

Project: Tilt-A-Board

JavaScript Objects

Project: Cave Puzzle

Project: River Rafting

How the Web Works

Making Your Own Web Sites

When ICE is Broke


Chris Strom is a relentless public learner, with more than 1,000 blog posts serving as research notes for his writing. His books include Dart for Hipsters, The SPDY Book, and Recipes with Backbone. He has more than ten years of experience programming in Perl, Ruby, JavaScript, and whatever his current obsession happens to be. Chris lives in Baltimore, Maryland with his wife, three children, and a goldfish named Martin Tanner.