Book Image

HTML5 Game Development by Example: Beginner's Guide

By : Seng Hin Mak
Book Image

HTML5 Game Development by Example: Beginner's Guide

By: Seng Hin Mak

Overview of this book

Table of Contents (18 chapters)
HTML5 Game Development by Example Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
9
Building a Physics Car Game with Box2D and Canvas
Index

Creating a dynamic box in the physics world


Imagine now that we drop a box into the world. The box falls from the air and finally hits the ground. The box bounces up a little and finally lands on the ground. This is different from what we created in the last section. In the last section, we created a static ground, which was immovable and could not be affected by gravity. Now, we will create a dynamic box.