Skip to main content
CF

Build Animated Physics Game with JavaScript

3h 29m 27s
English
Paid

What makes a great game? Is it about beautiful, polished visuals or engaging gameplay that feels responsive? Could it be about unique ideas, special secrets, and Easter eggs? This course explores the essential ingredients of a perfect game development recipe.

Course Overview

In this class, we will dive deep into sprite animation, interactivity, and 2D physics. You'll learn 10 important techniques every game developer needs to know, applying them in a real project. By the end of this course, you'll have a solid foundation in game development.

Course Materials

Students will receive a wealth of 2D professional high-resolution game art for free. This includes environmental and character art assets as ready-to-use sprite sheets. You'll also get source files with separate pieces, perfect for editing colors, creating your own mushrooms and creatures, or rigging your own animations.

What You'll Learn

  • How to implement a simple AI to make creatures feel alive.
  • Ways to control the FPS of your game and measure time to trigger periodic events.
  • Methods to restart the game by pressing a button.
  • Techniques for applying collision detection to resolve collisions and simulate physics.
  • Using the built-in drawImage method to create randomized game environments and animate characters from a sprite sheet.
  • Capturing mouse positions to animate an 8-directional sprite sheet based on the relative position between the mouse and the player character.
  • Building a game from scratch using HTML5, CSS3, and plain vanilla JavaScript without relying on external frameworks or libraries. You'll write and understand every line of code.
  • ... and much more!

Prerequisites

This course is beginner-friendly, but existing knowledge of HTML, CSS, and JavaScript is needed. If you understand JavaScript basics and are familiar with functions, for loops, and arrays, you'll gain maximum value from this class.

Have fun and start creating your own games today! :)

About the Author: Udemy

Udemy thumbnail

Udemy is the largest open marketplace for online courses on the internet. Founded in 2010 by Eren Bali, Oktay Caglar, and Gagan Biyani and headquartered in San Francisco, the company went public on the Nasdaq in 2021 under the ticker UDMY. The platform hosts well over two hundred thousand courses across software development, IT and cloud, data science, design, business, marketing, and creative skills, taught by tens of thousands of independent instructors. Roughly seventy million learners use it worldwide, and the corporate arm — Udemy Business — supplies a curated subset of that catalog to enterprise customers.

Because Udemy is a marketplace rather than a single editorial publisher, the catalog is uneven by design. The strongest material lives in the long-form, project-based courses authored by working engineers — full-stack JavaScript, React, Node.js, Python data science, AWS, Docker and Kubernetes, mobile development with Flutter and React Native, and cloud certification preparation. The CourseFlix listing under this source is the slice of that catalog that has been mirrored here for offline-friendly viewing, organized by topic and updated as new releases land. Pricing on Udemy itself swings dramatically with the site's near-permanent sales, which is why the platform is best treated as a deep reference catalog: pick instructors with strong reviews and a track record of updating their material rather than buying on the headline price alone.

Watch Online 36 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 36 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Introduction
All Course Lessons (36)
#Lesson TitleDurationAccess
1
Introduction Demo
00:47
2
Basic setup
03:52
3
Object Oriented Programming in JavaScript
04:22
4
Drawing the player
07:11
5
Mouse controls
06:00
6
Making the player move
07:40
7
Creating obstacles
06:34
8
Non-overlapping obstacles
06:36
9
Randomized images from a sprite sheet
05:15
10
Positioning rules
06:00
11
Reusable collision detection method
04:05
12
Physics
08:08
13
8 directional sprite animation
04:14
14
Animation angles
07:06
15
Debug mode
03:34
16
Player movement boundaries
02:57
17
FPS
09:40
18
Egg class
04:54
19
Periodically adding new eggs
07:00
20
Egg physics
05:35
21
Draw order
08:18
22
Enemy class
11:20
23
Larva class
03:27
24
Egg hatching
09:59
25
Larva sprites and collisions
04:38
26
Gaining score points
02:41
27
Particle effects
08:56
28
Particle motion
07:05
29
Randomised enemy skins
04:25
30
Win and lose condition
10:32
31
Restart game
06:32
32
Extending enemy class
05:56
33
Simple fullscreen mode
03:08
34
Player sprite sheet full animation
02:37
35
Larva sprite sheet full animation
01:44
36
Enemies sprite sheet full animation
06:39
Unlock unlimited learning

Get instant access to all 35 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Related courses

Frequently asked questions

What are the prerequisites for enrolling in this course?
To enroll in this course, students should have a basic understanding of JavaScript, as the course involves Object Oriented Programming in JavaScript and various programming techniques. Familiarity with basic game development concepts may also be beneficial, but it is not required.
What projects will I build during this course?
During the course, you will build an animated physics-based game. The course covers various aspects such as sprite animation, collision detection, and game physics. By the end, you will have a complete, functional game that includes features like controlled FPS, AI for creatures, and interactive elements.
Who is the ideal target audience for this course?
This course is designed for aspiring game developers who want to learn about 2D game development using JavaScript. It is ideal for those interested in learning about sprite animation, game physics, and creating interactive and visually engaging games.
How does the depth of this course compare to other game development courses?
This course offers a focused exploration of 2D game development techniques, specifically sprite animation and physics, in 36 lessons. It provides a balance of theoretical knowledge and practical application, making it suitable for beginners and those looking to enhance their skills in these specific areas.
What platforms or tools will I learn to use in this course?
The course focuses on game development using JavaScript and incorporates the use of sprite sheets for character and environment animations. You will also utilize JavaScript's built-in drawImage method and other browser-based JavaScript tools to create and animate game elements.
What topics are not covered in this course?
The course does not cover 3D game development, advanced AI techniques, or the use of game engines like Unity or Unreal. It is specifically focused on 2D game development using JavaScript and sprite animation techniques.
How much time should I expect to commit to this course?
The course consists of 36 lessons with varying runtimes. While the exact time commitment depends on individual learning pace, students should be prepared to dedicate several hours per week to go through the lessons, practice the techniques, and complete the project.