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 physical car


We have prepared the car box body and two wheel bodies. We are just one step away from making a car. Imagine that now we have a glue stick to glue the wheels to the car body. Then, the car and wheels will not separate anymore, and we will have a car. We can use joint to achieve this. In this section, we will use joint to stick the wheels and the car body together.