Uploaded May 2022 | Updated September 2026, 1 week ago
Make your own 2D adventures with HTML, CSS & plain vanilla JavaScript, no frameworks and no libraries! Today we will apply state design pattern, sprite animation, parallax backgrounds and we will learn how to control FPS with timestamps and delta time. Have fun! :)
Part 1: youtu.be/c-1dBd1_G8A Animating player
Part 2: youtu.be/ug-gdfGb7I8 State management and parallax backgrounds
Part 3: youtu.be/lqNztI7BMf8 Enemy types
Part 4 : youtu.be/6ppfyWdoH3c Collisions & Particles
Part 5 : youtu.be/KICADKr_zeM Win & Lose Conditions, Timer, Clean up
Part 6: youtu.be/tWS_eURr2_w Bonus features (this video)
🎮 FULL SERIES:🎮 youtube.com/playlist?list=PLYElE_rzEw_uryBrrzu2E626MY4zoXvx2
❤ Related Links ❤
Art by bevouliin.com check out their website for more game art assets!
Download project sprite sheets:
🐕 Player: frankslaboratory.co.uk/downloads/97/player.png
Backgrounds:
City:
Layer 1: frankslaboratory.co.uk/downloads/97/layer-1.png
Layer 2: frankslaboratory.co.uk/downloads/97/layer-2.png
Layer 3: frankslaboratory.co.uk/downloads/97/layer-3.png
Layer 4: frankslaboratory.co.uk/downloads/97/layer-4.png
Layer 5: frankslaboratory.co.uk/downloads/97/layer-5.png
Forest:
Layer 1: frankslaboratory.co.uk/downloads/97/forest/layer-1.png
Layer 2: frankslaboratory.co.uk/downloads/97/forest/layer-2.png
Layer 3: frankslaboratory.co.uk/downloads/97/forest/layer-3.png
Layer 4: frankslaboratory.co.uk/downloads/97/forest/layer-4.png
Layer 5: frankslaboratory.co.uk/downloads/97/forest/layer-5.png
Lives:
frankslaboratory.co.uk/downloads/97/lives.png
frankslaboratory.co.uk/downloads/97/heart.png
Fire texture:
🔥 frankslaboratory.co.uk/downloads/97/fire.png
Collision animation:
☁️ frankslaboratory.co.uk/downloads/97/boom.png
18 Enemies:
Big spider: frankslaboratory.co.uk/downloads/97/enemy_spider_big.png
Bat 1: frankslaboratory.co.uk/downloads/97/enemy_bat_1.png
Spinner: frankslaboratory.co.uk/downloads/97/enemy_spinner.png
Small spider: frankslaboratory.co.uk/downloads/97/enemy_spider.png
Ghost 1: frankslaboratory.co.uk/downloads/97/enemy_ghost_1.png
Bat 2: frankslaboratory.co.uk/downloads/97/enemy_bat_2.png
Raven: frankslaboratory.co.uk/downloads/97/enemy_raven.png
Bat 3: frankslaboratory.co.uk/downloads/97/enemy_bat_3.png
Ghost 2: frankslaboratory.co.uk/downloads/97/enemy_ghost_2.png
Fly: frankslaboratory.co.uk/downloads/97/enemy_fly.png
Ghost 3: frankslaboratory.co.uk/downloads/97/enemy_ghost_3.png
Ghost 4: frankslaboratory.co.uk/downloads/97/enemy_ghost_4.png
Hand: frankslaboratory.co.uk/downloads/97/enemy_hand.png
Plant: frankslaboratory.co.uk/downloads/97/enemy_plant.png
Worm: frankslaboratory.co.uk/downloads/97/enemy_worm.png
Walking zombie: frankslaboratory.co.uk/downloads/97/enemy_zombie.png
Ground zombie: frankslaboratory.co.uk/downloads/97/enemy_ground_zombie.png
Digger: frankslaboratory.co.uk/downloads/97/enemy_digger.png
⭐️Tutorial Contents ⭐️
00:00 Changing game world images
00:41 Different game fonts
01:53 Player lives
03:59 Floating text
08:20 Code optimizations
10:58 Tuning game difficulty
Let's be friends
👍 You can message me on TWITTER twitter.com/code_laboratory
👍 Check out some of my source code on CODEPEN codepen.io/franksLaboratory
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
Make your own 2D adventures with HTML, CSS & plain vanilla JavaScript, no frameworks and no libraries! Today we will apply state design pattern, sprite animation, parallax backgrounds and we will learn how to control FPS with timestamps and delta time. Have fun! :)
Part 1: youtu.be/c-1dBd1_G8A Animating player
Part 2: youtu.be/ug-gdfGb7I8 State management and parallax backgrounds
Part 3: youtu.be/lqNztI7BMf8 Enemy types
Part 4 : youtu.be/6ppfyWdoH3c Collisions & Particles
Part 5 : youtu.be/KICADKr_zeM Win & Lose Conditions, Timer, Clean up
Part 6: youtu.be/tWS_eURr2_w Bonus features (this video)
🎮 FULL SERIES:🎮 youtube.com/playlist?list=PLYElE_rzEw_uryBrrzu2E626MY4zoXvx2
❤ Related Links ❤
Art by bevouliin.com check out their website for more game art assets!
Download project sprite sheets:
🐕 Player: frankslaboratory.co.uk/downloads/97/player.png
Backgrounds:
City:
Layer 1: frankslaboratory.co.uk/downloads/97/layer-1.png
Layer 2: frankslaboratory.co.uk/downloads/97/layer-2.png
Layer 3: frankslaboratory.co.uk/downloads/97/layer-3.png
Layer 4: frankslaboratory.co.uk/downloads/97/layer-4.png
Layer 5: frankslaboratory.co.uk/downloads/97/layer-5.png
Forest:
Layer 1: frankslaboratory.co.uk/downloads/97/forest/layer-1.png
Layer 2: frankslaboratory.co.uk/downloads/97/forest/layer-2.png
Layer 3: frankslaboratory.co.uk/downloads/97/forest/layer-3.png
Layer 4: frankslaboratory.co.uk/downloads/97/forest/layer-4.png
Layer 5: frankslaboratory.co.uk/downloads/97/forest/layer-5.png
Lives:
frankslaboratory.co.uk/downloads/97/lives.png
frankslaboratory.co.uk/downloads/97/heart.png
Fire texture:
🔥 frankslaboratory.co.uk/downloads/97/fire.png
Collision animation:
☁️ frankslaboratory.co.uk/downloads/97/boom.png
18 Enemies:
Big spider: frankslaboratory.co.uk/downloads/97/enemy_spider_big.png
Bat 1: frankslaboratory.co.uk/downloads/97/enemy_bat_1.png
Spinner: frankslaboratory.co.uk/downloads/97/enemy_spinner.png
Small spider: frankslaboratory.co.uk/downloads/97/enemy_spider.png
Ghost 1: frankslaboratory.co.uk/downloads/97/enemy_ghost_1.png
Bat 2: frankslaboratory.co.uk/downloads/97/enemy_bat_2.png
Raven: frankslaboratory.co.uk/downloads/97/enemy_raven.png
Bat 3: frankslaboratory.co.uk/downloads/97/enemy_bat_3.png
Ghost 2: frankslaboratory.co.uk/downloads/97/enemy_ghost_2.png
Fly: frankslaboratory.co.uk/downloads/97/enemy_fly.png
Ghost 3: frankslaboratory.co.uk/downloads/97/enemy_ghost_3.png
Ghost 4: frankslaboratory.co.uk/downloads/97/enemy_ghost_4.png
Hand: frankslaboratory.co.uk/downloads/97/enemy_hand.png
Plant: frankslaboratory.co.uk/downloads/97/enemy_plant.png
Worm: frankslaboratory.co.uk/downloads/97/enemy_worm.png
Walking zombie: frankslaboratory.co.uk/downloads/97/enemy_zombie.png
Ground zombie: frankslaboratory.co.uk/downloads/97/enemy_ground_zombie.png
Digger: frankslaboratory.co.uk/downloads/97/enemy_digger.png
⭐️Tutorial Contents ⭐️
00:00 Changing game world images
00:41 Different game fonts
01:53 Player lives
03:59 Floating text
08:20 Code optimizations
10:58 Tuning game difficulty
Let's be friends
👍 You can message me on TWITTER twitter.com/code_laboratory
👍 Check out some of my source code on CODEPEN codepen.io/franksLaboratory
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






![How To Use CSS3 Border Image Property [CSS tutorial]
In this quick CSS tutorial we will learn how to use CSS3 border image property. It allows us to replace border on HTML elements with custom images or with CSS gradient. It is fully responsive and you can easily make sure your border looks good even when resizing your website .It can be applied to any HTML element except for internal table elements such as tr, th and td.
Sample project images to download:
http://frankslaboratory.co.uk/how-to-rotate-particles-and-images-on-html-canvas/
https://ibb.co/Kz1ww7k
https://ibb.co/MgttYQj
LIKE the video please if youre getting value out of my tutorials and SUBSCRIBE if you want to learn more front end web development with me!
This tutorial is part of a series - CSS 3 Creative Coding Experiments
https://www.youtube.com/playlist?list=PLYElE_rzEw_t2O2DvfopIoq-diTgefVzV
You can message me on TWITTER https://twitter.com/code_laboratory
Check out some of my source code on CODEPEN https://codepen.io/franksLaboratory
#css3 #html5 #frankslaboratory
Music: (YouTube audio library) 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! How To Use CSS3 Border Image Property [CSS tutorial]](https://i.ytimg.com/vi/vnODfFJTLGg/mqdefault.jpg)



