Introduction

After several attempts at making games on JavaScript and getting stuck, I started writing this book to organize my thoughts and create a future reference. It has slowly started to grow into a comprehensive resource and has shown great potential as a learning tool and a basis for great gaming experiences.

Throughout the book I will explain and demonstrate several fundamental concepts in game programming. Just as programming in general has its own vocabulary (class, function, variable, object), game programming also has a vocabulary that has been developed over time. Concepts like engine, game loop, camera, hitbox, timer, scheduler, controls, sprite, physics, scene, and many more are the basis upon which a game is built.

During the course of this book, we will go through each of those concepts and build upon them to create small but fun games.

The programming langage we'll be using is JavaScript. Despite the abundance of other langages and frameworks, today JavaScript is the dominant language for building and publishing software. This is because software written in JavaScript can be deployed and published with just a few clicks, and the users of the software can immediately use it by visiting a website.

This is not a book that will teach the programming essentials, and some programming experience is required, particularly in JavaScript.

Next: Aesthetic principles