cobbpg / webstunts

A WebGL reimagination of Stunts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WebStunts by Patai Gergely

Seeing all the rage about WebGL and not having written JavaScript for years, I decided to give it a try as a learning exercise. This is a reimplementation of the Stunts demo that accompanies the LambdaCube 3D engine. The contents of models.js were mostly generated by extending the original Haskell code (which loads the files of the DOS game directly) to dump some intermediate data structures.

In the original demo we used Bullet for physics. While there exists a direct Javascript port of Bullet under the name ammo.js, it seems to be too slow for this purpose, and I ran into bugs concerning triangle meshes at the time of this experiment. Instead, I went with JigLibJS2, which is much faster and works as advertised. It is a much simpler engine than Bullet and by far not as robust (its triangle mesh support seems somewhat broken), but it runs much faster at the moment. Besides, it seems to be the only viable option that makes at least rudimentary vehicle simulation possible in JavaScript.

We all loved Stunts for the wacky physics, so there is every reason to love this redux ten times as much. ;) Now go and play the online version!

About

A WebGL reimagination of Stunts.


Languages

Language:JavaScript 99.9%Language:Shell 0.1%