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: https://youtu.be/c-1dBd1_G8A Animating player
Part 2: https://youtu.be/ug-gdfGb7I8 State management and parallax backgrounds
Part 3: https://youtu.be/lqNztI7BMf8 Enemy types
Part 4 : https://youtu.be/6ppfyWdoH3c Collisions & Particles
Part 5 : https://youtu.be/KICADKr_zeM Win & Lose Conditions, Timer, Clean up
Part 6: https://youtu.be/tWS_eURr2_w Bonus features (this video)
???? FULL SERIES:???? https://youtube.com/playlist?list=PLYElE_rzEw_uryBrrzu2E626MY4zoXvx2
❤ Related Links ❤
Art by https://bevouliin.com/ check out their website for more game art assets!
Download project sprite sheets:
???? Player: http://frankslaboratory.co.uk/downloads/97/player.png
Backgrounds:
City:
Layer 1: https://www.frankslaboratory.co.uk/downloads/97/layer-1.png
Layer 2: https://www.frankslaboratory.co.uk/downloads/97/layer-2.png
Layer 3: https://www.frankslaboratory.co.uk/downloads/97/layer-3.png
Layer 4: https://www.frankslaboratory.co.uk/downloads/97/layer-4.png
Layer 5: https://www.frankslaboratory.co.uk/downloads/97/layer-5.png
Forest:
Layer 1: https://www.frankslaboratory.co.uk/downloads/97/forest/layer-1.png
Layer 2: https://www.frankslaboratory.co.uk/downloads/97/forest/layer-2.png
Layer 3: https://www.frankslaboratory.co.uk/downloads/97/forest/layer-3.png
Layer 4: https://www.frankslaboratory.co.uk/downloads/97/forest/layer-4.png
Layer 5: https://www.frankslaboratory.co.uk/downloads/97/forest/layer-5.png
Lives:
https://www.frankslaboratory.co.uk/downloads/97/lives.png
https://www.frankslaboratory.co.uk/downloads/97/heart.png
Fire texture:
???? https://www.frankslaboratory.co.uk/downloads/97/fire.png
Collision animation:
☁️ https://www.frankslaboratory.co.uk/downloads/97/boom.png
18 Enemies:
Big spider: https://www.frankslaboratory.co.uk/downloads/97/enemy_spider_big.png
Bat 1: https://www.frankslaboratory.co.uk/downloads/97/enemy_bat_1.png
Spinner: https://www.frankslaboratory.co.uk/downloads/97/enemy_spinner.png
Small spider: https://www.frankslaboratory.co.uk/downloads/97/enemy_spider.png
Ghost 1: https://www.frankslaboratory.co.uk/downloads/97/enemy_ghost_1.png
Bat 2: https://www.frankslaboratory.co.uk/downloads/97/enemy_bat_2.png
Raven: https://www.frankslaboratory.co.uk/downloads/97/enemy_raven.png
Bat 3: https://www.frankslaboratory.co.uk/downloads/97/enemy_bat_3.png
Ghost 2: https://www.frankslaboratory.co.uk/downloads/97/enemy_ghost_2.png
Fly: https://www.frankslaboratory.co.uk/downloads/97/enemy_fly.png
Ghost 3: https://www.frankslaboratory.co.uk/downloads/97/enemy_ghost_3.png
Ghost 4: https://www.frankslaboratory.co.uk/downloads/97/enemy_ghost_4.png
Hand: https://www.frankslaboratory.co.uk/downloads/97/enemy_hand.png
Plant: https://www.frankslaboratory.co.uk/downloads/97/enemy_plant.png
Worm: https://www.frankslaboratory.co.uk/downloads/97/enemy_worm.png
Walking zombie: https://www.frankslaboratory.co.uk/downloads/97/enemy_zombie.png
Ground zombie: https://www.frankslaboratory.co.uk/downloads/97/enemy_ground_zombie.png
Digger: https://www.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 https://twitter.com/code_laboratory
???? Check out some of my source code on CODEPEN https://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