
Install Visual Studio Code and Node.js to set up your development environment for modern JavaScript, verify installation with node -v, and prepare terminal access in the editor.
Here is how you get additional help if you get stuck!
Set up a Node.js project with npm init, install Express, and build a simple web server that responds with hello world on localhost port 3000.
Place a green apple in the snake game and ensure it spawns on a 16-pixel grid. Align the snake and apple to the grid using tile size and integer math.
Learn how to make the snake eat the apple in Phaser by comparing the head’s next position to the apple, then grow the body and reposition the apple.
Master the phaser snake: implement a death condition by detecting head-to-tail collisions using array slicing, and test with tail.some to detect when the head matches a tail segment.
Clean up code and enforce safe movement in Phaser by setting a 100 move interval, preventing reversing direction with if statements, and avoiding self-collision after tail eating in snake game.
Ever wanted to learn Javascript, Node.js & Express.js but found traditional courses a little boring & long?
Jump straight in by coding a snake game and learn the fun way!
You will get experience using:
Javascript
ES6
Classes
Arrays
Functions
Objects
Phaser 3
Node.js
Express.js
Phaser 3
Snake is a nice, simple game that includes many fundamental elements that you will find in many games. It is the ideal first game to code.
The game includes:
Movement
Input handling
Power ups
Randomisation
Collision detection
Game over handling
I hope you enjoy the course!