Character Motion & Animation in 2D Games @Frankslaboratory
Character Motion & Animation in 2D Games  @Frankslaboratory
Uploaded April 2023 | Updated September 2026, 1 week ago
Robots, body parts and game design. Deep dive into 2D character animation and motion. Let's build a space robot from multiple separate body parts and let's make them interactive. Building games can be easy if you understand your tools and techniques. Let's learn 2D Game development with vanilla JavaScript and HTML5 canvas element.

Check out some of my EXTENDED classes with BONUS lessons and more free 2D game art assets
🌟 Udemy: udemy.com/course/build-animated-physics-game-with-javascript/?referralCode=B4482AF631243104650B
🌟 Skillshare (free 1 month trial that includes all my extended classes including this one):
skillshare.com/en/r/profile/Frank-Dvorak/507488567?gr_tch_ref=on&gr_trp=on

🎨 Download Project Art assets 🎨
Background: frankslaboratory.co.uk/downloads/115/bg1.png
Body: frankslaboratory.co.uk/downloads/115/body.png
Eye 1: frankslaboratory.co.uk/downloads/115/eye1.png
Eye 2: frankslaboratory.co.uk/downloads/115/eye2.png
Reflection: frankslaboratory.co.uk/downloads/115/reflection.png
Body sprite sheet: frankslaboratory.co.uk/downloads/115/bodySprite.png
Detector light: frankslaboratory.co.uk/downloads/115/detectorLight.png
All (zip): frankslaboratory.co.uk/downloads/115/all.zip
Larger background image: frankslaboratory.co.uk/downloads/115/background_1280x720.png
Concept art (wallpapers, robot designs): frankslaboratory.co.uk/downloads/115/115_concept_art.zip

Today we will learn:
- How to create animated interactive CHARACTER with vanilla JavaScript and HTML canvas
- How to MEASURE AN ANGLE between 2 objects in a 2D space
- How to create animated interactive eyes
- How to make characters MOVE in repeating patterns

⭐️Tutorial Contents ⭐️
00:00 Intro
01:22 Project setup
02:41 Robot class
05:00 Drawing eyes on HTML canvas
06:00 Capturing mouse coordinates
07:45 Animating on HTML canvas
08:43 Calculating angle between 2 objects
18:01 Drawing images on HTML canvas
23:15 Sprite animation with JavaScript
27:39 Repeating motion patterns
34:17 Improving eye movement
38:32 Autopilot and tracking modes

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
Character Motion & Animation in 2D GamesMake Your Game Fair With i-FramesState Management in GamesJavaScript 2D Game TutorialCreative CSS3 CheckboxThe Math Behind Game CollisionsWhat are flow fields #SHORTSDrawing Star Wars Droid With CSS - Animated Background Tutorial, CSS3 Web Design Ideas For BeginnersJavaScript Flappy Bird with Particles & SpritesNext Level Vanilla JavaScript UI AnimationsCSS Filters - SVG Turbulence Filter Animation [ CSS3 Creative Menu Hover Effects ] SquigglevisionCSS Login Form Animation With Wave Placeholder Text Effect - CSS3 & HTML5 Tutorial for Beginners
Franks laboratory |

Character Motion & Animation in 2D Games

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER