In this tutorial, we create a JavaScript game with HTML Canvas. First, we go through in detail, how to draw a balloon on the canvas. We cover the basics of drawing, and even quadratic bezier curves and arcs. Then as a second example, we draw trees based on randomly generated parameters. Then we talk about positioning these elements on the canvas and build up our game. We add some game logic, event handling, and animation. And finally, we add a very basic hit detection to our game.
This tutorial is for beginners. If you are new to web development and want to learn how to develop games and other fun stuff, please subscribe to my channel.
👉 You find the game and its source code here: https://codepen.io/HunorMarton/pen/Vw...
0:00 Introduction
0:58 Drawing an air balloon
6:51 Drawing trees
10:53 Positioning shapes
16:02 Event handling and animation
21:15 Hit detection
23:12 Next steps
CodePen — https://codepen.io/HunorMarton
Twitter — / hunorborbely
#javascript #canvas #game #webdevelopment #codepen
On this page of the site you can watch the video online Learn HTML canvas by coding a JavaScript game | HTML Canvas tutorial for beginners with a duration of hours minute second in good quality, which was uploaded by the user Hunor Márton Borbély 24 January 2021, share the link with friends and acquaintances, this video has already been watched 16,044 times on youtube and it was liked by 327 viewers. Enjoy your viewing!