JavaScript Side Scroller Game Tutorial @Frankslaboratory
JavaScript Side Scroller Game Tutorial  @Frankslaboratory
Uploaded January 2022 | Updated November 2026, 4 hours ago
Let's learn how to build a side-scroller game from start to finish with animated sprites, endlessly scrolling backgrounds and a simple scoring system. We will use just plain vanilla JavaScript, HTML & CSS, no frameworks and no libraries. Have fun! For more standalone game development tutorials, check the full series below.

PART 2: Turn it into a ๐Ÿ“ฑ MOBILE ๐Ÿ“ฑ game youtu.be/D74Z_0I0CUk

โค Related Links โค
Art by bevouliin.com check out their website for more game art assets!
Download project sprite sheets:
๐Ÿ• Player: frankslaboratory.co.uk/downloads/93/player.png
๐ŸŒณ Background: frankslaboratory.co.uk/downloads/93/background_single.png
๐Ÿฆ‡ Enemy: frankslaboratory.co.uk/downloads/93/enemy_1.png
Backup links:
Background ibb.co/jrpX7BY
Enemy ibb.co/FxFC9mF
Player ibb.co/z51dQS0

๐ŸŽฎ Game Development MASTERCLASS SERIES with vanilla JavaScript, basics for beginners: ๐ŸŽฎ
๐Ÿถ Project 1: Sprite animation youtu.be/CY0HE277IBM
๐Ÿถ Project 2: Parallax backgrounds youtu.be/Mg7ibYWhjPI
๐Ÿถ Project 3: NPC movement youtu.be/pyhb8Y9qKUI
๐Ÿถ Project 4: Rectangle collision youtu.be/r0sy-Cr6WHY
๐Ÿถ Project 5: Circle collision youtu.be/rtBCVe3j_24
๐Ÿถ Project 6: Triggered event based animations youtu.be/Eg_zUEy_lDE
๐Ÿถ Project 7: Raven game youtu.be/gCa0z4B-CRo
๐Ÿถ Project 8: Enemy types youtu.be/aEDADLtLEbk
๐Ÿถ Project 9: State Management youtu.be/jKe44NeFzwE
๐Ÿถ Project 10: this video

๐Ÿ”ฅ I really like these courses on Udemy ๐Ÿ”ฅ
โ˜• The Web Developer Bootcamp (Colt Steele, 2022 update) bit.ly/2ZZJM0d
โ˜• JavaScript Basics for Beginners bit.ly/32Tn5wq
โ˜• Object-oriented Programming in JavaScript bit.ly/3f4Otu0
โ˜• The Complete JavaScript Course 2022: From Zero to Expert! bit.ly/3fXGwaZ
โ˜• JavaScript - The Complete Guide 2022 (Beginner + Advanced) bit.ly/37Hlxqq
โ˜• JavaScript: The Advanced Concepts (2022) bit.ly/2Uk6Wyk
โ˜• JavaScript: Understanding the Weird Parts bit.ly/2WVe0zn
โ˜• Modern HTML & CSS From The Beginning (Including Sass) bit.ly/2Ec6Cch
โ˜• 20 Web Projects With Vanilla JavaScript bit.ly/3anlCQR
GAMEDEV and GAME ART:
โ˜• How to Program Games: Tile Classics in JS for HTML5 Canvas bit.ly/2ZUfKuG
โ˜• Learn Professional 2D Game Graphic Design in Photoshop bit.ly/2SpPdE8
โ˜• The Ultimate 2D Game Character Design & Animation Course bit.ly/3eoZWqT
โ˜• Produce Professional Pixel Art for Your New Game bit.ly/3nUrTKm
My FREE courses on UDEMY:
โ˜• HTML Canvas Crash Course bit.ly/3y8yAgz
โ˜• Sprite Animation Deep Dive bit.ly/2Q9BG2K

โญ๏ธTutorial Contents โญ๏ธ
00:00 What we will learn today
01:23 HTML and CSS setup
02:21 JavaScript setup
03:30 Project structure
04:47 How to handle multiple keyboard inputs
10:33 Drawing player
13:23 drawImage method explained
15:18 Player movement
17:26 Jumping
21:25 Scrolling backgrounds
24:47 Enemy class
26:50 Triggering periodic events
32:39 Sprite animation with custom FPS
37:57 Removing objects with filter method
39:10 How to display score
40:31 Collision detection in a 2D game
43:55 Handle game over
44:52 Cleaning up

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

Music: (YouTube audio library) Dub Hub - Jimmy Fontanez Media Right Productions
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
JavaScript Side Scroller Game TutorialJavaScript Game Tutorial: Planet DefenseFree Tool Makes ANY Indie Game CharacterWhy Hardcoding Kills Scale (Go Data-Driven)Pure CSS Animated Background Tutorial - Dripping Liquid EffectPerfect Pixel Art in Seconds (CSS)Pure CSS Morph Effect | Awesome UI Hover Animations with CSS Clip Path PropertySprite Animation in JavaScriptMake a Mobile Game with JavaScriptBuild a Swarm With One UpgradeHTML Canvas Deep Dive 2026Bouncing Particles with vanilla JavaScript
Franks laboratory |

JavaScript Side Scroller Game Tutorial

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER