mmmika / gamejs-box2d-car-example

top down car game example for box2d an gamejs

Home Page:http://domasx2.github.com/gamejs-box2d-car-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a simple as I could make it example of a HTML5 top-down car game using gamejs javascript game framework and box2d physics engine.

Live example at: http://domasx2.github.com/gamejs-box2d-car-example

Based on http://www.emanueleferonato.com/2009/04/06/two-ways-to-make-box2d-cars/ and http://www.banditracer.eu.

The basic idea is to rotate front wheels when user steers and apply engine force on them. Wheels are connected to the car and drag it along.
Remove sideways velocity from all wheels every frame to simulate tire friction.
This model does not allow for drifting, but is very servicable for arcade top down car games.

About

top down car game example for box2d an gamejs

http://domasx2.github.com/gamejs-box2d-car-example

License:Other


Languages

Language:JavaScript 99.7%Language:HTML 0.3%