O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A JavaScript Game Exercise Built from Scratch to Catch Objects

Video Description

Explore how you can learn and practice JavaScript building a fun interactive game from Scratch. JavaScript practice

About This Video

  • Explore setting up a basic game structure page
  • Add in the various variable for tracking of values
  • Connect your keyboard key presses to movement of an element within your HTML
  • Add collision detection checks to determine if elements have crossed paths
  • Move elements and construct bounding values
  • Add self-moving objects for the player to interact with
  • Complete scoring tweaks updates and more

In Detail

This course will take you on a journey where you’ll learn and practice JavaScript by building a fun interactive game from Scratch. We’ll explore animation functionality and you’ll see how to apply it within your code to make things happen. You’ll learn a lot of things such as how to set up a basic game structure page, connect your keyboard key presses to movement of an element within your HTML, move elements, and construct bounding values and a lot more. Source code is also included.