Ch001 - Introduction
Introduction
Learning to code can be like a tricky puzzle to solve. At times you get stuck. It helps to have a project you really want to get working. In this book creating a Retro Platform Game is that project. Part one of this book is a structured start covering the basics. Part two encourages you to choose your own adventure, offering you a choice of many missions with supporting working code examples. This lets you add new features, complexity and style to make the starting game into your own designed game experience.
We will make our games on the web in a code playground called Glitch.com. This means that we can easily share our coding creations as part of web pages. You can get your friends and family to play and test the games you create.
What this Book is and isn’t
This book is:
- a great way to get started making a simple 2D arcade style game
- a fun way to find out about the basics of the coding process
- an introduction to Javascript and some of the ways it does things
- a partner guide to support more hands-on collaborative workshops
This book has limits! It’s a short book that you can progress through quickly. Here are some of the things that we don’t cover;
- Advanced 3D approaches to game making or any role playing elements
- Systematic ways to learn a programming language (we pick up concepts when we need them)
- Complete guide to the most advanced approaches to writing game using the Phaser code library
How we learn is described in more detail in a chapter in the Appendix. In a nutshell. We learn by diving into the process of making games by tinkering with a simple (but slightly broken) grid game. Then you have the choice of either following a short course which covers the bare minimum of platform game or to keep tinkering/remix the grid game by choosing from a list of options to alter and extend it.
Playful group learning processes
This guide was offered originally as a support to group work. As such, it contains group starter and reflection activities. These are included at the end of this book in the appendices, so as not to interfere with the flow of someone working through this book to teach themselves.
Making Games on the Web using Glitch

This book uses Glitch our working and learning space for games. At Glitch.com you have an editing area for your code on one tab of the browser and a preview area on another tab. We can also see our code side by side. This kind of website is called a Code Playground. Using Code Playgrounds skips having to set your own website and importantly they let you type in some web code and you can see a preview of the resulting webpage immediately. This quick feedback is great for beginner coders. We can see straight away when we have something right or when we have made a mistake that need correcting.
Making Games using Phaser

Phaser is a Javascript library which supports the creation of web games. Real game developers made it and other game developers use it. It’s also a great choice to make retro games. Retro games have come back into fashion. They are fun and easy to play on home computer, consoles and especially on your phone. Parents play them with children and they are a great way to start learning how to make digital games.
This book will help you create a game in a step by step way adding different game features along the way. It is inspired by and guided by some great tutorials that are out there on various websites. Particularly the work of Richard Davey at Phaser, end3r, Belen Albeza and Chris Mills at Mozilla and Thomas Palef at lessmilk.com.
Why Javascript for beginners?
Javascript is great learn as it is the language of the web. But even fans would admit that learning Javascript can be tricky and there are lot so different ways to do the same thing. A lot of beginner text coders and teachers stick to Python or other text code languages that are easier than Javascript. You can also avoid text code completely if you want to make games. Kodu, Scratch and Game Star Mechanic use a visual approach to coding games, where you snap together colour coded blocks. However, we think that the combination of tools like Phaser and Glitch and a supportive community of learners bring the use of this authentic language within grasp of beginners.
About the Phaser Community and Games
Richard Davey is the lead coder on the Phaser project. There are two main versions of Phaser in use. Phaser 2 and Phaser 3. This book looks at Phaser 2, as it is easier to start to learn. One thing that the community of people using Phaser to make games is very good at is sharing how they do it and helping others who get stuck. There are some fantastic resources available for free. A lot of these resources are available on the main Phaser website.There is also an online forum for when you get stuck as well here - http://www.html5gamedevs.com/forum/14-phaser-2/
There are some great games out there made with Phaser which we can look to for some inspiration. Here are a few of our favourites.
Dork Squad: Can you (and a partner) save the world from robots? Have you got what it takes? https://eoinmcg.itch.io/dork-squad

Grooow: Platformer game with puzzle elements! Pick up all the dots to advance to the next level. But be careful! The more you pick up, the heavier and bigger you get, and thus it’ll be more difficult to move and jump! https://ladybenko.itch.io/grooow
Cybertank: Guide the tank through the levels to collect the cubes and escape. Great sounds and retro graphics here. http://cybertank.paulp.ws/
Knife Hit: This game is created as part of a fantastic tutorial. It’s a bit advanced for beginners but is definitely worth checking out. https://www.emanueleferonato.com/tag/knife-hit/