Uploaded March 2024 | Updated September 2026, 1 week ago
Extended version, bonus art assets, source code: udemy.com/course/make-grid-based-games-with-javascript/?referralCode=B9C9B27679B03F6F21FB
This is a deep dive into grid-based games. Local multiplayer 4-player battle arena, game menus, game over screen, animated sprites, simple AI to control the opponents and much more! Let's remake classic games and put your own spin on it. Have fun!
Tip: this game can be played as 1 player versus AI, 2 players versus AI or even AI versus AI. Set all 4 players as AI-controlled and watch what happens.
Classic snake game with graphics: youtu.be/TBGEt_-rFSs
๐จ Toolkit ๐จ
We will use vanilla JavaScript, no frameworks and no libraries because we want to understand every line of code. (JavaScript, HTML canvas, object oriented programming, HTML5, CSS3)
๐ Download Project Art assets ๐
Grass tile: frankslaboratory.co.uk/downloads/138/grass_night.png
Background top tile: frankslaboratory.co.uk/downloads/138/forest_margin_repeat.png
Game over screen: frankslaboratory.co.uk/downloads/138/gameOver_forest.png
Background top tile larger: frankslaboratory.co.uk/downloads/138/forest_margin_repeat_1600x600.png
Magic berry: frankslaboratory.co.uk/downloads/138/magic_berry1.png
Snake corgi: frankslaboratory.co.uk/downloads/138/snake_corgi.png
Magic mushroom: frankslaboratory.co.uk/downloads/138/mushroom_sprite.png
Animated foods sprite sheet: frankslaboratory.co.uk/downloads/138/food.png
Void wolf: frankslaboratory.co.uk/downloads/138/void_wolf.png
Sticky saberhound: frankslaboratory.co.uk/downloads/138/sticky_saberhound.png
Spectral schnoodle: frankslaboratory.co.uk/downloads/138/spectral_schnoodle.png
Bite 1: frankslaboratory.co.uk/downloads/138/bite1.mp3
Bite 2: frankslaboratory.co.uk/downloads/138/bite2.mp3
Bite 3: frankslaboratory.co.uk/downloads/138/bite3.mp3
Bite 4: frankslaboratory.co.uk/downloads/138/bite4.mp3
Bite 5: frankslaboratory.co.uk/downloads/138/bite5.mp3
Bad food: frankslaboratory.co.uk/downloads/138/bad_food.mp3
Button: frankslaboratory.co.uk/downloads/138/button.mp3
Start: frankslaboratory.co.uk/downloads/138/start.mp3
Restart: frankslaboratory.co.uk/downloads/138/restart.mp3
Win: frankslaboratory.co.uk/downloads/138/win.mp3
All resources zip: frankslaboratory.co.uk/downloads/138/all_resources.zip
๐ Tutorial Contents ๐
00:00:00 Battle snakes in vanilla JavaScript
00:00:27 Project setup
00:04:26 Fully responsive canvas
00:12:01 Drawing animated shapes
00:16:26 Playable characters
00:20:30 Game grid
00:24:04 Fully responsive grid
00:28:00 Animation timing
00:36:04 Player 1: Keyboard arrows
00:46:19 Player 2: Keyboard WSAD
00:49:33 Player 3: Computer AI
00:58:03 Food
01:04:19 Drawing text on canvas
01:06:57 Multi segmented bodies
01:10:30 Movement rules
01:13:11 Game UI: buttons
01:15:00 Game UI: score board
01:20:48 Game UI: player options
01:24:55 Tileable backgrounds
01:31:02 Playable area
01:32:57 Start and restart screens
01:40:40 Tweaks and fixes
01:44:13 Connecting the menus
01:52:00 Fullscreen mode
01:54:12 Debug mode
01:56:48 Images and debug shapes
02:00:28 Character sprite sheets
02:26:21 Animated food
02:31:28 Food seeking AI
02:34:39 Win and lose messages
02:39:28 Mouth animations
02:43:38 Non edible food
02:47:41 Game UI: creature choice
02:54:56 Easy and difficult AI
03:05:07 Game timers
03:07:40 Performance friendly particles
03:27:30 Sound design
Source code
Checkpoint 1 (00:28:00) download zip: frankslaboratory.co.uk/downloads/138/source_code_1.zip
Checkpoint 2: (00:58:03) download zip frankslaboratory.co.uk/downloads/138/source_code_2.zip
If you want to SUPPORT me you can use the links below and get some one my EXTENDED classes! :)
udemy.com/course/build-animated-physics-game-with-javascript/?referralCode=B4482AF631243104650B
udemy.com/course/learn-game-development-with-javascript/?referralCode=69874A38D543D7F510F2
udemy.com/course/remake-retro-games-with-javascript/?referralCode=2ACCA21F16FE78E631F7
udemy.com/course/learn-html-canvas-pixels-particles-physics/?referralCode=F7977062A4BC964A1F5E
udemy.com/course/learn-html-canvas-advanced-text-effects/?referralCode=4C5821D2D04048CC4A01
Get Skillshare FREE for 1 month:
skillshare.com/en/r/profile/Frank-Dvorak/507488567?gr_tch_ref=on&gr_trp=on
The description of this video may contain affiliate links, which means that if you buy one of the products that I recommend, I'll receive a small commission without any additional cost for you. This helps to support the channel and allows me to continue making videos like this. Thank you for the support!
#frankslaboratory
Extended version, bonus art assets, source code: udemy.com/course/make-grid-based-games-with-javascript/?referralCode=B9C9B27679B03F6F21FB
This is a deep dive into grid-based games. Local multiplayer 4-player battle arena, game menus, game over screen, animated sprites, simple AI to control the opponents and much more! Let's remake classic games and put your own spin on it. Have fun!
Tip: this game can be played as 1 player versus AI, 2 players versus AI or even AI versus AI. Set all 4 players as AI-controlled and watch what happens.
Classic snake game with graphics: youtu.be/TBGEt_-rFSs
๐จ Toolkit ๐จ
We will use vanilla JavaScript, no frameworks and no libraries because we want to understand every line of code. (JavaScript, HTML canvas, object oriented programming, HTML5, CSS3)
๐ Download Project Art assets ๐
Grass tile: frankslaboratory.co.uk/downloads/138/grass_night.png
Background top tile: frankslaboratory.co.uk/downloads/138/forest_margin_repeat.png
Game over screen: frankslaboratory.co.uk/downloads/138/gameOver_forest.png
Background top tile larger: frankslaboratory.co.uk/downloads/138/forest_margin_repeat_1600x600.png
Magic berry: frankslaboratory.co.uk/downloads/138/magic_berry1.png
Snake corgi: frankslaboratory.co.uk/downloads/138/snake_corgi.png
Magic mushroom: frankslaboratory.co.uk/downloads/138/mushroom_sprite.png
Animated foods sprite sheet: frankslaboratory.co.uk/downloads/138/food.png
Void wolf: frankslaboratory.co.uk/downloads/138/void_wolf.png
Sticky saberhound: frankslaboratory.co.uk/downloads/138/sticky_saberhound.png
Spectral schnoodle: frankslaboratory.co.uk/downloads/138/spectral_schnoodle.png
Bite 1: frankslaboratory.co.uk/downloads/138/bite1.mp3
Bite 2: frankslaboratory.co.uk/downloads/138/bite2.mp3
Bite 3: frankslaboratory.co.uk/downloads/138/bite3.mp3
Bite 4: frankslaboratory.co.uk/downloads/138/bite4.mp3
Bite 5: frankslaboratory.co.uk/downloads/138/bite5.mp3
Bad food: frankslaboratory.co.uk/downloads/138/bad_food.mp3
Button: frankslaboratory.co.uk/downloads/138/button.mp3
Start: frankslaboratory.co.uk/downloads/138/start.mp3
Restart: frankslaboratory.co.uk/downloads/138/restart.mp3
Win: frankslaboratory.co.uk/downloads/138/win.mp3
All resources zip: frankslaboratory.co.uk/downloads/138/all_resources.zip
๐ Tutorial Contents ๐
00:00:00 Battle snakes in vanilla JavaScript
00:00:27 Project setup
00:04:26 Fully responsive canvas
00:12:01 Drawing animated shapes
00:16:26 Playable characters
00:20:30 Game grid
00:24:04 Fully responsive grid
00:28:00 Animation timing
00:36:04 Player 1: Keyboard arrows
00:46:19 Player 2: Keyboard WSAD
00:49:33 Player 3: Computer AI
00:58:03 Food
01:04:19 Drawing text on canvas
01:06:57 Multi segmented bodies
01:10:30 Movement rules
01:13:11 Game UI: buttons
01:15:00 Game UI: score board
01:20:48 Game UI: player options
01:24:55 Tileable backgrounds
01:31:02 Playable area
01:32:57 Start and restart screens
01:40:40 Tweaks and fixes
01:44:13 Connecting the menus
01:52:00 Fullscreen mode
01:54:12 Debug mode
01:56:48 Images and debug shapes
02:00:28 Character sprite sheets
02:26:21 Animated food
02:31:28 Food seeking AI
02:34:39 Win and lose messages
02:39:28 Mouth animations
02:43:38 Non edible food
02:47:41 Game UI: creature choice
02:54:56 Easy and difficult AI
03:05:07 Game timers
03:07:40 Performance friendly particles
03:27:30 Sound design
Source code
Checkpoint 1 (00:28:00) download zip: frankslaboratory.co.uk/downloads/138/source_code_1.zip
Checkpoint 2: (00:58:03) download zip frankslaboratory.co.uk/downloads/138/source_code_2.zip
If you want to SUPPORT me you can use the links below and get some one my EXTENDED classes! :)
udemy.com/course/build-animated-physics-game-with-javascript/?referralCode=B4482AF631243104650B
udemy.com/course/learn-game-development-with-javascript/?referralCode=69874A38D543D7F510F2
udemy.com/course/remake-retro-games-with-javascript/?referralCode=2ACCA21F16FE78E631F7
udemy.com/course/learn-html-canvas-pixels-particles-physics/?referralCode=F7977062A4BC964A1F5E
udemy.com/course/learn-html-canvas-advanced-text-effects/?referralCode=4C5821D2D04048CC4A01
Get Skillshare FREE for 1 month:
skillshare.com/en/r/profile/Frank-Dvorak/507488567?gr_tch_ref=on&gr_trp=on
The description of this video may contain affiliate links, which means that if you buy one of the products that I recommend, I'll receive a small commission without any additional cost for you. This helps to support the channel and allows me to continue making videos like this. Thank you for the support!
#frankslaboratory


![HTML Canvas Game Development Tutorial | Flappy Bird PART 2 - Animated Sprites & Repeating Background
#javascript #html5canvas #frankslaboratory
In the previous episode of the series we build flappy bird game from scratch using just plain vanilla JavaScript. In this HTML canvas game development tutorial I will show you how to add any animated sprites and repeating background.
We will also adjust player hit box, to make sure collision detection works well and couple more things to give our game final polish and make it look nice and clean.
By the end of this tutorial you will be able to take any sprite sheet and create your own unique Flappy bird game.
This video is PART 2. Part 1 available here:
HTML Canvas Game Tutorial [ Vanilla JavaScript Flappy Bird with Particle Effects & Sprites ] Gamedev: https://youtu.be/lGJ9i6CYKyQ
RELEVANT LINKS:
Sprites:
http://bevouliin.com/
https://opengameart.org/content/flappy-dragon-sprite-sheets
https://opengameart.org/content/winter-platformer-game-tileset
https://www.codeandweb.com/free-sprite-sheet-packer
Collision image (bang.png):
https://pixeldra.in/u/NmppP2ng
*** HTML Canvas Game Development Tutorial | Flappy Bird PART 2 - Animated Sprites & Repeating Background ***
If you liked this video Im sure you will enjoy other videos on my channel. You can find HTML Canvas Animation Tutorials, JavaScript tutorials, animated effects and step by step animation guides, each video shows many examples of the final effect. I will help you learn modern web development techniques by building real projects you can show off on your personal website or GitHub. Code along with me and gain skills to get your first job in the industry. If I could do it you can do it too. If you decide to code along and modify the effects, share your Codepen/JS Fiddle in the comments, I want to see what you came up with.
I have pure vanilla JavaScript animation series, in each tutorial we create all different kinds of interactive animated effects from scratch. No plugins, no libraries, no frameworks. Every line of code is explained to give you hands on experience and teach you as much JavaScript as possible. If you want more creative JavaScript tutorials, HTML canvas animations, interactive animated effects to code along, video guides for beginners as well as advanced pure vanilla JavaScript, check out the playlist here:
https://www.youtube.com/watch?v=afdHgwn1XCY&list=PLYElE_rzEw_siuo-kkHh5h7Sk 6IPYNh
For more creative vanilla JavaScript tutorials, CSS tricks, HTML canvas animations, front end web development and web design guides, subscribe to the channel and click the bell icon to get notified when I release a new video.
If you want to improve your Front End Web Developmnent skills, check out my CSS tutorial series where we explore animations and effects that can be done with modern CSS3 techniques:
https://www.youtube.com/watch?v=loKyT99W2s8&list=PLYElE_rzEw_t2O2DvfopIoq-diTgefVzV
*** HTML Canvas Game Development Tutorial | Flappy Bird PART 2 - Animated Sprites & Repeating Background ***
Music:
Business / Corporate by Mixaund | https://mixaund.bandcamp.com
Music promoted by https://www.free-stock-music.com HTML Canvas Game Development Tutorial | Flappy Bird PART 2 - Animated Sprites & Repeating Background](https://i.ytimg.com/vi/WUPIvrUPDdQ/mqdefault.jpg)
![Vanilla JavaScript Text Animation Tutorial [Particles & Physics effect]
Improved extended version with full source code and source code for 10 bonus variations here https://www.udemy.com/course/learn-html-canvas-advanced-text-effects/?referralCode=4C5821D2D04048CC4A01
Lets take any letter, word or a sentence and in three steps convert it into interactive particles effect. All in Vanilla JavaScript, no frameworks and no libraries.
In todays vanilla JavaScript text animation tutorial we will learn how to give particles some motion physics and apply forces such as friction and acceleration, then we will get the particles to form any shape we want, in this case letter shapes, and connect individual particles with lines similar to famous particles.js library, but we will use no libraries, everything we build today is from scratch using just plain vanilla JavaScript. I will explain all the code line by line as I always do.
LIKE the video please if youre getting value out of my tutorials and SUBSCRIBE if you want to learn more vanilla JavaScript!
More pixel manipulation tutorials, including updated and improved version of this codebase:
https://youtube.com/playlist?list=PLYElE_rzEw_t0 arG7_fu1uqkwOht1Jg
Some of my favorite UDEMY courses:
Object-oriented Programming in JavaScript https://bit.ly/3f4Otu0
Creative:
How to Program Games: Tile Classics in JS for HTML5 Canvas https://bit.ly/2ZUfKuG
Next Level CSS Creative Hover & Animation Effects https://bit.ly/3jEkzju
CSS / Webdev skills:
The Web Developer Bootcamp (Older but still very relevant) https://bit.ly/2ZZJM0d
Modern HTML & CSS From The Beginning (Including Sass) https://bit.ly/2Ec6Cch
Advanced CSS and Sass: Flexbox, Grid, Animations and More! https://bit.ly/3g0uqxT
Vanilla JavaScript from beginner to advanced:
JavaScript Basics for Beginners https://bit.ly/32Tn5wq
JavaScript: Understanding the Weird Parts (Basic JavaScript rules that will never change, must know) https://bit.ly/2WVe0zn
The Complete JavaScript Course 2020: Build Real Projects! https://bit.ly/3fXGwaZ
Modern JavaScript From The Beginning https://bit.ly/3fWJgWk
Related videos:
https://youtu.be/afdHgwn1XCY Animated Particles from any image
https://youtu.be/d620nV6bp0A Particles JS effect with no libraties
This vanilla JavaScript text animation tutorial will have 3 main parts, in the first part we will create particles randomly spread around canvas and we implement some physics on them. We will apply forces like friction and acceleration and give each particle different weight to make the movement more realistic.
Then in the second part of this video we will take these particles and shape them into letters or images, both is possible with the code we will build today
And lastly in the third section we will take famous constellations effect from particles js library and we will connect particles that are near enough to each other with lines but we will not use any libraries, we will write our own vanilla JavaScript code that does that.
This tutorial is part of a series - Creative coding with vanilla JavaScript and HTML canvas COMPLETE PLAYLIST:
https://www.youtube.com/watch?v=lGJ9i6CYKyQ&list=PLYElE_rzEw_siuo-kkHh5h7Sk 6IPYNh
Tools every front-end web developer needs:
Adobe Creative Cloud (Adobe Photoshop, Illustrator) https://bit.ly/3e60cI0 (official Adobe website to buy Creative Suite applications)
You can message me on TWITTER https://twitter.com/code_laboratory
Check out some of my source code on CODEPEN https://codepen.io/franksLaboratory
#javascript #htmlcanvas #frankslaboratory
Music:
Business / Corporate by Mixaund | https://mixaund.bandcamp.com
Music promoted by https://www.free-stock-music.com
The description of this video may contain affiliate links, which means that if you buy one of the products that I recommend, Ill receive a small commission without any additional cost for you. This helps to support the channel and allows me to continue making videos like this. Thank you for the support! Vanilla JavaScript Text Animation Tutorial [Particles & Physics effect]](https://i.ytimg.com/vi/XGioNBHrFU4/mqdefault.jpg)






![JavaScript Pixel Manipulation for Beginners
Join me for this HTML canvas tutorial for beginners to learn pixel manipulation with drawImage, getImageData and putImage data JavaScript methods, so that we can use this in the next episode for advanced particle system effects.
More pixel manipulation tutorials using this technique:
https://youtube.com/playlist?list=PLYElE_rzEw_t0 arG7_fu1uqkwOht1Jg
HTML canvas provides us with a set of tools we can use to scan any image, get information about pixels that make up that image such as their color values and coordinates and then we can use those values to create all different kinds of effects from a simple colour shift or grayscale to advanced particle system effects like this. In todays episode we will dive deep into 3 important canvas methods drawImage, getImageData and putImageData.
Ive created this simple HTML canvas tutorial for beginners to help you get full understanding of what exactly they do so we can take that to the next level. All of that with no frameworks and no libraries using just plain vanilla JavaScript, as usual. Welcome to my creative coding series.
Advanced HTML canvas effects that use pixel manipulation:
Vanilla JavaScript Text Animation Tutorial [Particles & Physics effect] -https://youtu.be/XGioNBHrFU4
Image into Interactive Particles - HTML Canvas Animation Tutorial | Advanced Pure Vanilla JavaScript - https://youtu.be/afdHgwn1XCY
You can message me on TWITTER https://twitter.com/code_laboratory
Check out some of my source code on CODEPEN https://codepen.io/franksLaboratory
#javascript #htmlcanvas #frankslaboratory
This tutorial is part of a series, to learn more about effects with HTML5 canvas api check out my playlist - Creative coding with vanilla JavaScript COMPLETE PLAYLIST:
https://www.youtube.com/playlist?list=PLYElE_rzEw_siuo-kkHh5h7Sk 6IPYNh
CSS animations playlist:
https://www.youtube.com/playlist?list=PLYElE_rzEw_t2O2DvfopIoq-diTgefVzV
This video will serve as an introduction to HTML canvas and its pixel manipulation techniques. If you are a JavaScript beginner who wants to become a pro when it comes to drawing, animating and interacting with the canvas, we will take it step by step and learn canvas 2D API together.
Music: (YouTube audio library) Vacay In Fiji Riddim - Konrad OldMoney, World Map - Jason Farnham, Dance of the U-boat - Aakash Gandhi
The description of this video may contain affiliate links, which means that if you buy one of the products that I recommend, Ill receive a small commission without any additional cost for you. This helps to support the channel and allows me to continue making videos like this. Thank you for the support! JavaScript Pixel Manipulation for Beginners](https://i.ytimg.com/vi/alRBeUMMvDM/mqdefault.jpg)