O'Reilly logo

HTML5 Game Development HOTSHOT by Makzan

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

Chapter 7. A Ball-shooting Machine with Physics Engine

In the previous project, we built a space defender game and also learned how to use vector graphics. In this project, we will still work on the canvas and CreateJS library. We will use an engine called Box2D to create a simulated physics world. In this world, we will create a ball-shooting game with some obstacles in the playing court. We will vector graphics from Adobe Flash and attach the graphics to the physical objects from the last project.

Mission briefing

In this project, we focus on the physics engine. We will build a basketball court where the player needs to shoot the ball in to the hoop. A player shoots the ball by keeping the mouse button pressed and releasing it. The direction is ...

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

Start Free Trial

No credit card required