Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

freeCodeCamp

Animated Physics Game with JavaScript - Tutorial

via freeCodeCamp

Overview

Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This tutorial guides learners through building a 2D JavaScript physics game. It covers object-oriented game code, controls, sprites, collisions, enemies, scoring, particle effects, and win or lose conditions.

Syllabus

⌨️ Intro
⌨️ Basic setup
⌨️ Object oriented programming in JavaScript
⌨️ Drawing the player
⌨️ Mouse controls
⌨️ Making the player move
⌨️ Creating obstacles
⌨️ Non-overlapping obstacles
⌨️ Randomized images from a sprite sheet
⌨️ Positioning rules
⌨️ Reusable collision detection method
⌨️ Let's add physics
⌨️ 8-directional sprite animation
⌨️ Animation angles
⌨️ Debug mode
⌨️ Player movement boundaries
⌨️ FPS
⌨️ Egg class
⌨️ Periodically adding new eggs
⌨️ Egg physics
⌨️ Draw order
⌨️ Enemy class
⌨️ Larva class
⌨️ Egg hatching
⌨️ Larva sprites and collisions
⌨️ Gaining score points
⌨️ Particle effects
⌨️ Particle motion
⌨️ Randomized enemy skins
⌨️ Win and lose condition
⌨️ Restart game

Taught by

freeCodeCamp.org

Reviews

Start your review of Animated Physics Game with JavaScript - Tutorial

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.