Tag

canvas

3 articles tagged with “canvas”.

Simple Collision Detection with Path2D

How to create a simple and efficient collision detection between paths in your HTML5 Canvas app or game? In this article we will create a maze, allow a player to navigate through the maze and detect when the player collides with the walls. The End Goal Let’s build a simple game. The game will look […]

How to write a simple collision detector in HTML5 canvas and JavaScript?

Collision detection is the basics of entities interaction on canvas. Imagine you have a Player Character (PC) that’s walking through a maze and you’d like to know if this PC bumps into a wall or can keep on going. One can argue that there’s a wall crossing potion somewhere, but let’s assume one doesn’t have […]

How to test HTML5 canvas with jest?

In this short article you will learn what you need to install in order to prepare a test environment for canvas operations with jest. After finishing the article, you will be ready for some canvas testing action! In the past few months, my kid and I been building HTML5 games. I’d might actually get you […]

Type to search articles