
Set up a quick web development environment with Visual Studio Code, install the Live Server extension, create an HTML file with a canvas, and view it on localhost.
Connect JavaScript to a canvas element, obtain a 2d context, and draw a rectangle with fillStyle and fillRect to render graphics on the page.
Learn how to draw on the canvas with fillRect and strokeRect, control x and y positions, width and height, and use clearRect to remove areas and refine the red rectangle.
Learn to set line and fill colors in canvas using named colors, hex and short hex, and rgba with alpha for transparency, and stack colorful rectangles.
Learn to add text to a canvas using a 2d context, including setting font, color, alignment, and coordinates, and render hello world with optional dynamic text and a simple loop.
Learn to draw lines on the canvas, vary line width and caps (butt, round, square), and line joins (miter, round, bevel) using beginPath, moveTo, lineTo, and clearRect.
Build and style gradients on the HTML5 canvas by writing a styles.js file, setting up linear and radial gradients with color stops, and applying them to fills and strokes.
Save and restore canvas states to manage rectangles, colors, and font size; create and modify shapes, then return to the original setup before applying transformations.
Learn to create canvas animations in JavaScript by clearing and saving/restoring canvas state, drawing a moving circle with requestAnimationFrame, updating x by speed, and resetting when it exits the canvas.
Learn how to draw paths on the canvas by creating a path, moving to coordinates, and applying stroke and fill to render a red triangle with blue point markers.
Learn to draw circles and arcs on canvas to create a happy-face scene. Use beginPath, arc, moveTo, fill, and stroke to position eyes and a mouth on a yellow background.
animate a red dot moving across a canvas with a blue center dot using a draw function and requestAnimationFrame, and reverse the dot's direction by clicking the canvas.
Set up player movement boundaries on the canvas to keep each player on their side, draw a center line, and prevent crossing while handling left, right, up, and down controls.
Restart the game by resetting scores, cooldowns, and player positions with a start game function triggered on canvas clicks; reset X/Y for players, restart animation frame, and adjust collision detection.
Add an opponent brain using a mind object with a thinking toggle and a toggle button. Enable movement toward the red player with randomized, bounded movement.
Refine opponent movement logic in an HTML5 canvas game. Implement natural left-right and up-down motion with boundary checks and random direction changes, add speed variation, occasional stops, and enable shooting.
Track arrow key presses with a keys object and listen for keydown and keyup events to move a canvas rectangle by updating x and y, clearing the canvas before redraw.
Create a bouncing ball in HTML5 canvas by defining a ball object with x, y, width, height, and speed, then move it and detect collisions with paddles and walls.
Learn to build a bubble popping game on HTML5 canvas using JavaScript, drawing bubbles with arcs, handling mouse clicks, collision detection, and animation with requestAnimationFrame to score points.
Learn to create bubbles on canvas by using radial gradient with two circles, color stops, and gradient fills, then fine-tune stroke and colors for a bubble look.
Generate random bubbles on an HTML5 canvas by looping a bubble count with random x, y, and sizes between 15 and 25, using a gradient-filled arc for each bubble.
Spawn bubbles from the bottom, remove them when they reach the top, and add dynamic speed, horizontal jitter, and random colors for a lively canvas.
Learn to implement bubble collision detection on mouse click in an HTML5 canvas game by comparing bubble x/y positions with the click using the bubble size to detect overlaps.
Perform a final code review of the html5 canvas bubble popper game, adjusting bubble movement, hit circle size, random speed, and scoring for accurate collisions on the canvas.
Set a dynamic enemy total to drop items, spawn enemies at random x positions, store them in an enemies object and array, and render them on the canvas.
Learn to start and restart a canvas game with a clickable button or canvas click, reset scores and lives, and use collision detection with mouse coordinates.
Review the HTML5 canvas catcher game code, adjust enemies, speed, and lives to tune difficulty, manage collision scoring, and clean console messages.
Learn to create a breakout game scaffold by building a blank html file, linking breakout.js, creating an html5 canvas with a 2d context, and sizing from a grid-based game object.
Draw the player paddle on the HTML5 canvas using a draw function for Breakout, and define a dynamic player object with x, y, width, height, and grid-based positioning for movement.
Learn to track player movement in HTML5 canvas by listening for keydown and keyup, updating a keys object with key codes, and preparing for movement-based animation.
Add mouse movement controls by listening for mousemove on the document, mapping event.clientX with canvas.offsetLeft to position the paddle, accounting for paddle width and canvas bounds.
Create a bricks array and start the game to build a 30-brick board. Draw bricks as rectangles positioned by dynamic x and y using grid values.
Update the bottom score and player lives, track game completion, and restart with the up arrow; bricks have random values that increase the score when removed.
Set up a 640 by 480 canvas with a black background in JavaScript. Add input and a download button to draw centered text and export canvas as a data URL.
Learn to build a bouncing ball animation with HTML5 canvas and JavaScript by creating a canvas, drawing a circle with arc, and updating speed for wall bounces.
Learn to create, merge, and update arrays using join, push, apply, and splice. Understand delete versus splice, clearing contents, and how length and memory behave with nested arrays.
Learn how to clean up excess whitespace in strings using regular expressions and the JavaScript trim methods, including trim left and trim right; explore a string prototype cleaner implementation.
Explore immediately invoked function expressions in JavaScript, using both function keyword and arrow syntax, pass arguments, set defaults, and see results in the console.
Learn HTML5 Canvas Element - Quick Introduction to Canvas HTML5
Introduction to drawing using JavaScript on HTML5 Canvas Element - This course requires JAVASCRIPT CODING!!!!!
Do not take this course without prior coding experience - JavaScript and HTML and prerequisites
New content just added - how to create your first game using HTML5 and Canvas - fun interactive battle game with computer brain and dynamic values. Explore how to make Canvas based games
#1 HTML5 Canvas Pong Game - Hit the ball between ready 2 players on screen. Source Code included build your own version of the game.
#2 HTML5 Canvas Falling items catcher Game - Objective of the game is to catch items as they fall. Score when you catch colorful balls avoid the blinking resizing items or you lose a life.
#3 Bubble popper with Mouse Clicks - hover mouse over items and pop them. Score when you click and pop endless bubbles that float up the screen. Colorful bubbles.
#4 Brick breakout game - Build your version of this classic brick breaker game. Dynamic game elements, adding bonus falling items and more. Take this game to the next level add more and customize the dynamic game values.
#5 Battle Bots Game on Canvas - with 2 autonomous players or take control and have 2 players using the keyboard. You won't find THIS GAME anywhere else -
How to draw elements on Canvas
How to add keyboard event listeners for arrow keys and player interaction
How to add animation for smooth gameplay
How to add game scoring and logic
How to apply automation to player movement
Create 2 player interaction and response to game actions
Projects -
How to download canvas image to computer - simple code to add a download button downloading your canvas image as base64 image file to your computer.
Create a Matrix falling letters effect using HTML5 Canvas. Add this special, effect using JavaScript
Explore how to make a bouncing ball on canvas
Upload images from your computer into canvas
Draw on canvas simple drawing application project
Source Code included ---
Explore how you can use JavaScript to draw within the HTML5 Canvas element on your webpages
Source Code included - step by step lessons with an introduction to basics of drawing on canvas. Course will walk through how to use JavaScript code and syntax to create visual content within the HTML5 canvas element on the webpage.
The canvas element is part of HTML5 and allows for dynamic, scriptable rendering of 2D shapes and bitmap images.
Course covers Getting started with HTML5 Canvas Drawing
How to Start Drawing on Canvas with JavaScript.
Learn Basics of Drawing on Canvas
Color Units and options for line and fill Color within Canvas objects
Strokes and Lines drawing more objects on Canvas
How to create Draw Arcs and Circles.
Add Text to Canvas JavaScript
Options and how to draw Line Styles Canvas
Using Images - Image Options Canvas HTML5 JavaScript drawing
Color Gradients and Styling Fun radial and linear
Applying Text Shadows to text content within Canvas
How to use Save and Restore.
Scaling reverse Text mirror your text content
Creating Canvas animations using JavaScript
Project how to create Image Rotator.
Canvas Drawing Draw a StickMan Challenge
This course is a fast paced course with all the source code included - Please try the code as you got hough the lessons to learn.
There are prerequisites to this course - please ensure you do have the skillset to learn the content presented within the lessons. The design is to explore HTML5 Canvas and how it works. Scope of this course is HTML5 Canvas and content related to the learning objective will only be covered in the lessons of this course. Perfect to get introduced to HTML5 Canvas or as a refresher to anyone already familiar with web coding.
Taught by a web developer with over 20 years experience - ready to help you learn and answer any questions you might have.
Fast friendly support is always available within the Q&A section