canvas

Simple Snake Game using HTML5 canvas and Pure Javascript

This tutorial tackles on how to create a simple snake game using HTML5 canvas and pure Javascript. Snake game a simple game wherein there is a small snake at first and gets bigger whenever it eats a food that randomly appears on the screen. The goal of this game is to get a high score which depends on how big your snake gets.

Clipping Canvas Element in Javascript- Circle Shape

This tutorial will teach you how to clip canvas element in javascript. On my previous example, I also discuss clipping but I used pure css/html. This time we will do it in javascript. You can also create different shapes like what we did in css example. Here's the link of css clipping if you've never seen it. Next project, I'm gonna show you the polygon shape. Hope you learn from this.

Drawing Text in Canvas Using Javascript

This project will teach you how to draw text in canvas using javascript. Let's see the parameters that the filltext method and stroketext method intake. context.fillText('This is the text!', 20, 60); context.strokeText('This is the text!', 20, 60); The first parameter is the string of text, second is the x position, and the third is the y position. You can also maximum width. It is optional. We