This is the official code repository for the "Introduction to Game Development" workshop, hosted at the Royal Institution. In this course, we use the Phaser JavaScript game engine to build a classic Snake game step-by-step.
This repository is structured to reflect the game development process through clearly defined branches. Each branch introduces a new concept or mechanic to help beginners build up a strong foundation in game development.
The workshop uses:
- Phaser 3
- JavaScript (Ecmascript 2015)
Important
Live demo is available at Github pages.
- Understand the basic structure of a Phaser project.
- Learn key game development concepts like 2d coordinates, scenes, game objects, movement, and collisions detection.
Each development milestone is stored as a separate Git branch:
| Branch | Description |
|---|---|
step/1/plain_scene |
Blank Phaser scene setup |
step/2/static_snake_segment |
Display a static snake segment |
step/3/implementing_grid |
Add a grid system for movement |
step/4/move_snake |
Implement snake movement |
step/5/generating_food |
Randomly generate food items |
step/6/collisions |
Add collision detection with self |
step/7/display_score |
Show and update player score |
Tip
๐ก To explore a specific version locally, run:
git checkout step/X/branch_name
| Gameplay #1 | Gameplay #2 | Gameplay #3 |
|---|---|---|
![]() |
![]() |
![]() |
This project is part of a series of educational workshops by the Royal Institution, designed to introduce scientific concepts through practical, hands-on learning.
Special thanks to all participants and the open-source contributors behind Phaser.


