• Stars
    star
    199
  • Rank 194,892 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 9 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple 2D car physics

#Simple 2D Car Physics Sim

Demo: http://www.spacejack.ca/projects/carphysics2d/

This is a Javascript adaptation of the ideas found in Marco Monster's often-referenced car physics paper and demo. His original paper has been archived here. His demo code, written in C, was archived by a user on gamedev.net here (from this thread.) A Java version was archived here.

This Javascript implementation additionally borrows some ideas from Siorki's js13k 2013 entry which also credits Marco's original paper. Siorki added some nice extras like variable front/rear size and axle distance to centre of gravity, as well as adding the vehicle's angular velocity to wheel velocity.

I've attempted to write this demo so that the details of the sim are clear and easily hackable. You can run it with or without a web server by loading index.html in your browser.

See the Car.js source for the physics implementation, in particular the doPhysics method.

####Additional Reference

Brian Beckman's The Physics of Racing

####License

MIT

More Repositories

1

terra

WebGL grass on a terrain
TypeScript
484
star
2

poaceae

WebGL grass using a vertex shader
TypeScript
100
star
3

three-mithril-ts

THREE.js, Mithril.js, TypeScript starter project
TypeScript
39
star
4

mithril-ts-example

Mithril 2.0 with Typescript example
TypeScript
24
star
5

mithril-browserify-ts-budo

Mithril, Browserify-HMR, TS, Budo, PostCSS starter project
TypeScript
19
star
6

freddy

A fast mobile Reddit reader web app
TypeScript
18
star
7

mithril-modal

Modal example for Mithril.js
JavaScript
16
star
8

waveshader

WaveShader - A GLSL audio wave sketchpad
TypeScript
15
star
9

mithril-select

Custom Select Component for Mithril.js
TypeScript
13
star
10

mithril-tutorial-ts

Mithril Simple App Tutorial - Typescript
TypeScript
10
star
11

panel-slider

Touch-swipeable Panels
JavaScript
9
star
12

mithril-docs-ex

Mithril 2.x Extra Docs
9
star
13

mithril-webpack-ts

Mithril, Webpack, Typescript, SASS Starter Projects
JavaScript
8
star
14

mithril-fractals

Dancing Pythagoras Tree demo - Mithril.js 1.0 implementation
TypeScript
8
star
15

io-ts-helpers

Helpers for io-ts
TypeScript
7
star
16

mithril-range

Custom Range Component for Mithril.js
TypeScript
7
star
17

markread

Markdown Reader
TypeScript
7
star
18

dechord

DECHORD: A Jazz Chord Decoder/Player
TypeScript
5
star
19

io-ts-form-example

TypeScript
5
star
20

mithril-checkbox

Mithril Custom Checkbox Component
TypeScript
4
star
21

proctree-three

Using proctree.js with three.js
TypeScript
4
star
22

pojod

A minimalist Plain Old Javscript Object Dictionary utility
TypeScript
4
star
23

gjs-webkit-ipc

Inter-Process Communication for GJS GTK applications and Webkit WebViews
TypeScript
4
star
24

m-carousel

Mithril 1.0 Carousel Demo
JavaScript
3
star
25

hyperscript-cookbook

Hyperscript Cookbook
3
star
26

mithril-knob

Knob-style input component for Mithril.js
TypeScript
3
star
27

mithril-ts-sass-example

Mithril 1.0 example with Typescript and SASS
TypeScript
2
star
28

mithril-stream-extra

Mithril Stream Extras
TypeScript
2
star
29

glfx

Simple OpenGL ES Example
C++
2
star
30

vec2-reflect

2D vector reflection
JavaScript
1
star
31

shader-starter

Shader Starter/Sketchpad
GLSL
1
star
32

bash-logger

Bash executable wrapper with stdout/stderr logging
Shell
1
star
33

point-lineseg-distance

Calculates the nearest 2D distance from a point to a line segment.
JavaScript
1
star
34

hyper-static

A HyperScript+Markdown Static Site Generator
JavaScript
1
star
35

mithril-component-types

TypeScript
1
star
36

mithril-helpers

JavaScript
1
star
37

mithril-slider

Custom Slider Component for Mithril.js
TypeScript
1
star
38

mithril-esm-tests

Testing mithril bundling
JavaScript
1
star
39

weboard

Browser-based MIDI keyboard
1
star
40

mithril.ts

Experimental Mithril.js in Typescript
JavaScript
1
star
41

tail.d.ts

Typescript types for tail
TypeScript
1
star
42

gameinput

Game Input Abstraction Library
JavaScript
1
star
43

hypersvg

HyperSVG - SVG helpers for hyperscript
JavaScript
1
star
44

cannon-contact-example

JavaScript
1
star
45

fmsynth

FM Synth
HTML
1
star
46

sdl2-examples

SDL2 Examples
C++
1
star