
Learn to build a complete HTML5 canvas game from scratch using JavaScript, including setup, images, keyboard input, collision detection, animation, and rendering, with source files and CodePen resources.
Declare the HTML5 document type, set up head and body, and create a canvas with width 600 and height 400 to start the HTML5 game template.
Connect an HTML5 canvas to JavaScript using getElementById and getContext, draw on a 2d context, and ensure the script runs after the DOM loads.
Learn to create a canvas with JavaScript, set its size, append it to the document body, and ensure it loads for dynamic HTML5 game elements.
Load an image into a canvas and set up a Pac-Man style game with dots and ghosts, including blue ghost mode, using a render loop to start the game.
Learn to render a fragment of a loaded sprite sheet onto a canvas using drawImage, specifying source x,y,width,height and destination x,y,width,height, with Pac-Man and ghost examples.
Set up keydown and keyup listeners, track key codes, and move the player while rendering the updated position in an html5 game.
Learn to add an enemy in an HTML5 canvas game using requestAnimationFrame to loop rendering, draw a ghost, and manage layer order with Pac-Man.
Implement a random ghost system for an HTML5 game using Math.random and floor to pick a color and a position, and render it only when it doesn’t already exist.
Learn to implement a moving enemy in an HTML5 game with random direction changes, variable speed, and player-aware decisions, including screen wrap for continuous motion.
Adjust calculations to keep the enemy from running off the page, tweak speed and direction, and explore collision detection and power dot integration for Pac-Man to eat dots and ghosts.
Add a power up dot to a canvas game by placing it at random x and y coordinates, toggling visibility, and drawing a yellow arc for Pac-Man style gameplay.
Power up the ghost with flashing eyes and image toggling driven by a countdown, while implementing collision detection and dot-eating logic that resets color and triggers escape.
Learn how to make the ghost reverse direction after a power dot is eaten by inverting its speed. Set up collision detection for power dot events.
Refine ghost collision detection, implement score updates for player and ghost, and reset positions after collisions in this HTML5 game. Adjust hit areas and enable ghost movement for smoother gameplay.
Slow eye blinking and preserve white and blue flashes when pursuing, using a countdown to control blink timing. Increase speed after power-ups and fix power-dot placement.
Crash course to learn how to create an HTML5 game from scratch for beginners.
Core HTML5 training using canvas and setting a gameboard. Adding text and dynamic variables. Using event listeners to determine keyboard actions and create movement. Create a random enemy and have it move around. Interacting with game items like a power up pill. Collision detection to determine multiple reactions to object interactions on the game board. Tweaking and fine tuning game interactions for better game play.
This course is designed for anyone who wants to better understand how to create their own HTML5, within this course we show you how to make a basic HTML5 game from scratch. You can reuse and practice with the sample code in the course.
We start with a blank document, add in html and then JavaScript to create the game.
The game we create in the course is a pacman type game with a pacman character that can be moved around the screen. There are also 2 ghosts which move towards the player or away if the pacman is powered up.
We walk you through step by step with detailed explanations of code and more.
We teach you the latest techniques and tools to use in order to create html5 canvas animations and content. Everything you need to know is included in this course. Learn at your own pace, lifetime access to this course.